diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index d8bf790b5988..f28c28a5d39c 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -79,7 +79,6 @@ trigger: - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/edgezones/Azure.ResourceManager.EdgeZones - sdk/elastic/Azure.ResourceManager.Elastic - sdk/elasticsan/Azure.ResourceManager.ElasticSan @@ -108,6 +107,7 @@ trigger: - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - sdk/iotcentral/Azure.ResourceManager.IotCentral - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/keyvault/Azure.ResourceManager.KeyVault - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - sdk/kusto/Azure.ResourceManager.Kusto @@ -285,7 +285,6 @@ pr: - sdk/dnsresolver/Azure.ResourceManager.DnsResolver - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder - - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/edgezones/Azure.ResourceManager.EdgeZones - sdk/elastic/Azure.ResourceManager.Elastic - sdk/elasticsan/Azure.ResourceManager.ElasticSan @@ -314,6 +313,7 @@ pr: - sdk/iot/Azure.ResourceManager.IotFirmwareDefense - sdk/iotcentral/Azure.ResourceManager.IotCentral - sdk/iothub/Azure.ResourceManager.IotHub + - sdk/iotoperations/Azure.ResourceManager.IotOperations - sdk/keyvault/Azure.ResourceManager.KeyVault - sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration - sdk/kusto/Azure.ResourceManager.Kusto diff --git a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchPrivateEndpointConnectionCollection.cs b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchPrivateEndpointConnectionCollection.cs index b895ee82b831..742aaee2d71a 100644 --- a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchPrivateEndpointConnectionCollection.cs +++ b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SearchPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PrivateEndpointConnectionUpdate() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/UpdatePrivateEndpointConnection.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/UpdatePrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_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 @@ -48,7 +48,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionUpdate() ConnectionState = new SearchServicePrivateLinkServiceConnectionState { Status = SearchServicePrivateLinkServiceConnectionStatus.Rejected, - Description = "Rejected for some reason.", + Description = "Rejected for some reason", }, }, }; @@ -66,7 +66,7 @@ public async Task CreateOrUpdate_PrivateEndpointConnectionUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetPrivateEndpointConnection.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/GetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_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 @@ -100,7 +100,7 @@ public async Task Get_PrivateEndpointConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListPrivateEndpointConnectionsByService() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/ListPrivateEndpointConnectionsByService.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/ListPrivateEndpointConnectionsByService.json // this example is just showing the usage of "PrivateEndpointConnections_ListByService" 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 @@ -136,7 +136,7 @@ public async Task GetAll_ListPrivateEndpointConnectionsByService() [Ignore("Only validating compilation of examples")] public async Task Exists_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetPrivateEndpointConnection.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/GetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_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 @@ -166,7 +166,7 @@ public async Task Exists_PrivateEndpointConnectionGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetPrivateEndpointConnection.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/GetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_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/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchPrivateEndpointConnectionResource.cs b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchPrivateEndpointConnectionResource.cs index 592ae530c478..58c3342f797f 100644 --- a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchPrivateEndpointConnectionResource.cs +++ b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SearchPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_PrivateEndpointConnectionGet() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetPrivateEndpointConnection.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/GetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_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 @@ -51,7 +51,7 @@ public async Task Get_PrivateEndpointConnectionGet() [Ignore("Only validating compilation of examples")] public async Task Delete_PrivateEndpointConnectionDelete() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/DeletePrivateEndpointConnection.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/DeletePrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_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 @@ -83,7 +83,7 @@ public async Task Delete_PrivateEndpointConnectionDelete() [Ignore("Only validating compilation of examples")] public async Task Update_PrivateEndpointConnectionUpdate() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/UpdatePrivateEndpointConnection.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/UpdatePrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_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 @@ -108,7 +108,7 @@ public async Task Update_PrivateEndpointConnectionUpdate() ConnectionState = new SearchServicePrivateLinkServiceConnectionState { Status = SearchServicePrivateLinkServiceConnectionStatus.Rejected, - Description = "Rejected for some reason.", + Description = "Rejected for some reason", }, }, }; diff --git a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchServiceCollection.cs b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchServiceCollection.cs index abd123ac4f8d..01f39d38758e 100644 --- a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchServiceCollection.cs +++ b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchServiceCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_SearchServiceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SearchCreateOrUpdateService() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateService.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchCreateOrUpdateService.json // this example is just showing the usage of "Services_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 @@ -48,7 +48,6 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateService() ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, - ComputeType = SearchServiceComputeType.Default, Tags = { ["app-name"] = "My e-commerce app" @@ -68,7 +67,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateService() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SearchCreateOrUpdateServiceAuthOptions() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceAuthOptions.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchCreateOrUpdateServiceAuthOptions.json // this example is just showing the usage of "Services_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 @@ -94,7 +93,6 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceAuthOptions() ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, - ComputeType = SearchServiceComputeType.Default, AuthOptions = new SearchAadAuthDataPlaneAuthOptions { AadAuthFailureMode = SearchAadAuthFailureMode.Http401WithBearerChallenge, @@ -118,7 +116,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceAuthOptions() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SearchCreateOrUpdateServiceDisableLocalAuth() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceDisableLocalAuth.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchCreateOrUpdateServiceDisableLocalAuth.json // this example is just showing the usage of "Services_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 @@ -144,7 +142,6 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceDisableLocalAuth() ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, - ComputeType = SearchServiceComputeType.Default, IsLocalAuthDisabled = true, Tags = { @@ -165,7 +162,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceDisableLocalAuth() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json // this example is just showing the usage of "Services_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 @@ -191,7 +188,6 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceToAllowAccessFromPri ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, - ComputeType = SearchServiceComputeType.Default, PublicInternetAccess = SearchServicePublicInternetAccess.Disabled, Tags = { @@ -212,7 +208,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceToAllowAccessFromPri [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json // this example is just showing the usage of "Services_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 @@ -238,74 +234,13 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceToAllowAccessFromPub ReplicaCount = 1, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, - ComputeType = SearchServiceComputeType.Default, - NetworkRuleSet = new SearchServiceNetworkRuleSet - { - IPRules = {new SearchServiceIPRule -{ -Value = "123.4.5.6", -}, new SearchServiceIPRule -{ -Value = "123.4.6.0/18", -}}, - }, - Tags = -{ -["app-name"] = "My e-commerce app" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, searchServiceName, data); - SearchServiceResource 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 - SearchServiceData 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_SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass() - { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json - // this example is just showing the usage of "Services_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 = "subid"; - string resourceGroupName = "rg1"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this SearchServiceResource - SearchServiceCollection collection = resourceGroupResource.GetSearchServices(); - - // invoke the operation - string searchServiceName = "mysearchservice"; - SearchServiceData data = new SearchServiceData(new AzureLocation("westus")) - { - SearchSkuName = SearchServiceSkuName.Standard, - ReplicaCount = 1, - PartitionCount = 1, - HostingMode = SearchServiceHostingMode.Default, - ComputeType = SearchServiceComputeType.Default, - NetworkRuleSet = new SearchServiceNetworkRuleSet - { - IPRules = {new SearchServiceIPRule + IPRules = {new SearchServiceIPRule { Value = "123.4.5.6", }, new SearchServiceIPRule { Value = "123.4.6.0/18", }}, - Bypass = SearchBypass.AzurePortal, - }, Tags = { ["app-name"] = "My e-commerce app" @@ -325,7 +260,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceToAllowAccessFromPub [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SearchCreateOrUpdateServiceWithCmkEnforcement() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceWithCmkEnforcement.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchCreateOrUpdateServiceWithCmkEnforcement.json // this example is just showing the usage of "Services_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 @@ -351,7 +286,6 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceWithCmkEnforcement() ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, - ComputeType = SearchServiceComputeType.Default, EncryptionWithCmk = new SearchEncryptionWithCmk { Enforcement = SearchEncryptionWithCmkEnforcement.Enabled, @@ -371,58 +305,11 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceWithCmkEnforcement() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_SearchCreateOrUpdateServiceWithDataExfiltration() - { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceWithDataExfiltration.json - // this example is just showing the usage of "Services_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 = "subid"; - string resourceGroupName = "rg1"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this SearchServiceResource - SearchServiceCollection collection = resourceGroupResource.GetSearchServices(); - - // invoke the operation - string searchServiceName = "mysearchservice"; - SearchServiceData data = new SearchServiceData(new AzureLocation("westus")) - { - SearchSkuName = SearchServiceSkuName.Standard, - ReplicaCount = 3, - PartitionCount = 1, - HostingMode = SearchServiceHostingMode.Default, - ComputeType = SearchServiceComputeType.Default, - DisabledDataExfiltrationOptions = { SearchDisabledDataExfiltrationOption.All }, - Tags = -{ -["app-name"] = "My e-commerce app" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, searchServiceName, data); - SearchServiceResource 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 - SearchServiceData 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_SearchCreateOrUpdateServiceWithIdentity() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceWithIdentity.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchCreateOrUpdateServiceWithIdentity.json // this example is just showing the usage of "Services_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 @@ -445,17 +332,10 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceWithIdentity() SearchServiceData data = new SearchServiceData(new AzureLocation("westus")) { SearchSkuName = SearchServiceSkuName.Standard, - Identity = new ManagedServiceIdentity("SystemAssigned, UserAssigned") - { - UserAssignedIdentities = -{ -[new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-mi")] = new UserAssignedIdentity() -}, - }, + Identity = new ManagedServiceIdentity("SystemAssigned"), ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, - ComputeType = SearchServiceComputeType.Default, Tags = { ["app-name"] = "My e-commerce app" @@ -475,7 +355,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceWithIdentity() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SearchCreateOrUpdateWithSemanticSearch() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateWithSemanticSearch.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchCreateOrUpdateWithSemanticSearch.json // this example is just showing the usage of "Services_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 @@ -501,7 +381,6 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateWithSemanticSearch() ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, - ComputeType = SearchServiceComputeType.Default, SemanticSearch = SearchSemanticSearch.Free, Tags = { @@ -522,7 +401,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateWithSemanticSearch() [Ignore("Only validating compilation of examples")] public async Task Get_SearchGetService() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchGetService.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchGetService.json // this example is just showing the usage of "Services_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 @@ -555,7 +434,7 @@ public async Task Get_SearchGetService() [Ignore("Only validating compilation of examples")] public async Task GetAll_SearchListServicesByResourceGroup() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchListServicesByResourceGroup.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchListServicesByResourceGroup.json // this example is just showing the usage of "Services_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 @@ -590,7 +469,7 @@ public async Task GetAll_SearchListServicesByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_SearchGetService() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchGetService.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchGetService.json // this example is just showing the usage of "Services_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 @@ -619,7 +498,7 @@ public async Task Exists_SearchGetService() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SearchGetService() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchGetService.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchGetService.json // this example is just showing the usage of "Services_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/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchServiceResource.cs b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchServiceResource.cs index b2a23e239622..69720f7b6adf 100644 --- a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchServiceResource.cs +++ b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchServiceResource.cs @@ -21,7 +21,7 @@ public partial class Sample_SearchServiceResource [Ignore("Only validating compilation of examples")] public async Task Get_SearchGetService() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchGetService.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchGetService.json // this example is just showing the usage of "Services_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 @@ -51,7 +51,7 @@ public async Task Get_SearchGetService() [Ignore("Only validating compilation of examples")] public async Task Delete_SearchDeleteService() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchDeleteService.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchDeleteService.json // this example is just showing the usage of "Services_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 @@ -77,7 +77,7 @@ public async Task Delete_SearchDeleteService() [Ignore("Only validating compilation of examples")] public async Task Update_SearchUpdateService() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateService.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateService.json // this example is just showing the usage of "Services_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 @@ -116,7 +116,7 @@ public async Task Update_SearchUpdateService() [Ignore("Only validating compilation of examples")] public async Task Update_SearchUpdateServiceAuthOptions() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceAuthOptions.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceAuthOptions.json // this example is just showing the usage of "Services_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 @@ -159,7 +159,7 @@ public async Task Update_SearchUpdateServiceAuthOptions() [Ignore("Only validating compilation of examples")] public async Task Update_SearchUpdateServiceDisableLocalAuth() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceDisableLocalAuth.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceDisableLocalAuth.json // this example is just showing the usage of "Services_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 @@ -199,7 +199,7 @@ public async Task Update_SearchUpdateServiceDisableLocalAuth() [Ignore("Only validating compilation of examples")] public async Task Update_SearchUpdateServiceToAllowAccessFromPrivateEndpoints() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json // this example is just showing the usage of "Services_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 @@ -235,7 +235,7 @@ public async Task Update_SearchUpdateServiceToAllowAccessFromPrivateEndpoints() [Ignore("Only validating compilation of examples")] public async Task Update_SearchUpdateServiceToAllowAccessFromPublicCustomIPs() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json // this example is just showing the usage of "Services_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 @@ -257,63 +257,13 @@ public async Task Update_SearchUpdateServiceToAllowAccessFromPublicCustomIPs() ReplicaCount = 3, PartitionCount = 1, PublicInternetAccess = SearchServicePublicInternetAccess.Enabled, - NetworkRuleSet = new SearchServiceNetworkRuleSet - { - IPRules = {new SearchServiceIPRule -{ -Value = "123.4.5.6", -}, new SearchServiceIPRule -{ -Value = "123.4.6.0/18", -}}, - }, - }; - SearchServiceResource result = await searchService.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 - SearchServiceData 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_SearchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass() - { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json - // this example is just showing the usage of "Services_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 SearchServiceResource created on azure - // for more information of creating SearchServiceResource, please refer to the document of SearchServiceResource - string subscriptionId = "subid"; - string resourceGroupName = "rg1"; - string searchServiceName = "mysearchservice"; - ResourceIdentifier searchServiceResourceId = SearchServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, searchServiceName); - SearchServiceResource searchService = client.GetSearchServiceResource(searchServiceResourceId); - - // invoke the operation - SearchServicePatch patch = new SearchServicePatch(default) - { - ReplicaCount = 3, - PartitionCount = 1, - PublicInternetAccess = SearchServicePublicInternetAccess.Enabled, - NetworkRuleSet = new SearchServiceNetworkRuleSet - { - IPRules = {new SearchServiceIPRule + IPRules = {new SearchServiceIPRule { Value = "123.4.5.6", }, new SearchServiceIPRule { Value = "123.4.6.0/18", }}, - Bypass = SearchBypass.AzurePortal, - }, }; SearchServiceResource result = await searchService.UpdateAsync(patch); @@ -328,7 +278,7 @@ public async Task Update_SearchUpdateServiceToAllowAccessFromPublicCustomIPsAndB [Ignore("Only validating compilation of examples")] public async Task Update_SearchUpdateServiceToRemoveIdentity() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceToRemoveIdentity.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceToRemoveIdentity.json // this example is just showing the usage of "Services_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 @@ -363,7 +313,7 @@ public async Task Update_SearchUpdateServiceToRemoveIdentity() [Ignore("Only validating compilation of examples")] public async Task Update_SearchUpdateServiceWithCmkEnforcement() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceWithCmkEnforcement.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithCmkEnforcement.json // this example is just showing the usage of "Services_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 @@ -402,51 +352,11 @@ public async Task Update_SearchUpdateServiceWithCmkEnforcement() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_SearchUpdateServiceWithDataExfiltration() - { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceWithDataExfiltration.json - // this example is just showing the usage of "Services_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 SearchServiceResource created on azure - // for more information of creating SearchServiceResource, please refer to the document of SearchServiceResource - string subscriptionId = "subid"; - string resourceGroupName = "rg1"; - string searchServiceName = "mysearchservice"; - ResourceIdentifier searchServiceResourceId = SearchServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, searchServiceName); - SearchServiceResource searchService = client.GetSearchServiceResource(searchServiceResourceId); - - // invoke the operation - SearchServicePatch patch = new SearchServicePatch(default) - { - ReplicaCount = 2, - DisabledDataExfiltrationOptions = { SearchDisabledDataExfiltrationOption.All }, - Tags = -{ -["app-name"] = "My e-commerce app", -["new-tag"] = "Adding a new tag" -}, - }; - SearchServiceResource result = await searchService.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 - SearchServiceData 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_SearchUpdateServiceWithSemanticSearch() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceWithSemanticSearch.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithSemanticSearch.json // this example is just showing the usage of "Services_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 @@ -482,50 +392,11 @@ public async Task Update_SearchUpdateServiceWithSemanticSearch() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_SearchUpdateServiceWithSku() - { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceWithSku.json - // this example is just showing the usage of "Services_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 SearchServiceResource created on azure - // for more information of creating SearchServiceResource, please refer to the document of SearchServiceResource - string subscriptionId = "subid"; - string resourceGroupName = "rg1"; - string searchServiceName = "mysearchservice"; - ResourceIdentifier searchServiceResourceId = SearchServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, searchServiceName); - SearchServiceResource searchService = client.GetSearchServiceResource(searchServiceResourceId); - - // invoke the operation - SearchServicePatch patch = new SearchServicePatch(default) - { - SearchSkuName = SearchServiceSkuName.Standard2, - Tags = -{ -["app-name"] = "My e-commerce app", -["new-tag"] = "Adding a new tag" -}, - }; - SearchServiceResource result = await searchService.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 - SearchServiceData 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 GetAdminKey_SearchGetAdminKeys() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchGetAdminKeys.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchGetAdminKeys.json // this example is just showing the usage of "AdminKeys_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 @@ -551,7 +422,7 @@ public async Task GetAdminKey_SearchGetAdminKeys() [Ignore("Only validating compilation of examples")] public async Task RegenerateAdminKey_SearchRegenerateAdminKey() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchRegenerateAdminKey.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchRegenerateAdminKey.json // this example is just showing the usage of "AdminKeys_Regenerate" 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 @@ -578,7 +449,7 @@ public async Task RegenerateAdminKey_SearchRegenerateAdminKey() [Ignore("Only validating compilation of examples")] public async Task CreateQueryKey_SearchCreateQueryKey() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateQueryKey.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchCreateQueryKey.json // this example is just showing the usage of "QueryKeys_Create" 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 @@ -595,7 +466,7 @@ public async Task CreateQueryKey_SearchCreateQueryKey() SearchServiceResource searchService = client.GetSearchServiceResource(searchServiceResourceId); // invoke the operation - string name = "An API key granting read-only access to the documents collection of an index."; + string name = "Query key for browser-based clients"; SearchServiceQueryKey result = await searchService.CreateQueryKeyAsync(name); Console.WriteLine($"Succeeded: {result}"); @@ -605,7 +476,7 @@ public async Task CreateQueryKey_SearchCreateQueryKey() [Ignore("Only validating compilation of examples")] public async Task GetQueryKeysBySearchService_SearchListQueryKeysBySearchService() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchListQueryKeysBySearchService.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchListQueryKeysBySearchService.json // this example is just showing the usage of "QueryKeys_ListBySearchService" 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 @@ -634,7 +505,7 @@ public async Task GetQueryKeysBySearchService_SearchListQueryKeysBySearchService [Ignore("Only validating compilation of examples")] public async Task DeleteQueryKey_SearchDeleteQueryKey() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchDeleteQueryKey.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchDeleteQueryKey.json // this example is just showing the usage of "QueryKeys_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 @@ -659,10 +530,10 @@ public async Task DeleteQueryKey_SearchDeleteQueryKey() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetSupportedPrivateLinkResources_ListSupportedPrivateLinkResources() + public async Task Upgrade_UpgradeSearchServiceToLatestVersion() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/ListSupportedPrivateLinkResources.json - // this example is just showing the usage of "PrivateLinkResources_ListSupported" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/UpgradeSearchServiceToLatestVersion.json + // this example is just showing the usage of "Services_Upgrade" 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(); @@ -677,21 +548,23 @@ public async Task GetSupportedPrivateLinkResources_ListSupportedPrivateLinkResou ResourceIdentifier searchServiceResourceId = SearchServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, searchServiceName); SearchServiceResource searchService = client.GetSearchServiceResource(searchServiceResourceId); - // invoke the operation and iterate over the result - await foreach (SearchPrivateLinkResource item in searchService.GetSupportedPrivateLinkResourcesAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + ArmOperation lro = await searchService.UpgradeAsync(WaitUntil.Completed); + SearchServiceResource result = lro.Value; - Console.WriteLine("Succeeded"); + // 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 + SearchServiceData 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 UpgradeService_UpgradeSearchServiceToLatestVersion() + public async Task GetSupportedPrivateLinkResources_ListSupportedPrivateLinkResources() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/UpgradeSearchServiceToLatestVersion.json - // this example is just showing the usage of "Service_Upgrade" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/ListSupportedPrivateLinkResources.json + // this example is just showing the usage of "PrivateLinkResources_ListSupported" 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(); @@ -706,15 +579,13 @@ public async Task UpgradeService_UpgradeSearchServiceToLatestVersion() ResourceIdentifier searchServiceResourceId = SearchServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, searchServiceName); SearchServiceResource searchService = client.GetSearchServiceResource(searchServiceResourceId); - // invoke the operation - ArmOperation lro = await searchService.UpgradeServiceAsync(WaitUntil.Completed); - SearchServiceResource result = lro.Value; + // invoke the operation and iterate over the result + await foreach (SearchPrivateLinkResource item in searchService.GetSupportedPrivateLinkResourcesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } - // 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 - SearchServiceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine("Succeeded"); } } } diff --git a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SharedSearchServicePrivateLinkResource.cs b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SharedSearchServicePrivateLinkResource.cs index 6cf46fdad646..e9105b603841 100644 --- a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SharedSearchServicePrivateLinkResource.cs +++ b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SharedSearchServicePrivateLinkResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SharedSearchServicePrivateLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_SharedPrivateLinkResourceGet() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetSharedPrivateLinkResource.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/GetSharedPrivateLinkResource.json // this example is just showing the usage of "SharedPrivateLinkResources_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 @@ -51,7 +51,7 @@ public async Task Get_SharedPrivateLinkResourceGet() [Ignore("Only validating compilation of examples")] public async Task Delete_SharedPrivateLinkResourceDelete() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/DeleteSharedPrivateLinkResource.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/DeleteSharedPrivateLinkResource.json // this example is just showing the usage of "SharedPrivateLinkResources_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 @@ -78,7 +78,7 @@ public async Task Delete_SharedPrivateLinkResourceDelete() [Ignore("Only validating compilation of examples")] public async Task Update_SharedPrivateLinkResourceCreateOrUpdate() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/CreateOrUpdateSharedPrivateLinkResource.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/CreateOrUpdateSharedPrivateLinkResource.json // this example is just showing the usage of "SharedPrivateLinkResources_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 diff --git a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SharedSearchServicePrivateLinkResourceCollection.cs b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SharedSearchServicePrivateLinkResourceCollection.cs index 466e3b55ebb7..ceb4da249d98 100644 --- a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SharedSearchServicePrivateLinkResourceCollection.cs +++ b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SharedSearchServicePrivateLinkResourceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SharedSearchServicePrivateLinkResourceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SharedPrivateLinkResourceCreateOrUpdate() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/CreateOrUpdateSharedPrivateLinkResource.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/CreateOrUpdateSharedPrivateLinkResource.json // this example is just showing the usage of "SharedPrivateLinkResources_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 @@ -65,7 +65,7 @@ public async Task CreateOrUpdate_SharedPrivateLinkResourceCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_SharedPrivateLinkResourceGet() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetSharedPrivateLinkResource.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/GetSharedPrivateLinkResource.json // this example is just showing the usage of "SharedPrivateLinkResources_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 @@ -99,7 +99,7 @@ public async Task Get_SharedPrivateLinkResourceGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSharedPrivateLinkResourcesByService() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/ListSharedPrivateLinkResourcesByService.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/ListSharedPrivateLinkResourcesByService.json // this example is just showing the usage of "SharedPrivateLinkResources_ListByService" 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 @@ -135,7 +135,7 @@ public async Task GetAll_ListSharedPrivateLinkResourcesByService() [Ignore("Only validating compilation of examples")] public async Task Exists_SharedPrivateLinkResourceGet() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetSharedPrivateLinkResource.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/GetSharedPrivateLinkResource.json // this example is just showing the usage of "SharedPrivateLinkResources_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 @@ -165,7 +165,7 @@ public async Task Exists_SharedPrivateLinkResourceGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SharedPrivateLinkResourceGet() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetSharedPrivateLinkResource.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/GetSharedPrivateLinkResource.json // this example is just showing the usage of "SharedPrivateLinkResources_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/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index e081d0df1ae0..9b55bd808ee2 100644 --- a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetSearchServices_SearchListServicesBySubscription() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchListServicesBySubscription.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchListServicesBySubscription.json // this example is just showing the usage of "Services_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 @@ -52,7 +52,7 @@ public async Task GetSearchServices_SearchListServicesBySubscription() [Ignore("Only validating compilation of examples")] public async Task CheckSearchServiceNameAvailability_SearchCheckNameAvailability() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCheckNameAvailability.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchCheckNameAvailability.json // this example is just showing the usage of "Services_CheckNameAvailability" 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 @@ -77,7 +77,7 @@ public async Task CheckSearchServiceNameAvailability_SearchCheckNameAvailability [Ignore("Only validating compilation of examples")] public async Task GetUsagesBySubscription_GetQuotaUsagesList() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetQuotaUsagesList.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/GetQuotaUsagesList.json // this example is just showing the usage of "Usages_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 @@ -105,7 +105,7 @@ public async Task GetUsagesBySubscription_GetQuotaUsagesList() [Ignore("Only validating compilation of examples")] public async Task UsageBySubscriptionSku_GetQuotaUsage() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetQuotaUsage.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/GetQuotaUsage.json // this example is just showing the usage of "UsageBySubscriptionSku" 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/search/Azure.ResourceManager.Search/src/Generated/ArmSearchModelFactory.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/ArmSearchModelFactory.cs index 589df24c18cd..521fec723d51 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/ArmSearchModelFactory.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/ArmSearchModelFactory.cs @@ -16,58 +16,6 @@ namespace Azure.ResourceManager.Search.Models /// Model factory for models. public static partial class ArmSearchModelFactory { - /// Initializes a new instance of . - /// The name of the region. - /// The list of features offered in this region. - /// The list of SKUs offered in this region. - /// A new instance for mocking. - public static SearchServiceOfferingsByRegion SearchServiceOfferingsByRegion(string regionName = null, IEnumerable features = null, IEnumerable skus = null) - { - features ??= new List(); - skus ??= new List(); - - return new SearchServiceOfferingsByRegion(regionName, features?.ToList(), skus?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The name of the feature offered in this region. - /// A new instance for mocking. - public static SearchServiceFeatureOffering SearchServiceFeatureOffering(SearchServiceFeatureName? name = null) - { - return new SearchServiceFeatureOffering(name, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Defines the SKU of a search service, which determines billing rate and capacity limits. - /// The limits associated with this SKU offered in this region. - /// A new instance for mocking. - public static SearchServiceSkuOffering SearchServiceSkuOffering(SearchServiceSkuName? skuName = null, SearchServiceSkuOfferingLimits limits = null) - { - return new SearchServiceSkuOffering(skuName != null ? new SearchSku(skuName, serializedAdditionalRawData: null) : null, limits, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The maximum number of indexes available for this SKU. - /// The maximum number of indexers available for this SKU. - /// The maximum storage size in Gigabytes available for this SKU per partition. - /// The maximum vector storage size in Gigabytes available for this SKU per partition. - /// The maximum number of search units available for this SKU. - /// The maximum number of replicas available for this SKU. - /// The maximum number of partitions available for this SKU. - /// A new instance for mocking. - public static SearchServiceSkuOfferingLimits SearchServiceSkuOfferingLimits(int? indexes = null, int? indexers = null, float? partitionStorageInGigabytes = null, float? partitionVectorStorageInGigabytes = null, int? searchUnits = null, int? replicas = null, int? partitions = null) - { - return new SearchServiceSkuOfferingLimits( - indexes, - indexers, - partitionStorageInGigabytes, - partitionVectorStorageInGigabytes, - searchUnits, - replicas, - partitions, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The primary admin API key of the search service. /// The secondary admin API key of the search service. @@ -78,7 +26,7 @@ public static SearchServiceAdminKeyResult SearchServiceAdminKeyResult(string pri } /// Initializes a new instance of . - /// The name of the query API key. Query names are optional, but assigning a name can help you remember how it's used. + /// The name of the query API key; may be empty. /// The value of the query API key. /// A new instance for mocking. public static SearchServiceQueryKey SearchServiceQueryKey(string name = null, string key = null) @@ -93,33 +41,29 @@ public static SearchServiceQueryKey SearchServiceQueryKey(string name = null, st /// The systemData. /// The tags. /// The location. - /// The SKU of the search service, which determines price tier and capacity limits. This property is required when creating a new search service. - /// The identity of the resource. + /// The SKU of the search service, which determines billing rate and capacity limits. This property is required when creating a new search service. + /// The identity of the resource. Current supported identity types: None, SystemAssigned. /// The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. - /// The endpoint of the Azure AI Search service. /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. - /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. - /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. 'stopped': The search service is in a subscription that's disabled. If your service is in the degraded, disabled, or error states, it means the Azure AI Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. + /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. If your service is in the degraded, disabled, or error states, Microsoft is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. /// The details of the search service status. - /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'Succeeded' or 'Failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'Succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. - /// Network specific rules that determine how the Azure AI Search service may be reached. - /// A list of data exfiltration scenarios that are explicitly disallowed for the search service. Currently, the only supported value is 'All' to disable all possible data export scenarios with more fine grained controls planned for the future. + /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. + /// Network-specific rules that determine how the search service may be reached. /// Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. /// When set to true, calls to the search service will not be permitted to utilize API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined. /// Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. - /// Sets options that control the availability of semantic search. This configuration is only possible for certain Azure AI Search SKUs in certain locations. - /// The list of private endpoint connections to the Azure AI Search service. - /// The list of shared private link resources managed by the Azure AI Search service. - /// A system generated property representing the service's etag that can be for optimistic concurrency control during updates. + /// The list of private endpoint connections to the search service. + /// Sets options that control the availability of semantic search. This configuration is only possible for certain search SKUs in certain locations. + /// The list of shared private link resources managed by the search service. /// Indicates whether or not the search service has an upgrade available. /// The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. /// A new instance for mocking. - public static SearchServiceData SearchServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SearchServiceSkuName? searchSkuName = null, ManagedServiceIdentity identity = null, int? replicaCount = null, int? partitionCount = null, Uri endpoint = null, SearchServiceHostingMode? hostingMode = null, SearchServiceComputeType? computeType = null, SearchServicePublicInternetAccess? publicInternetAccess = null, SearchServiceStatus? status = null, string statusDetails = null, SearchServiceProvisioningState? provisioningState = null, SearchServiceNetworkRuleSet networkRuleSet = null, IEnumerable disabledDataExfiltrationOptions = null, SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = null, SearchAadAuthDataPlaneAuthOptions authOptions = null, SearchSemanticSearch? semanticSearch = null, IEnumerable privateEndpointConnections = null, IEnumerable sharedPrivateLinkResources = null, ETag? eTag = null, bool? isUpgradeAvailable = null, DateTimeOffset? serviceUpgradeOn = null) + public static SearchServiceData SearchServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SearchServiceSkuName? searchSkuName = null, ManagedServiceIdentity identity = null, int? replicaCount = null, int? partitionCount = null, SearchServiceHostingMode? hostingMode = null, SearchServicePublicInternetAccess? publicInternetAccess = null, SearchServiceStatus? status = null, string statusDetails = null, SearchServiceProvisioningState? provisioningState = null, IEnumerable ipRules = null, SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = null, SearchAadAuthDataPlaneAuthOptions authOptions = null, IEnumerable privateEndpointConnections = null, SearchSemanticSearch? semanticSearch = null, IEnumerable sharedPrivateLinkResources = null, bool? isUpgradeAvailable = null, DateTimeOffset? serviceUpgradeOn = null) { tags ??= new Dictionary(); - disabledDataExfiltrationOptions ??= new List(); + ipRules ??= new List(); privateEndpointConnections ??= new List(); sharedPrivateLinkResources ??= new List(); @@ -134,30 +78,26 @@ public static SearchServiceData SearchServiceData(ResourceIdentifier id = null, identity, replicaCount, partitionCount, - endpoint, hostingMode, - computeType, publicInternetAccess, status, statusDetails, provisioningState, - networkRuleSet, - disabledDataExfiltrationOptions?.ToList(), + ipRules != null ? new SearchServiceNetworkRuleSet(ipRules?.ToList(), serializedAdditionalRawData: null) : null, encryptionWithCmk, isLocalAuthDisabled, authOptions, - semanticSearch, privateEndpointConnections?.ToList(), + semanticSearch, sharedPrivateLinkResources?.ToList(), - eTag, isUpgradeAvailable, serviceUpgradeOn, serializedAdditionalRawData: null); } /// Initializes a new instance of . - /// Describes how a search service should enforce compliance if it finds objects that aren't encrypted with the customer-managed key. - /// Returns the status of search service compliance with respect to non-CMK-encrypted objects. If a service has more than one unencrypted object, and enforcement is enabled, the service is marked as noncompliant. + /// Describes how a search service should enforce having one or more non-customer-encrypted resources. + /// Describes whether the search service is compliant or not with respect to having non-customer-encrypted resources. If a service has more than one non-customer-encrypted resource and 'Enforcement' is 'enabled' then the service will be marked as 'nonCompliant'. /// A new instance for mocking. public static SearchEncryptionWithCmk SearchEncryptionWithCmk(SearchEncryptionWithCmkEnforcement? enforcement = null, SearchEncryptionComplianceStatus? encryptionComplianceStatus = null) { @@ -169,7 +109,7 @@ public static SearchEncryptionWithCmk SearchEncryptionWithCmk(SearchEncryptionWi /// The name. /// The resourceType. /// The systemData. - /// Describes the properties of an existing private endpoint connection to the Azure AI Search service. + /// Describes the properties of an existing private endpoint connection to the search service. /// A new instance for mocking. public static SearchPrivateEndpointConnectionData SearchPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SearchServicePrivateEndpointConnectionProperties properties = null) { @@ -187,7 +127,7 @@ public static SearchPrivateEndpointConnectionData SearchPrivateEndpointConnectio /// The name. /// The resourceType. /// The systemData. - /// Describes the properties of a shared private link resource managed by the Azure AI Search service. + /// Describes the properties of a Shared Private Link Resource managed by the search service. /// A new instance for mocking. public static SharedSearchServicePrivateLinkResourceData SharedSearchServicePrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SharedSearchServicePrivateLinkResourceProperties properties = null) { @@ -207,33 +147,29 @@ public static SharedSearchServicePrivateLinkResourceData SharedSearchServicePriv /// The systemData. /// The tags. /// The location. - /// The SKU of the search service, which determines price tier and capacity limits. This property is required when creating a new search service. - /// Details about the search service identity. A null value indicates that the search service has no identity assigned. + /// The SKU of the search service, which determines the billing rate and capacity limits. This property is required when creating a new search service. + /// The identity of the resource. Current supported identity types: None, SystemAssigned. /// The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. - /// The endpoint of the Azure AI Search service. /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. - /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. - /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. 'stopped': The search service is in a subscription that's disabled. If your service is in the degraded, disabled, or error states, it means the Azure AI Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. + /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. If your service is in the degraded, disabled, or error states, Microsoft is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. /// The details of the search service status. - /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'Succeeded' or 'Failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'Succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. - /// Network specific rules that determine how the Azure AI Search service may be reached. - /// A list of data exfiltration scenarios that are explicitly disallowed for the search service. Currently, the only supported value is 'All' to disable all possible data export scenarios with more fine grained controls planned for the future. + /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. + /// Network-specific rules that determine how the search service may be reached. /// Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. /// When set to true, calls to the search service will not be permitted to utilize API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined. /// Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. - /// Sets options that control the availability of semantic search. This configuration is only possible for certain Azure AI Search SKUs in certain locations. - /// The list of private endpoint connections to the Azure AI Search service. - /// The list of shared private link resources managed by the Azure AI Search service. - /// A system generated property representing the service's etag that can be for optimistic concurrency control during updates. + /// The list of private endpoint connections to the search service. + /// Sets options that control the availability of semantic search. This configuration is only possible for certain search SKUs in certain locations. + /// The list of shared private link resources managed by the search service. /// Indicates whether or not the search service has an upgrade available. /// The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. /// A new instance for mocking. - public static SearchServicePatch SearchServicePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SearchServiceSkuName? searchSkuName = null, ManagedServiceIdentity identity = null, int? replicaCount = null, int? partitionCount = null, Uri endpoint = null, SearchServiceHostingMode? hostingMode = null, SearchServiceComputeType? computeType = null, SearchServicePublicInternetAccess? publicInternetAccess = null, SearchServiceStatus? status = null, string statusDetails = null, SearchServiceProvisioningState? provisioningState = null, SearchServiceNetworkRuleSet networkRuleSet = null, IEnumerable disabledDataExfiltrationOptions = null, SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = null, SearchAadAuthDataPlaneAuthOptions authOptions = null, SearchSemanticSearch? semanticSearch = null, IEnumerable privateEndpointConnections = null, IEnumerable sharedPrivateLinkResources = null, ETag? eTag = null, bool? isUpgradeAvailable = null, DateTimeOffset? serviceUpgradeOn = null) + public static SearchServicePatch SearchServicePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SearchServiceSkuName? searchSkuName = null, ManagedServiceIdentity identity = null, int? replicaCount = null, int? partitionCount = null, SearchServiceHostingMode? hostingMode = null, SearchServicePublicInternetAccess? publicInternetAccess = null, SearchServiceStatus? status = null, string statusDetails = null, SearchServiceProvisioningState? provisioningState = null, IEnumerable ipRules = null, SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = null, SearchAadAuthDataPlaneAuthOptions authOptions = null, IEnumerable privateEndpointConnections = null, SearchSemanticSearch? semanticSearch = null, IEnumerable sharedPrivateLinkResources = null, bool? isUpgradeAvailable = null, DateTimeOffset? serviceUpgradeOn = null) { tags ??= new Dictionary(); - disabledDataExfiltrationOptions ??= new List(); + ipRules ??= new List(); privateEndpointConnections ??= new List(); sharedPrivateLinkResources ??= new List(); @@ -248,22 +184,18 @@ public static SearchServicePatch SearchServicePatch(ResourceIdentifier id = null identity, replicaCount, partitionCount, - endpoint, hostingMode, - computeType, publicInternetAccess, status, statusDetails, provisioningState, - networkRuleSet, - disabledDataExfiltrationOptions?.ToList(), + ipRules != null ? new SearchServiceNetworkRuleSet(ipRules?.ToList(), serializedAdditionalRawData: null) : null, encryptionWithCmk, isLocalAuthDisabled, authOptions, - semanticSearch, privateEndpointConnections?.ToList(), + semanticSearch, sharedPrivateLinkResources?.ToList(), - eTag, isUpgradeAvailable, serviceUpgradeOn, serializedAdditionalRawData: null); @@ -274,7 +206,7 @@ public static SearchServicePatch SearchServicePatch(ResourceIdentifier id = null /// The name. /// The resourceType. /// The systemData. - /// Describes the properties of a supported private link resource for the Azure AI Search service. + /// Describes the properties of a supported private link resource for the search service. /// A new instance for mocking. public static SearchPrivateLinkResource SearchPrivateLinkResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SearchPrivateLinkResourceProperties properties = null) { @@ -291,7 +223,7 @@ public static SearchPrivateLinkResource SearchPrivateLinkResource(ResourceIdenti /// The group ID of the private link resource. /// The list of required members of the private link resource. /// The list of required DNS zone names of the private link resource. - /// The list of resources that are onboarded to private link service, that are supported by Azure AI Search. + /// The list of resources that are onboarded to private link service and that are supported by search. /// A new instance for mocking. public static SearchPrivateLinkResourceProperties SearchPrivateLinkResourceProperties(string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null, IEnumerable shareablePrivateLinkResourceTypes = null) { @@ -303,8 +235,8 @@ public static SearchPrivateLinkResourceProperties SearchPrivateLinkResourcePrope } /// Initializes a new instance of . - /// The name of the resource type that has been onboarded to private link service, supported by Azure AI Search. - /// Describes the properties of a resource type that has been onboarded to private link service, supported by Azure AI Search. + /// The name of the resource type that has been onboarded to private link service and that's supported by search. + /// Describes the properties of a resource type that has been onboarded to private link service and that's supported by search. /// A new instance for mocking. public static ShareableSearchServicePrivateLinkResourceType ShareableSearchServicePrivateLinkResourceType(string name = null, ShareableSearchServicePrivateLinkResourceProperties properties = null) { @@ -312,9 +244,9 @@ public static ShareableSearchServicePrivateLinkResourceType ShareableSearchServi } /// Initializes a new instance of . - /// The resource provider type for the resource that has been onboarded to private link service, supported by Azure AI Search. - /// The resource provider group id for the resource that has been onboarded to private link service, supported by Azure AI Search. - /// The description of the resource type that has been onboarded to private link service, supported by Azure AI Search. + /// The resource provider type for the resource that has been onboarded to private link service and that's supported by search. + /// The resource provider group id for the resource that has been onboarded to private link service and that's supported by search. + /// The description of the resource type that has been onboarded to private link service and that's supported by search. /// A new instance for mocking. public static ShareableSearchServicePrivateLinkResourceProperties ShareableSearchServicePrivateLinkResourceProperties(string shareablePrivateLinkResourcePropertiesType = null, string groupId = null, string description = null) { @@ -366,33 +298,5 @@ public static QuotaUsageResultName QuotaUsageResultName(string value = null, str { return new QuotaUsageResultName(value, localizedValue, serializedAdditionalRawData: null); } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// The perimeter for a network security perimeter configuration. - /// The resource association for the network security perimeter. - /// The profile for a network security perimeter configuration. - /// - /// A new instance for mocking. - public static NetworkSecurityPerimeterConfigurationData NetworkSecurityPerimeterConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string provisioningState = null, NspConfigPerimeter networkSecurityPerimeter = null, NspConfigAssociation resourceAssociation = null, NspConfigProfile profile = null, IEnumerable provisioningIssues = null) - { - provisioningIssues ??= new List(); - - return new NetworkSecurityPerimeterConfigurationData( - id, - name, - resourceType, - systemData, - provisioningState, - networkSecurityPerimeter, - resourceAssociation, - profile, - provisioningIssues?.ToList(), - serializedAdditionalRawData: null); - } } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchArmClient.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchArmClient.cs index 4c730e16d190..f6ea19a73463 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchArmClient.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchArmClient.cs @@ -69,17 +69,5 @@ public virtual SharedSearchServicePrivateLinkResource GetSharedSearchServicePriv SharedSearchServicePrivateLinkResource.ValidateResourceId(id); return new SharedSearchServicePrivateLinkResource(Client, id); } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual NetworkSecurityPerimeterConfigurationResource GetNetworkSecurityPerimeterConfigurationResource(ResourceIdentifier id) - { - NetworkSecurityPerimeterConfigurationResource.ValidateResourceId(id); - return new NetworkSecurityPerimeterConfigurationResource(Client, id); - } } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchResourceGroupResource.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchResourceGroupResource.cs index 4d94d1a7a51d..e7b8479c6459 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchResourceGroupResource.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchResourceGroupResource.cs @@ -54,7 +54,7 @@ public virtual SearchServiceCollection GetSearchServices() /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -62,7 +62,7 @@ public virtual SearchServiceCollection GetSearchServices() /// /// /// - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is null. @@ -86,7 +86,7 @@ public virtual async Task> GetSearchServiceAsync /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -94,7 +94,7 @@ public virtual async Task> GetSearchServiceAsync /// /// /// - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is null. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchSubscriptionResource.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchSubscriptionResource.cs index cf985e713fee..4a21d6de3dca 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchSubscriptionResource.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchSubscriptionResource.cs @@ -63,7 +63,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -94,7 +94,7 @@ public virtual AsyncPageable GetSearchServicesAsync(Searc /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -125,7 +125,7 @@ public virtual Pageable GetSearchServices(SearchManagemen /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual async Task> CheckSe /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -199,7 +199,7 @@ public virtual Response CheckSearchServiceN } /// - /// Get a list of all Azure AI Search quota usages across the subscription. + /// Gets a list of all Search quota usages in the given subscription. /// /// /// Request Path @@ -211,7 +211,7 @@ public virtual Response CheckSearchServiceN /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -227,7 +227,7 @@ public virtual AsyncPageable GetUsagesBySubscriptionAsync(Azur } /// - /// Get a list of all Azure AI Search quota usages across the subscription. + /// Gets a list of all Search quota usages in the given subscription. /// /// /// Request Path @@ -239,7 +239,7 @@ public virtual AsyncPageable GetUsagesBySubscriptionAsync(Azur /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -267,7 +267,7 @@ public virtual Pageable GetUsagesBySubscription(AzureLocation /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -308,7 +308,7 @@ public virtual async Task> UsageBySubscriptionSkuAsyn /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchTenantResource.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchTenantResource.cs deleted file mode 100644 index c1c3e6a8d15c..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchTenantResource.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Threading; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Search.Models; - -namespace Azure.ResourceManager.Search.Mocking -{ - /// A class to add extension methods to TenantResource. - public partial class MockableSearchTenantResource : ArmResource - { - private ClientDiagnostics _offeringsClientDiagnostics; - private OfferingsRestOperations _offeringsRestClient; - - /// Initializes a new instance of the class for mocking. - protected MockableSearchTenantResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal MockableSearchTenantResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - } - - private ClientDiagnostics OfferingsClientDiagnostics => _offeringsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Search", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private OfferingsRestOperations OfferingsRestClient => _offeringsRestClient ??= new OfferingsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// - /// Lists all of the features and SKUs offered by the Azure AI Search service in each region. - /// - /// - /// Request Path - /// /providers/Microsoft.Search/offerings - /// - /// - /// Operation Id - /// Offerings_List - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetOfferingsAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => OfferingsRestClient.CreateListRequest(); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => SearchServiceOfferingsByRegion.DeserializeSearchServiceOfferingsByRegion(e), OfferingsClientDiagnostics, Pipeline, "MockableSearchTenantResource.GetOfferings", "value", null, cancellationToken); - } - - /// - /// Lists all of the features and SKUs offered by the Azure AI Search service in each region. - /// - /// - /// Request Path - /// /providers/Microsoft.Search/offerings - /// - /// - /// Operation Id - /// Offerings_List - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetOfferings(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => OfferingsRestClient.CreateListRequest(); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => SearchServiceOfferingsByRegion.DeserializeSearchServiceOfferingsByRegion(e), OfferingsClientDiagnostics, Pipeline, "MockableSearchTenantResource.GetOfferings", "value", null, cancellationToken); - } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs index cd83cb293597..b99028bf5406 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs @@ -33,11 +33,6 @@ private static MockableSearchSubscriptionResource GetMockableSearchSubscriptionR return resource.GetCachedClient(client => new MockableSearchSubscriptionResource(client, resource.Id)); } - private static MockableSearchTenantResource GetMockableSearchTenantResource(ArmResource resource) - { - return resource.GetCachedClient(client => new MockableSearchTenantResource(client, resource.Id)); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -95,25 +90,6 @@ public static SharedSearchServicePrivateLinkResource GetSharedSearchServicePriva return GetMockableSearchArmClient(client).GetSharedSearchServicePrivateLinkResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static NetworkSecurityPerimeterConfigurationResource GetNetworkSecurityPerimeterConfigurationResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableSearchArmClient(client).GetNetworkSecurityPerimeterConfigurationResource(id); - } - /// /// Gets a collection of SearchServiceResources in the ResourceGroupResource. /// @@ -144,7 +120,7 @@ public static SearchServiceCollection GetSearchServices(this ResourceGroupResour /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -157,7 +133,7 @@ public static SearchServiceCollection GetSearchServices(this ResourceGroupResour /// /// /// The instance the method will execute against. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// or is null. @@ -183,7 +159,7 @@ public static async Task> GetSearchServiceAsync( /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -196,7 +172,7 @@ public static async Task> GetSearchServiceAsync( /// /// /// The instance the method will execute against. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// or is null. @@ -222,7 +198,7 @@ public static Response GetSearchService(this ResourceGrou /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -259,7 +235,7 @@ public static AsyncPageable GetSearchServicesAsync(this S /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -296,7 +272,7 @@ public static Pageable GetSearchServices(this Subscriptio /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -333,7 +309,7 @@ public static async Task> CheckSea /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -358,7 +334,7 @@ public static Response CheckSearchServiceNa } /// - /// Get a list of all Azure AI Search quota usages across the subscription. + /// Gets a list of all Search quota usages in the given subscription. /// /// /// Request Path @@ -370,7 +346,7 @@ public static Response CheckSearchServiceNa /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -392,7 +368,7 @@ public static AsyncPageable GetUsagesBySubscriptionAsync(this } /// - /// Get a list of all Azure AI Search quota usages across the subscription. + /// Gets a list of all Search quota usages in the given subscription. /// /// /// Request Path @@ -404,7 +380,7 @@ public static AsyncPageable GetUsagesBySubscriptionAsync(this /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -438,7 +414,7 @@ public static Pageable GetUsagesBySubscription(this Subscripti /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -473,7 +449,7 @@ public static async Task> UsageBySubscriptionSkuAsync /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -494,69 +470,5 @@ public static Response UsageBySubscriptionSku(this Subscriptio return GetMockableSearchSubscriptionResource(subscriptionResource).UsageBySubscriptionSku(location, skuName, searchManagementRequestOptions, cancellationToken); } - - /// - /// Lists all of the features and SKUs offered by the Azure AI Search service in each region. - /// - /// - /// Request Path - /// /providers/Microsoft.Search/offerings - /// - /// - /// Operation Id - /// Offerings_List - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetOfferingsAsync(this TenantResource tenantResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tenantResource, nameof(tenantResource)); - - return GetMockableSearchTenantResource(tenantResource).GetOfferingsAsync(cancellationToken); - } - - /// - /// Lists all of the features and SKUs offered by the Azure AI Search service in each region. - /// - /// - /// Request Path - /// /providers/Microsoft.Search/offerings - /// - /// - /// Operation Id - /// Offerings_List - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetOfferings(this TenantResource tenantResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tenantResource, nameof(tenantResource)); - - return GetMockableSearchTenantResource(tenantResource).GetOfferings(cancellationToken); - } } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ListQueryKeysResult.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ListQueryKeysResult.cs index 09187f707f64..2e3556b4a2c1 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ListQueryKeysResult.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ListQueryKeysResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Response containing the query API keys for a given Azure AI Search service. + /// Response containing the query API keys for a given search service. internal partial class ListQueryKeysResult { /// @@ -52,7 +52,7 @@ internal ListQueryKeysResult() } /// Initializes a new instance of . - /// The query keys for the Azure AI Search service. + /// The query keys for the search service. /// Request URL that can be used to query next page of query keys. Returned when the total number of requested query keys exceed maximum page size. /// Keeps track of any properties unknown to the library. internal ListQueryKeysResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) @@ -62,7 +62,7 @@ internal ListQueryKeysResult(IReadOnlyList value, string _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The query keys for the Azure AI Search service. + /// The query keys for the search service. public IReadOnlyList Value { get; } /// Request URL that can be used to query next page of query keys. Returned when the total number of requested query keys exceed maximum page size. public string NextLink { get; } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.Serialization.cs deleted file mode 100644 index dec8cc71aadb..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// 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.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - internal partial class NetworkSecurityPerimeterConfigurationListResult : 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(NetworkSecurityPerimeterConfigurationListResult)} does not support writing '{format}' format."); - } - - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - 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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - NetworkSecurityPerimeterConfigurationListResult 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(NetworkSecurityPerimeterConfigurationListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeNetworkSecurityPerimeterConfigurationListResult(document.RootElement, options); - } - - internal static NetworkSecurityPerimeterConfigurationListResult DeserializeNetworkSecurityPerimeterConfigurationListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new NetworkSecurityPerimeterConfigurationListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" value: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Value)) - { - if (Value.Any()) - { - builder.Append(" value: "); - builder.AppendLine("["); - foreach (var item in Value) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" nextLink: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(NextLink)) - { - builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationListResult)} does not support writing '{options.Format}' format."); - } - } - - NetworkSecurityPerimeterConfigurationListResult 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeNetworkSecurityPerimeterConfigurationListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.cs deleted file mode 100644 index 95eea809f89e..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NetworkSecurityPerimeterConfigurationListResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.Search.Models -{ - /// A list of network security perimeter configurations for a server. - internal partial class NetworkSecurityPerimeterConfigurationListResult - { - /// - /// 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 . - internal NetworkSecurityPerimeterConfigurationListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Array of results. - /// Link to retrieve next page of results. - /// Keeps track of any properties unknown to the library. - internal NetworkSecurityPerimeterConfigurationListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Array of results. - public IReadOnlyList Value { get; } - /// Link to retrieve next page of results. - public string NextLink { get; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAccessRule.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAccessRule.Serialization.cs deleted file mode 100644 index 57a699898abc..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAccessRule.Serialization.cs +++ /dev/null @@ -1,200 +0,0 @@ -// 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; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - public partial class NspConfigAccessRule : 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(NspConfigAccessRule)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, 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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - NspConfigAccessRule 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(NspConfigAccessRule)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeNspConfigAccessRule(document.RootElement, options); - } - - internal static NspConfigAccessRule DeserializeNspConfigAccessRule(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - NspConfigAccessRuleProperties properties = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = NspConfigAccessRuleProperties.DeserializeNspConfigAccessRuleProperties(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new NspConfigAccessRule(name, properties, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" properties: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Properties)) - { - builder.Append(" properties: "); - BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(NspConfigAccessRule)} does not support writing '{options.Format}' format."); - } - } - - NspConfigAccessRule 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeNspConfigAccessRule(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(NspConfigAccessRule)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAccessRule.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAccessRule.cs deleted file mode 100644 index 8789b252939c..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAccessRule.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.Search.Models -{ - /// An access rule for a network security perimeter configuration. - public partial class NspConfigAccessRule - { - /// - /// 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 NspConfigAccessRule() - { - } - - /// Initializes a new instance of . - /// - /// The properties for the access rules in a network security perimeter configuration. - /// Keeps track of any properties unknown to the library. - internal NspConfigAccessRule(string name, NspConfigAccessRuleProperties properties, IDictionary serializedAdditionalRawData) - { - Name = name; - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets or sets the name. - [WirePath("name")] - public string Name { get; set; } - /// The properties for the access rules in a network security perimeter configuration. - [WirePath("properties")] - public NspConfigAccessRuleProperties Properties { get; set; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAccessRuleProperties.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAccessRuleProperties.Serialization.cs deleted file mode 100644 index 8c52af177db9..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAccessRuleProperties.Serialization.cs +++ /dev/null @@ -1,408 +0,0 @@ -// 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.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - public partial class NspConfigAccessRuleProperties : 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(NspConfigAccessRuleProperties)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Direction)) - { - writer.WritePropertyName("direction"u8); - writer.WriteStringValue(Direction); - } - if (Optional.IsCollectionDefined(AddressPrefixes)) - { - writer.WritePropertyName("addressPrefixes"u8); - writer.WriteStartArray(); - foreach (var item in AddressPrefixes) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(FullyQualifiedDomainNames)) - { - writer.WritePropertyName("fullyQualifiedDomainNames"u8); - writer.WriteStartArray(); - foreach (var item in FullyQualifiedDomainNames) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Subscriptions)) - { - writer.WritePropertyName("subscriptions"u8); - writer.WriteStartArray(); - foreach (var item in Subscriptions) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(NetworkSecurityPerimeters)) - { - writer.WritePropertyName("networkSecurityPerimeters"u8); - writer.WriteStartArray(); - foreach (var item in NetworkSecurityPerimeters) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - 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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - NspConfigAccessRuleProperties 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(NspConfigAccessRuleProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeNspConfigAccessRuleProperties(document.RootElement, options); - } - - internal static NspConfigAccessRuleProperties DeserializeNspConfigAccessRuleProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string direction = default; - IList addressPrefixes = default; - IList fullyQualifiedDomainNames = default; - IList subscriptions = default; - IList networkSecurityPerimeters = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("direction"u8)) - { - direction = property.Value.GetString(); - continue; - } - if (property.NameEquals("addressPrefixes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - addressPrefixes = array; - continue; - } - if (property.NameEquals("fullyQualifiedDomainNames"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - fullyQualifiedDomainNames = array; - continue; - } - if (property.NameEquals("subscriptions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - subscriptions = array; - continue; - } - if (property.NameEquals("networkSecurityPerimeters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(NspConfigNetworkSecurityPerimeterRule.DeserializeNspConfigNetworkSecurityPerimeterRule(item, options)); - } - networkSecurityPerimeters = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new NspConfigAccessRuleProperties( - direction, - addressPrefixes ?? new ChangeTrackingList(), - fullyQualifiedDomainNames ?? new ChangeTrackingList(), - subscriptions ?? new ChangeTrackingList(), - networkSecurityPerimeters ?? new ChangeTrackingList(), - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Direction), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" direction: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Direction)) - { - builder.Append(" direction: "); - if (Direction.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Direction}'''"); - } - else - { - builder.AppendLine($"'{Direction}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AddressPrefixes), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" addressPrefixes: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(AddressPrefixes)) - { - if (AddressPrefixes.Any()) - { - builder.Append(" addressPrefixes: "); - builder.AppendLine("["); - foreach (var item in AddressPrefixes) - { - if (item == null) - { - builder.Append("null"); - continue; - } - if (item.Contains(Environment.NewLine)) - { - builder.AppendLine(" '''"); - builder.AppendLine($"{item}'''"); - } - else - { - builder.AppendLine($" '{item}'"); - } - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(FullyQualifiedDomainNames), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" fullyQualifiedDomainNames: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(FullyQualifiedDomainNames)) - { - if (FullyQualifiedDomainNames.Any()) - { - builder.Append(" fullyQualifiedDomainNames: "); - builder.AppendLine("["); - foreach (var item in FullyQualifiedDomainNames) - { - if (item == null) - { - builder.Append("null"); - continue; - } - if (item.Contains(Environment.NewLine)) - { - builder.AppendLine(" '''"); - builder.AppendLine($"{item}'''"); - } - else - { - builder.AppendLine($" '{item}'"); - } - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Subscriptions), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" subscriptions: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Subscriptions)) - { - if (Subscriptions.Any()) - { - builder.Append(" subscriptions: "); - builder.AppendLine("["); - foreach (var item in Subscriptions) - { - if (item == null) - { - builder.Append("null"); - continue; - } - if (item.Contains(Environment.NewLine)) - { - builder.AppendLine(" '''"); - builder.AppendLine($"{item}'''"); - } - else - { - builder.AppendLine($" '{item}'"); - } - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkSecurityPerimeters), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" networkSecurityPerimeters: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(NetworkSecurityPerimeters)) - { - if (NetworkSecurityPerimeters.Any()) - { - builder.Append(" networkSecurityPerimeters: "); - builder.AppendLine("["); - foreach (var item in NetworkSecurityPerimeters) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " networkSecurityPerimeters: "); - } - builder.AppendLine(" ]"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(NspConfigAccessRuleProperties)} does not support writing '{options.Format}' format."); - } - } - - NspConfigAccessRuleProperties 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeNspConfigAccessRuleProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(NspConfigAccessRuleProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAccessRuleProperties.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAccessRuleProperties.cs deleted file mode 100644 index 87685a19a462..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAccessRuleProperties.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.Search.Models -{ - /// The properties for the access rules in a network security perimeter configuration. - public partial class NspConfigAccessRuleProperties - { - /// - /// 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 NspConfigAccessRuleProperties() - { - AddressPrefixes = new ChangeTrackingList(); - FullyQualifiedDomainNames = new ChangeTrackingList(); - Subscriptions = new ChangeTrackingList(); - NetworkSecurityPerimeters = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// Keeps track of any properties unknown to the library. - internal NspConfigAccessRuleProperties(string direction, IList addressPrefixes, IList fullyQualifiedDomainNames, IList subscriptions, IList networkSecurityPerimeters, IDictionary serializedAdditionalRawData) - { - Direction = direction; - AddressPrefixes = addressPrefixes; - FullyQualifiedDomainNames = fullyQualifiedDomainNames; - Subscriptions = subscriptions; - NetworkSecurityPerimeters = networkSecurityPerimeters; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets or sets the direction. - [WirePath("direction")] - public string Direction { get; set; } - /// Gets the address prefixes. - [WirePath("addressPrefixes")] - public IList AddressPrefixes { get; } - /// Gets the fully qualified domain names. - [WirePath("fullyQualifiedDomainNames")] - public IList FullyQualifiedDomainNames { get; } - /// Gets the subscriptions. - [WirePath("subscriptions")] - public IList Subscriptions { get; } - /// Gets the network security perimeters. - [WirePath("networkSecurityPerimeters")] - public IList NetworkSecurityPerimeters { get; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAssociation.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAssociation.Serialization.cs deleted file mode 100644 index 98ec7d828860..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAssociation.Serialization.cs +++ /dev/null @@ -1,204 +0,0 @@ -// 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; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - public partial class NspConfigAssociation : 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(NspConfigAssociation)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(AccessMode)) - { - writer.WritePropertyName("accessMode"u8); - writer.WriteStringValue(AccessMode); - } - 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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - NspConfigAssociation 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(NspConfigAssociation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeNspConfigAssociation(document.RootElement, options); - } - - internal static NspConfigAssociation DeserializeNspConfigAssociation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string accessMode = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("accessMode"u8)) - { - accessMode = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new NspConfigAssociation(name, accessMode, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessMode), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" accessMode: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(AccessMode)) - { - builder.Append(" accessMode: "); - if (AccessMode.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{AccessMode}'''"); - } - else - { - builder.AppendLine($"'{AccessMode}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(NspConfigAssociation)} does not support writing '{options.Format}' format."); - } - } - - NspConfigAssociation 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeNspConfigAssociation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(NspConfigAssociation)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAssociation.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAssociation.cs deleted file mode 100644 index 1421196bbeb0..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigAssociation.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.Search.Models -{ - /// The resource association for the network security perimeter. - public partial class NspConfigAssociation - { - /// - /// 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 NspConfigAssociation() - { - } - - /// Initializes a new instance of . - /// - /// - /// Keeps track of any properties unknown to the library. - internal NspConfigAssociation(string name, string accessMode, IDictionary serializedAdditionalRawData) - { - Name = name; - AccessMode = accessMode; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets or sets the name. - [WirePath("name")] - public string Name { get; set; } - /// Gets or sets the access mode. - [WirePath("accessMode")] - public string AccessMode { get; set; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigNetworkSecurityPerimeterRule.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigNetworkSecurityPerimeterRule.Serialization.cs deleted file mode 100644 index 8dde974a7faa..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigNetworkSecurityPerimeterRule.Serialization.cs +++ /dev/null @@ -1,234 +0,0 @@ -// 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; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - public partial class NspConfigNetworkSecurityPerimeterRule : 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(NspConfigNetworkSecurityPerimeterRule)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(PerimeterGuid)) - { - writer.WritePropertyName("perimeterGuid"u8); - writer.WriteStringValue(PerimeterGuid); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - NspConfigNetworkSecurityPerimeterRule 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(NspConfigNetworkSecurityPerimeterRule)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeNspConfigNetworkSecurityPerimeterRule(document.RootElement, options); - } - - internal static NspConfigNetworkSecurityPerimeterRule DeserializeNspConfigNetworkSecurityPerimeterRule(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string perimeterGuid = default; - AzureLocation? location = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("perimeterGuid"u8)) - { - perimeterGuid = property.Value.GetString(); - continue; - } - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new NspConfigNetworkSecurityPerimeterRule(id, perimeterGuid, location, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" id: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Id)) - { - builder.Append(" id: "); - if (Id.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Id}'''"); - } - else - { - builder.AppendLine($"'{Id}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PerimeterGuid), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" perimeterGuid: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(PerimeterGuid)) - { - builder.Append(" perimeterGuid: "); - if (PerimeterGuid.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{PerimeterGuid}'''"); - } - else - { - builder.AppendLine($"'{PerimeterGuid}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" location: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Location)) - { - builder.Append(" location: "); - builder.AppendLine($"'{Location.Value.ToString()}'"); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(NspConfigNetworkSecurityPerimeterRule)} does not support writing '{options.Format}' format."); - } - } - - NspConfigNetworkSecurityPerimeterRule 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeNspConfigNetworkSecurityPerimeterRule(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(NspConfigNetworkSecurityPerimeterRule)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigNetworkSecurityPerimeterRule.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigNetworkSecurityPerimeterRule.cs deleted file mode 100644 index 46d3a5173eda..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigNetworkSecurityPerimeterRule.cs +++ /dev/null @@ -1,77 +0,0 @@ -// 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.Search.Models -{ - /// The network security perimeter properties present in a configuration rule. - public partial class NspConfigNetworkSecurityPerimeterRule - { - /// - /// 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 NspConfigNetworkSecurityPerimeterRule() - { - } - - /// Initializes a new instance of . - /// - /// - /// - /// Keeps track of any properties unknown to the library. - internal NspConfigNetworkSecurityPerimeterRule(string id, string perimeterGuid, AzureLocation? location, IDictionary serializedAdditionalRawData) - { - Id = id; - PerimeterGuid = perimeterGuid; - Location = location; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets or sets the id. - [WirePath("id")] - public string Id { get; set; } - /// Gets or sets the perimeter guid. - [WirePath("perimeterGuid")] - public string PerimeterGuid { get; set; } - /// Gets or sets the location. - [WirePath("location")] - public AzureLocation? Location { get; set; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigPerimeter.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigPerimeter.Serialization.cs deleted file mode 100644 index ed5c1ddc899c..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigPerimeter.Serialization.cs +++ /dev/null @@ -1,234 +0,0 @@ -// 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; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - public partial class NspConfigPerimeter : 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(NspConfigPerimeter)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(PerimeterGuid)) - { - writer.WritePropertyName("perimeterGuid"u8); - writer.WriteStringValue(PerimeterGuid); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - NspConfigPerimeter 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(NspConfigPerimeter)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeNspConfigPerimeter(document.RootElement, options); - } - - internal static NspConfigPerimeter DeserializeNspConfigPerimeter(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string perimeterGuid = default; - AzureLocation? location = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("perimeterGuid"u8)) - { - perimeterGuid = property.Value.GetString(); - continue; - } - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new NspConfigPerimeter(id, perimeterGuid, location, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" id: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Id)) - { - builder.Append(" id: "); - if (Id.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Id}'''"); - } - else - { - builder.AppendLine($"'{Id}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PerimeterGuid), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" perimeterGuid: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(PerimeterGuid)) - { - builder.Append(" perimeterGuid: "); - if (PerimeterGuid.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{PerimeterGuid}'''"); - } - else - { - builder.AppendLine($"'{PerimeterGuid}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" location: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Location)) - { - builder.Append(" location: "); - builder.AppendLine($"'{Location.Value.ToString()}'"); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(NspConfigPerimeter)} does not support writing '{options.Format}' format."); - } - } - - NspConfigPerimeter 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeNspConfigPerimeter(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(NspConfigPerimeter)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigPerimeter.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigPerimeter.cs deleted file mode 100644 index dfaa8456b908..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigPerimeter.cs +++ /dev/null @@ -1,77 +0,0 @@ -// 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.Search.Models -{ - /// The perimeter for a network security perimeter configuration. - public partial class NspConfigPerimeter - { - /// - /// 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 NspConfigPerimeter() - { - } - - /// Initializes a new instance of . - /// - /// - /// - /// Keeps track of any properties unknown to the library. - internal NspConfigPerimeter(string id, string perimeterGuid, AzureLocation? location, IDictionary serializedAdditionalRawData) - { - Id = id; - PerimeterGuid = perimeterGuid; - Location = location; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets or sets the id. - [WirePath("id")] - public string Id { get; set; } - /// Gets or sets the perimeter guid. - [WirePath("perimeterGuid")] - public string PerimeterGuid { get; set; } - /// Gets or sets the location. - [WirePath("location")] - public AzureLocation? Location { get; set; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigProfile.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigProfile.Serialization.cs deleted file mode 100644 index 6b6c85e383b7..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigProfile.Serialization.cs +++ /dev/null @@ -1,253 +0,0 @@ -// 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.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - public partial class NspConfigProfile : 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(NspConfigProfile)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(AccessRulesVersion)) - { - writer.WritePropertyName("accessRulesVersion"u8); - writer.WriteStringValue(AccessRulesVersion); - } - if (Optional.IsCollectionDefined(AccessRules)) - { - writer.WritePropertyName("accessRules"u8); - writer.WriteStartArray(); - foreach (var item in AccessRules) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - 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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - NspConfigProfile 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(NspConfigProfile)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeNspConfigProfile(document.RootElement, options); - } - - internal static NspConfigProfile DeserializeNspConfigProfile(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string accessRulesVersion = default; - IList accessRules = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("accessRulesVersion"u8)) - { - accessRulesVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("accessRules"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(NspConfigAccessRule.DeserializeNspConfigAccessRule(item, options)); - } - accessRules = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new NspConfigProfile(name, accessRulesVersion, accessRules ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessRulesVersion), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" accessRulesVersion: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(AccessRulesVersion)) - { - builder.Append(" accessRulesVersion: "); - if (AccessRulesVersion.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{AccessRulesVersion}'''"); - } - else - { - builder.AppendLine($"'{AccessRulesVersion}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AccessRules), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" accessRules: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(AccessRules)) - { - if (AccessRules.Any()) - { - builder.Append(" accessRules: "); - builder.AppendLine("["); - foreach (var item in AccessRules) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " accessRules: "); - } - builder.AppendLine(" ]"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(NspConfigProfile)} does not support writing '{options.Format}' format."); - } - } - - NspConfigProfile 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeNspConfigProfile(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(NspConfigProfile)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigProfile.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigProfile.cs deleted file mode 100644 index a41a764daf36..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspConfigProfile.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.Search.Models -{ - /// The profile for a network security perimeter configuration. - public partial class NspConfigProfile - { - /// - /// 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 NspConfigProfile() - { - AccessRules = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// - /// - /// Keeps track of any properties unknown to the library. - internal NspConfigProfile(string name, string accessRulesVersion, IList accessRules, IDictionary serializedAdditionalRawData) - { - Name = name; - AccessRulesVersion = accessRulesVersion; - AccessRules = accessRules; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets or sets the name. - [WirePath("name")] - public string Name { get; set; } - /// Gets or sets the access rules version. - [WirePath("accessRulesVersion")] - public string AccessRulesVersion { get; set; } - /// Gets the access rules. - [WirePath("accessRules")] - public IList AccessRules { get; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspProvisioningIssue.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspProvisioningIssue.Serialization.cs deleted file mode 100644 index bf19425134f6..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspProvisioningIssue.Serialization.cs +++ /dev/null @@ -1,200 +0,0 @@ -// 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; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - public partial class NspProvisioningIssue : 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(NspProvisioningIssue)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, 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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - NspProvisioningIssue 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(NspProvisioningIssue)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeNspProvisioningIssue(document.RootElement, options); - } - - internal static NspProvisioningIssue DeserializeNspProvisioningIssue(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - NspProvisioningIssueProperties properties = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = NspProvisioningIssueProperties.DeserializeNspProvisioningIssueProperties(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new NspProvisioningIssue(name, properties, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" properties: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Properties)) - { - builder.Append(" properties: "); - BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(NspProvisioningIssue)} does not support writing '{options.Format}' format."); - } - } - - NspProvisioningIssue 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeNspProvisioningIssue(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(NspProvisioningIssue)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspProvisioningIssue.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspProvisioningIssue.cs deleted file mode 100644 index 0fcf21ecac6a..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspProvisioningIssue.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.Search.Models -{ - /// An object to describe any issues with provisioning network security perimeters to a search service. - public partial class NspProvisioningIssue - { - /// - /// 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 NspProvisioningIssue() - { - } - - /// Initializes a new instance of . - /// - /// The properties to describe any issues with provisioning network security perimeters to a search service. - /// Keeps track of any properties unknown to the library. - internal NspProvisioningIssue(string name, NspProvisioningIssueProperties properties, IDictionary serializedAdditionalRawData) - { - Name = name; - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets or sets the name. - [WirePath("name")] - public string Name { get; set; } - /// The properties to describe any issues with provisioning network security perimeters to a search service. - [WirePath("properties")] - public NspProvisioningIssueProperties Properties { get; set; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspProvisioningIssueProperties.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspProvisioningIssueProperties.Serialization.cs deleted file mode 100644 index b4611888f98a..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspProvisioningIssueProperties.Serialization.cs +++ /dev/null @@ -1,367 +0,0 @@ -// 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.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - public partial class NspProvisioningIssueProperties : 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(NspProvisioningIssueProperties)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(IssueType)) - { - writer.WritePropertyName("issueType"u8); - writer.WriteStringValue(IssueType); - } - if (Optional.IsDefined(Severity)) - { - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(SuggestedResourceIds)) - { - writer.WritePropertyName("suggestedResourceIds"u8); - writer.WriteStartArray(); - foreach (var item in SuggestedResourceIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(SuggestedAccessRules)) - { - writer.WritePropertyName("suggestedAccessRules"u8); - writer.WriteStartArray(); - foreach (var item in SuggestedAccessRules) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - 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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - NspProvisioningIssueProperties 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(NspProvisioningIssueProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeNspProvisioningIssueProperties(document.RootElement, options); - } - - internal static NspProvisioningIssueProperties DeserializeNspProvisioningIssueProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string issueType = default; - string severity = default; - string description = default; - IList suggestedResourceIds = default; - IList suggestedAccessRules = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("issueType"u8)) - { - issueType = property.Value.GetString(); - continue; - } - if (property.NameEquals("severity"u8)) - { - severity = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("suggestedResourceIds"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - suggestedResourceIds = array; - continue; - } - if (property.NameEquals("suggestedAccessRules"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - suggestedAccessRules = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new NspProvisioningIssueProperties( - issueType, - severity, - description, - suggestedResourceIds ?? new ChangeTrackingList(), - suggestedAccessRules ?? new ChangeTrackingList(), - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IssueType), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" issueType: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(IssueType)) - { - builder.Append(" issueType: "); - if (IssueType.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{IssueType}'''"); - } - else - { - builder.AppendLine($"'{IssueType}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Severity), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" severity: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Severity)) - { - builder.Append(" severity: "); - if (Severity.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Severity}'''"); - } - else - { - builder.AppendLine($"'{Severity}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" description: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Description)) - { - builder.Append(" description: "); - if (Description.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Description}'''"); - } - else - { - builder.AppendLine($"'{Description}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SuggestedResourceIds), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" suggestedResourceIds: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(SuggestedResourceIds)) - { - if (SuggestedResourceIds.Any()) - { - builder.Append(" suggestedResourceIds: "); - builder.AppendLine("["); - foreach (var item in SuggestedResourceIds) - { - if (item == null) - { - builder.Append("null"); - continue; - } - if (item.Contains(Environment.NewLine)) - { - builder.AppendLine(" '''"); - builder.AppendLine($"{item}'''"); - } - else - { - builder.AppendLine($" '{item}'"); - } - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SuggestedAccessRules), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" suggestedAccessRules: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(SuggestedAccessRules)) - { - if (SuggestedAccessRules.Any()) - { - builder.Append(" suggestedAccessRules: "); - builder.AppendLine("["); - foreach (var item in SuggestedAccessRules) - { - if (item == null) - { - builder.Append("null"); - continue; - } - if (item.Contains(Environment.NewLine)) - { - builder.AppendLine(" '''"); - builder.AppendLine($"{item}'''"); - } - else - { - builder.AppendLine($" '{item}'"); - } - } - builder.AppendLine(" ]"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(NspProvisioningIssueProperties)} does not support writing '{options.Format}' format."); - } - } - - NspProvisioningIssueProperties 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeNspProvisioningIssueProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(NspProvisioningIssueProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspProvisioningIssueProperties.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspProvisioningIssueProperties.cs deleted file mode 100644 index 0651a3b3263e..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/NspProvisioningIssueProperties.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.Search.Models -{ - /// The properties to describe any issues with provisioning network security perimeters to a search service. - public partial class NspProvisioningIssueProperties - { - /// - /// 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 NspProvisioningIssueProperties() - { - SuggestedResourceIds = new ChangeTrackingList(); - SuggestedAccessRules = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// Keeps track of any properties unknown to the library. - internal NspProvisioningIssueProperties(string issueType, string severity, string description, IList suggestedResourceIds, IList suggestedAccessRules, IDictionary serializedAdditionalRawData) - { - IssueType = issueType; - Severity = severity; - Description = description; - SuggestedResourceIds = suggestedResourceIds; - SuggestedAccessRules = suggestedAccessRules; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets or sets the issue type. - [WirePath("issueType")] - public string IssueType { get; set; } - /// Gets or sets the severity. - [WirePath("severity")] - public string Severity { get; set; } - /// Gets or sets the description. - [WirePath("description")] - public string Description { get; set; } - /// Gets the suggested resource ids. - [WirePath("suggestedResourceIds")] - public IList SuggestedResourceIds { get; } - /// Gets the suggested access rules. - [WirePath("suggestedAccessRules")] - public IList SuggestedAccessRules { get; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsListResult.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsListResult.Serialization.cs deleted file mode 100644 index 67df0075d123..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsListResult.Serialization.cs +++ /dev/null @@ -1,219 +0,0 @@ -// 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.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - internal partial class OfferingsListResult : 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(OfferingsListResult)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - 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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - OfferingsListResult 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(OfferingsListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOfferingsListResult(document.RootElement, options); - } - - internal static OfferingsListResult DeserializeOfferingsListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SearchServiceOfferingsByRegion.DeserializeSearchServiceOfferingsByRegion(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new OfferingsListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" value: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Value)) - { - if (Value.Any()) - { - builder.Append(" value: "); - builder.AppendLine("["); - foreach (var item in Value) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" nextLink: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(NextLink)) - { - builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(OfferingsListResult)} does not support writing '{options.Format}' format."); - } - } - - OfferingsListResult 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeOfferingsListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OfferingsListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsListResult.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsListResult.cs deleted file mode 100644 index 95dbfe7ae467..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsListResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.Search.Models -{ - /// The response containing a list of features and SKUs offered in various regions. - internal partial class OfferingsListResult - { - /// - /// 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 . - internal OfferingsListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The list of regions with their respective features and SKUs offered. - /// The URL to get the next set of offerings, if any. - /// Keeps track of any properties unknown to the library. - internal OfferingsListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The list of regions with their respective features and SKUs offered. - public IReadOnlyList Value { get; } - /// The URL to get the next set of offerings, if any. - public string NextLink { get; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchBypass.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchBypass.cs deleted file mode 100644 index 9096be9bac97..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchBypass.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Search.Models -{ - /// Possible origins of inbound traffic that can bypass the rules defined in the 'ipRules' section. - public readonly partial struct SearchBypass : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SearchBypass(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string AzurePortalValue = "AzurePortal"; - private const string AzureServicesValue = "AzureServices"; - - /// Indicates that no origin can bypass the rules defined in the 'ipRules' section. This is the default. - public static SearchBypass None { get; } = new SearchBypass(NoneValue); - /// Indicates that requests originating from the Azure portal can bypass the rules defined in the 'ipRules' section. - public static SearchBypass AzurePortal { get; } = new SearchBypass(AzurePortalValue); - /// Indicates that requests originating from Azure trusted services can bypass the rules defined in the 'ipRules' section. - public static SearchBypass AzureServices { get; } = new SearchBypass(AzureServicesValue); - /// Determines if two values are the same. - public static bool operator ==(SearchBypass left, SearchBypass right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SearchBypass left, SearchBypass right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SearchBypass(string value) => new SearchBypass(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SearchBypass other && Equals(other); - /// - public bool Equals(SearchBypass 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/search/Azure.ResourceManager.Search/src/Generated/Models/SearchDisabledDataExfiltrationOption.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchDisabledDataExfiltrationOption.cs deleted file mode 100644 index 1ee16131fd4e..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchDisabledDataExfiltrationOption.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Search.Models -{ - /// A specific data exfiltration scenario that is disabled for the service. - public readonly partial struct SearchDisabledDataExfiltrationOption : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SearchDisabledDataExfiltrationOption(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AllValue = "All"; - - /// Indicates that all data exfiltration scenarios are disabled. - public static SearchDisabledDataExfiltrationOption All { get; } = new SearchDisabledDataExfiltrationOption(AllValue); - /// Determines if two values are the same. - public static bool operator ==(SearchDisabledDataExfiltrationOption left, SearchDisabledDataExfiltrationOption right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SearchDisabledDataExfiltrationOption left, SearchDisabledDataExfiltrationOption right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SearchDisabledDataExfiltrationOption(string value) => new SearchDisabledDataExfiltrationOption(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SearchDisabledDataExfiltrationOption other && Equals(other); - /// - public bool Equals(SearchDisabledDataExfiltrationOption 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/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionComplianceStatus.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionComplianceStatus.cs index 933e1148c068..a65b73e901a7 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionComplianceStatus.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionComplianceStatus.cs @@ -7,12 +7,12 @@ namespace Azure.ResourceManager.Search.Models { - /// Returns the status of search service compliance with respect to non-CMK-encrypted objects. If a service has more than one unencrypted object, and enforcement is enabled, the service is marked as noncompliant. + /// Describes whether the search service is compliant or not with respect to having non-customer-encrypted resources. If a service has more than one non-customer-encrypted resource and 'Enforcement' is 'enabled' then the service will be marked as 'nonCompliant'. public enum SearchEncryptionComplianceStatus { - /// Indicates that the search service is compliant, either because the number of non-CMK-encrypted objects is zero or enforcement is disabled. + /// Indicates that the search service is compliant, either because number of non-customer-encrypted resources is zero or enforcement is disabled. Compliant, - /// Indicates that the search service has more than one non-CMK-encrypted objects. + /// Indicates that the search service has more than one non-customer-encrypted resources. NonCompliant } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmk.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmk.cs index ac27135089db..301b326230a7 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmk.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmk.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Describes a policy that determines how resources within the search service are to be encrypted with customer managed keys. + /// Describes a policy that determines how resources within the search service are to be encrypted with customer=managed keys. public partial class SearchEncryptionWithCmk { /// @@ -51,8 +51,8 @@ public SearchEncryptionWithCmk() } /// Initializes a new instance of . - /// Describes how a search service should enforce compliance if it finds objects that aren't encrypted with the customer-managed key. - /// Returns the status of search service compliance with respect to non-CMK-encrypted objects. If a service has more than one unencrypted object, and enforcement is enabled, the service is marked as noncompliant. + /// Describes how a search service should enforce having one or more non-customer-encrypted resources. + /// Describes whether the search service is compliant or not with respect to having non-customer-encrypted resources. If a service has more than one non-customer-encrypted resource and 'Enforcement' is 'enabled' then the service will be marked as 'nonCompliant'. /// Keeps track of any properties unknown to the library. internal SearchEncryptionWithCmk(SearchEncryptionWithCmkEnforcement? enforcement, SearchEncryptionComplianceStatus? encryptionComplianceStatus, IDictionary serializedAdditionalRawData) { @@ -61,10 +61,10 @@ internal SearchEncryptionWithCmk(SearchEncryptionWithCmkEnforcement? enforcement _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Describes how a search service should enforce compliance if it finds objects that aren't encrypted with the customer-managed key. + /// Describes how a search service should enforce having one or more non-customer-encrypted resources. [WirePath("enforcement")] public SearchEncryptionWithCmkEnforcement? Enforcement { get; set; } - /// Returns the status of search service compliance with respect to non-CMK-encrypted objects. If a service has more than one unencrypted object, and enforcement is enabled, the service is marked as noncompliant. + /// Describes whether the search service is compliant or not with respect to having non-customer-encrypted resources. If a service has more than one non-customer-encrypted resource and 'Enforcement' is 'enabled' then the service will be marked as 'nonCompliant'. [WirePath("encryptionComplianceStatus")] public SearchEncryptionComplianceStatus? EncryptionComplianceStatus { get; } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmkEnforcement.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmkEnforcement.cs index b6e0267453cf..b83056093406 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmkEnforcement.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchEncryptionWithCmkEnforcement.cs @@ -7,14 +7,14 @@ namespace Azure.ResourceManager.Search.Models { - /// Describes how a search service should enforce compliance if it finds objects that aren't encrypted with the customer-managed key. + /// Describes how a search service should enforce having one or more non-customer-encrypted resources. public enum SearchEncryptionWithCmkEnforcement { /// Enforcement policy is not explicitly specified, with the behavior being the same as if it were set to 'Disabled'. Unspecified, - /// No enforcement of customer-managed key encryption will be made. Only the built-in service-managed encryption is used. + /// No enforcement will be made and the search service can have non-customer-encrypted resources. Disabled, - /// Search service will be marked as non-compliant if one or more objects aren't encrypted with a customer-managed key. + /// Search service will be marked as non-compliant if there are one or more non-customer-encrypted resources. Enabled } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateEndpointConnectionListResult.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateEndpointConnectionListResult.cs index e49d93f9213d..1cef0336a8b6 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateEndpointConnectionListResult.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateEndpointConnectionListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Response containing a list of private endpoint connections. + /// Response containing a list of Private Endpoint connections. internal partial class SearchPrivateEndpointConnectionListResult { /// @@ -52,7 +52,7 @@ internal SearchPrivateEndpointConnectionListResult() } /// Initializes a new instance of . - /// The list of private endpoint connections. + /// The list of Private Endpoint connections. /// Request URL that can be used to query next page of private endpoint connections. Returned when the total number of requested private endpoint connections exceed maximum page size. /// Keeps track of any properties unknown to the library. internal SearchPrivateEndpointConnectionListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) @@ -62,7 +62,7 @@ internal SearchPrivateEndpointConnectionListResult(IReadOnlyList The list of private endpoint connections. + /// The list of Private Endpoint connections. public IReadOnlyList Value { get; } /// Request URL that can be used to query next page of private endpoint connections. Returned when the total number of requested private endpoint connections exceed maximum page size. public string NextLink { get; } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateLinkResource.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateLinkResource.cs index a9675bdcff5f..a236b3d94e88 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateLinkResource.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateLinkResource.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Describes a supported private link resource for the Azure AI Search service. + /// Describes a supported private link resource for the search service. public partial class SearchPrivateLinkResource : ResourceData { /// @@ -57,7 +57,7 @@ public SearchPrivateLinkResource() /// The name. /// The resourceType. /// The systemData. - /// Describes the properties of a supported private link resource for the Azure AI Search service. + /// Describes the properties of a supported private link resource for the search service. /// Keeps track of any properties unknown to the library. internal SearchPrivateLinkResource(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SearchPrivateLinkResourceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -65,7 +65,7 @@ internal SearchPrivateLinkResource(ResourceIdentifier id, string name, ResourceT _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Describes the properties of a supported private link resource for the Azure AI Search service. + /// Describes the properties of a supported private link resource for the search service. [WirePath("properties")] public SearchPrivateLinkResourceProperties Properties { get; } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateLinkResourceProperties.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateLinkResourceProperties.cs index d1138427e86c..afacb6c57f33 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateLinkResourceProperties.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateLinkResourceProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Describes the properties of a supported private link resource for the Azure AI Search service. For a given API version, this represents the 'supported' groupIds when creating a shared private link resource. + /// Describes the properties of a supported private link resource for the search service. For a given API version, this represents the 'supported' groupIds when creating a shared private link resource. public partial class SearchPrivateLinkResourceProperties { /// @@ -57,7 +57,7 @@ internal SearchPrivateLinkResourceProperties() /// The group ID of the private link resource. /// The list of required members of the private link resource. /// The list of required DNS zone names of the private link resource. - /// The list of resources that are onboarded to private link service, that are supported by Azure AI Search. + /// The list of resources that are onboarded to private link service and that are supported by search. /// Keeps track of any properties unknown to the library. internal SearchPrivateLinkResourceProperties(string groupId, IReadOnlyList requiredMembers, IReadOnlyList requiredZoneNames, IReadOnlyList shareablePrivateLinkResourceTypes, IDictionary serializedAdditionalRawData) { @@ -77,7 +77,7 @@ internal SearchPrivateLinkResourceProperties(string groupId, IReadOnlyList The list of required DNS zone names of the private link resource. [WirePath("requiredZoneNames")] public IReadOnlyList RequiredZoneNames { get; } - /// The list of resources that are onboarded to private link service, that are supported by Azure AI Search. + /// The list of resources that are onboarded to private link service and that are supported by search. [WirePath("shareablePrivateLinkResourceTypes")] public IReadOnlyList ShareablePrivateLinkResourceTypes { get; } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateLinkServiceConnectionProvisioningState.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateLinkServiceConnectionProvisioningState.cs index f879c949bfd5..55e6385909c0 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateLinkServiceConnectionProvisioningState.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchPrivateLinkServiceConnectionProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// The provisioning state of the private link service connection. Valid values are Updating, Deleting, Failed, Succeeded, Incomplete, or Canceled. + /// The provisioning state of the private link service connection. Valid values are Updating, Deleting, Failed, Succeeded, or Incomplete. public readonly partial struct SearchPrivateLinkServiceConnectionProvisioningState : IEquatable { private readonly string _value; diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchSemanticSearch.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchSemanticSearch.cs index 9d3a32dbefe3..f1f9b9abc593 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchSemanticSearch.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchSemanticSearch.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Sets options that control the availability of semantic search. This configuration is only possible for certain Azure AI Search SKUs in certain locations. + /// Sets options that control the availability of semantic ranking. This configuration is only possible for certain search SKUs in certain locations. public readonly partial struct SearchSemanticSearch : IEquatable { private readonly string _value; @@ -26,11 +26,11 @@ public SearchSemanticSearch(string value) private const string FreeValue = "free"; private const string StandardValue = "standard"; - /// Indicates that semantic reranker is disabled for the search service. This is the default. + /// Indicates that semantic ranking is disabled for the search service. public static SearchSemanticSearch Disabled { get; } = new SearchSemanticSearch(DisabledValue); - /// Enables semantic reranker on a search service and indicates that it is to be used within the limits of the free plan. The free plan would cap the volume of semantic ranking requests and is offered at no extra charge. This is the default for newly provisioned search services. + /// Enables semantic ranking on a search service and indicates that it is to be used within the limits of the free tier. This would cap the volume of semantic ranking requests and is offered at no extra charge. This is the default for newly provisioned search services. public static SearchSemanticSearch Free { get; } = new SearchSemanticSearch(FreeValue); - /// Enables semantic reranker on a search service as a billable feature, with higher throughput and volume of semantically reranked queries. + /// Enables semantic ranking on a search service as a billable feature, with higher throughput and volume of semantic ranking requests. public static SearchSemanticSearch Standard { get; } = new SearchSemanticSearch(StandardValue); /// Determines if two values are the same. public static bool operator ==(SearchSemanticSearch left, SearchSemanticSearch right) => left.Equals(right); diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceAdminKeyResult.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceAdminKeyResult.cs index 7e756026e837..55b4e5065112 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceAdminKeyResult.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceAdminKeyResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Response containing the primary and secondary admin API keys for a given Azure AI Search service. + /// Response containing the primary and secondary admin API keys for a given search service. public partial class SearchServiceAdminKeyResult { /// diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceComputeType.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceComputeType.cs deleted file mode 100644 index 57125a544052..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceComputeType.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.Search.Models -{ - /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. - public readonly partial struct SearchServiceComputeType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SearchServiceComputeType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DefaultValue = "default"; - private const string ConfidentialValue = "confidential"; - - /// Create the service with the default compute. - public static SearchServiceComputeType Default { get; } = new SearchServiceComputeType(DefaultValue); - /// Create the service with Azure Confidential Compute. - public static SearchServiceComputeType Confidential { get; } = new SearchServiceComputeType(ConfidentialValue); - /// Determines if two values are the same. - public static bool operator ==(SearchServiceComputeType left, SearchServiceComputeType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SearchServiceComputeType left, SearchServiceComputeType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SearchServiceComputeType(string value) => new SearchServiceComputeType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SearchServiceComputeType other && Equals(other); - /// - public bool Equals(SearchServiceComputeType 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/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceFeatureName.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceFeatureName.cs deleted file mode 100644 index d424af09fa0a..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceFeatureName.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Search.Models -{ - /// The name of the feature offered in this region. - public readonly partial struct SearchServiceFeatureName : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SearchServiceFeatureName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string GrokValue = "Grok"; - private const string ImageVectorizationValue = "ImageVectorization"; - private const string DocumentIntelligenceValue = "DocumentIntelligence"; - private const string QueryRewriteValue = "QueryRewrite"; - private const string S3Value = "S3"; - private const string StorageOptimizedValue = "StorageOptimized"; - private const string SemanticSearchValue = "SemanticSearch"; - private const string MegaStoreValue = "MegaStore"; - private const string AvailabilityZonesValue = "AvailabilityZones"; - - /// Supports Grok feature. - public static SearchServiceFeatureName Grok { get; } = new SearchServiceFeatureName(GrokValue); - /// Supports Image Vectorization feature. - public static SearchServiceFeatureName ImageVectorization { get; } = new SearchServiceFeatureName(ImageVectorizationValue); - /// Supports Document Intelligence feature. - public static SearchServiceFeatureName DocumentIntelligence { get; } = new SearchServiceFeatureName(DocumentIntelligenceValue); - /// Supports Query Rewrite feature. - public static SearchServiceFeatureName QueryRewrite { get; } = new SearchServiceFeatureName(QueryRewriteValue); - /// Supports S3 feature. - public static SearchServiceFeatureName S3 { get; } = new SearchServiceFeatureName(S3Value); - /// Supports Storage Optimized feature. - public static SearchServiceFeatureName StorageOptimized { get; } = new SearchServiceFeatureName(StorageOptimizedValue); - /// Supports Semantic Search feature. - public static SearchServiceFeatureName SemanticSearch { get; } = new SearchServiceFeatureName(SemanticSearchValue); - /// Supports Mega Store feature. - public static SearchServiceFeatureName MegaStore { get; } = new SearchServiceFeatureName(MegaStoreValue); - /// Supports Availability Zones feature. - public static SearchServiceFeatureName AvailabilityZones { get; } = new SearchServiceFeatureName(AvailabilityZonesValue); - /// Determines if two values are the same. - public static bool operator ==(SearchServiceFeatureName left, SearchServiceFeatureName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SearchServiceFeatureName left, SearchServiceFeatureName right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SearchServiceFeatureName(string value) => new SearchServiceFeatureName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SearchServiceFeatureName other && Equals(other); - /// - public bool Equals(SearchServiceFeatureName 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/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceFeatureOffering.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceFeatureOffering.Serialization.cs deleted file mode 100644 index 1bf3a25545f7..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceFeatureOffering.Serialization.cs +++ /dev/null @@ -1,166 +0,0 @@ -// 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; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - public partial class SearchServiceFeatureOffering : 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(SearchServiceFeatureOffering)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name.Value.ToString()); - } - 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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SearchServiceFeatureOffering 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(SearchServiceFeatureOffering)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSearchServiceFeatureOffering(document.RootElement, options); - } - - internal static SearchServiceFeatureOffering DeserializeSearchServiceFeatureOffering(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SearchServiceFeatureName? name = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - name = new SearchServiceFeatureName(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SearchServiceFeatureOffering(name, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - builder.AppendLine($"'{Name.Value.ToString()}'"); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(SearchServiceFeatureOffering)} does not support writing '{options.Format}' format."); - } - } - - SearchServiceFeatureOffering 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSearchServiceFeatureOffering(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SearchServiceFeatureOffering)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceFeatureOffering.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceFeatureOffering.cs deleted file mode 100644 index faa9c109d803..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceFeatureOffering.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.Search.Models -{ - /// The SearchServiceFeatureOffering. - public partial class SearchServiceFeatureOffering - { - /// - /// 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 . - internal SearchServiceFeatureOffering() - { - } - - /// Initializes a new instance of . - /// The name of the feature offered in this region. - /// Keeps track of any properties unknown to the library. - internal SearchServiceFeatureOffering(SearchServiceFeatureName? name, IDictionary serializedAdditionalRawData) - { - Name = name; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The name of the feature offered in this region. - [WirePath("name")] - public SearchServiceFeatureName? Name { get; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceIPRule.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceIPRule.cs index 6a888a7a1011..5e8a5585e297 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceIPRule.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceIPRule.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// The IP restriction rule of the Azure AI Search service. + /// The IP restriction rule of the search service. public partial class SearchServiceIPRule { /// @@ -51,7 +51,7 @@ public SearchServiceIPRule() } /// Initializes a new instance of . - /// Value corresponding to a single IPv4 address (eg., 123.1.2.3) or an IP range in CIDR format (eg., 123.1.2.3/24) to be allowed. + /// Value corresponding to a single IPv4 address (for example, 123.1.2.3) or an IP range in CIDR format (for example, 123.1.2.3/24) to be allowed. /// Keeps track of any properties unknown to the library. internal SearchServiceIPRule(string value, IDictionary serializedAdditionalRawData) { @@ -59,7 +59,7 @@ internal SearchServiceIPRule(string value, IDictionary seria _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Value corresponding to a single IPv4 address (eg., 123.1.2.3) or an IP range in CIDR format (eg., 123.1.2.3/24) to be allowed. + /// Value corresponding to a single IPv4 address (for example, 123.1.2.3) or an IP range in CIDR format (for example, 123.1.2.3/24) to be allowed. [WirePath("value")] public string Value { get; set; } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceListResult.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceListResult.cs index c658e9d5d203..1b81e60b6885 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceListResult.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Response containing a list of Azure AI Search services. + /// Response containing a list of search services. internal partial class SearchServiceListResult { /// diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNameUnavailableReason.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNameUnavailableReason.cs index 61999be6516c..e5d8c00a3139 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNameUnavailableReason.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNameUnavailableReason.cs @@ -25,7 +25,7 @@ public SearchServiceNameUnavailableReason(string value) private const string InvalidValue = "Invalid"; private const string AlreadyExistsValue = "AlreadyExists"; - /// The search service name doesn't match naming requirements. + /// The search service name does not match naming requirements. public static SearchServiceNameUnavailableReason Invalid { get; } = new SearchServiceNameUnavailableReason(InvalidValue); /// The search service name is already assigned to a different search service. public static SearchServiceNameUnavailableReason AlreadyExists { get; } = new SearchServiceNameUnavailableReason(AlreadyExistsValue); diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNetworkRuleSet.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNetworkRuleSet.Serialization.cs index 27eb0f48ea27..fe458a066f32 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNetworkRuleSet.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNetworkRuleSet.Serialization.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.Search.Models { - public partial class SearchServiceNetworkRuleSet : IUtf8JsonSerializable, IJsonModel + internal partial class SearchServiceNetworkRuleSet : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -46,11 +46,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Bypass)) - { - writer.WritePropertyName("bypass"u8); - writer.WriteStringValue(Bypass.Value.ToString()); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -89,7 +84,6 @@ internal static SearchServiceNetworkRuleSet DeserializeSearchServiceNetworkRuleS return null; } IList ipRules = default; - SearchBypass? bypass = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -108,22 +102,13 @@ internal static SearchServiceNetworkRuleSet DeserializeSearchServiceNetworkRuleS ipRules = array; continue; } - if (property.NameEquals("bypass"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - bypass = new SearchBypass(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new SearchServiceNetworkRuleSet(ipRules ?? new ChangeTrackingList(), bypass, serializedAdditionalRawData); + return new SearchServiceNetworkRuleSet(ipRules ?? new ChangeTrackingList(), serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -160,21 +145,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Bypass), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" bypass: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Bypass)) - { - builder.Append(" bypass: "); - builder.AppendLine($"'{Bypass.Value.ToString()}'"); - } - } - builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNetworkRuleSet.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNetworkRuleSet.cs index ddbfb17a291a..65a8f942aae5 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNetworkRuleSet.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceNetworkRuleSet.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.Search.Models { - /// Network specific rules that determine how the Azure AI Search service may be reached. - public partial class SearchServiceNetworkRuleSet + /// Network-specific rules that determine how the search service can be reached. + internal partial class SearchServiceNetworkRuleSet { /// /// Keeps track of any properties unknown to the library. @@ -52,21 +52,16 @@ public SearchServiceNetworkRuleSet() } /// Initializes a new instance of . - /// A list of IP restriction rules that defines the inbound network(s) with allowing access to the search service endpoint. At the meantime, all other public IP networks are blocked by the firewall. These restriction rules are applied only when the 'publicNetworkAccess' of the search service is 'enabled'; otherwise, traffic over public interface is not allowed even with any public IP rules, and private endpoint connections would be the exclusive access method. - /// Possible origins of inbound traffic that can bypass the rules defined in the 'ipRules' section. + /// A list of IP restriction rules used for an IP firewall. Any IPs that do not match the rules are blocked by the firewall. These rules are only applied when the 'publicNetworkAccess' of the search service is 'enabled'. /// Keeps track of any properties unknown to the library. - internal SearchServiceNetworkRuleSet(IList ipRules, SearchBypass? bypass, IDictionary serializedAdditionalRawData) + internal SearchServiceNetworkRuleSet(IList ipRules, IDictionary serializedAdditionalRawData) { IPRules = ipRules; - Bypass = bypass; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A list of IP restriction rules that defines the inbound network(s) with allowing access to the search service endpoint. At the meantime, all other public IP networks are blocked by the firewall. These restriction rules are applied only when the 'publicNetworkAccess' of the search service is 'enabled'; otherwise, traffic over public interface is not allowed even with any public IP rules, and private endpoint connections would be the exclusive access method. + /// A list of IP restriction rules used for an IP firewall. Any IPs that do not match the rules are blocked by the firewall. These rules are only applied when the 'publicNetworkAccess' of the search service is 'enabled'. [WirePath("ipRules")] public IList IPRules { get; } - /// Possible origins of inbound traffic that can bypass the rules defined in the 'ipRules' section. - [WirePath("bypass")] - public SearchBypass? Bypass { get; set; } } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceOfferingsByRegion.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceOfferingsByRegion.Serialization.cs deleted file mode 100644 index 6b058999e29c..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceOfferingsByRegion.Serialization.cs +++ /dev/null @@ -1,267 +0,0 @@ -// 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.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - public partial class SearchServiceOfferingsByRegion : 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(SearchServiceOfferingsByRegion)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(RegionName)) - { - writer.WritePropertyName("regionName"u8); - writer.WriteStringValue(RegionName); - } - if (Optional.IsCollectionDefined(Features)) - { - writer.WritePropertyName("features"u8); - writer.WriteStartArray(); - foreach (var item in Features) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(Skus)) - { - writer.WritePropertyName("skus"u8); - writer.WriteStartArray(); - foreach (var item in Skus) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - 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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SearchServiceOfferingsByRegion 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(SearchServiceOfferingsByRegion)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSearchServiceOfferingsByRegion(document.RootElement, options); - } - - internal static SearchServiceOfferingsByRegion DeserializeSearchServiceOfferingsByRegion(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string regionName = default; - IReadOnlyList features = default; - IReadOnlyList skus = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("regionName"u8)) - { - regionName = property.Value.GetString(); - continue; - } - if (property.NameEquals("features"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SearchServiceFeatureOffering.DeserializeSearchServiceFeatureOffering(item, options)); - } - features = array; - continue; - } - if (property.NameEquals("skus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SearchServiceSkuOffering.DeserializeSearchServiceSkuOffering(item, options)); - } - skus = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SearchServiceOfferingsByRegion(regionName, features ?? new ChangeTrackingList(), skus ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RegionName), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" regionName: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(RegionName)) - { - builder.Append(" regionName: "); - if (RegionName.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{RegionName}'''"); - } - else - { - builder.AppendLine($"'{RegionName}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Features), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" features: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Features)) - { - if (Features.Any()) - { - builder.Append(" features: "); - builder.AppendLine("["); - foreach (var item in Features) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " features: "); - } - builder.AppendLine(" ]"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Skus), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" skus: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(Skus)) - { - if (Skus.Any()) - { - builder.Append(" skus: "); - builder.AppendLine("["); - foreach (var item in Skus) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " skus: "); - } - builder.AppendLine(" ]"); - } - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(SearchServiceOfferingsByRegion)} does not support writing '{options.Format}' format."); - } - } - - SearchServiceOfferingsByRegion 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSearchServiceOfferingsByRegion(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SearchServiceOfferingsByRegion)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceOfferingsByRegion.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceOfferingsByRegion.cs deleted file mode 100644 index 2fe1729e91f9..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceOfferingsByRegion.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.Search.Models -{ - /// The SearchServiceOfferingsByRegion. - public partial class SearchServiceOfferingsByRegion - { - /// - /// 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 . - internal SearchServiceOfferingsByRegion() - { - Features = new ChangeTrackingList(); - Skus = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The name of the region. - /// The list of features offered in this region. - /// The list of SKUs offered in this region. - /// Keeps track of any properties unknown to the library. - internal SearchServiceOfferingsByRegion(string regionName, IReadOnlyList features, IReadOnlyList skus, IDictionary serializedAdditionalRawData) - { - RegionName = regionName; - Features = features; - Skus = skus; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The name of the region. - [WirePath("regionName")] - public string RegionName { get; } - /// The list of features offered in this region. - [WirePath("features")] - public IReadOnlyList Features { get; } - /// The list of SKUs offered in this region. - [WirePath("skus")] - public IReadOnlyList Skus { get; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.Serialization.cs index da66884cf1df..0fa65e43b686 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.Serialization.cs @@ -60,25 +60,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("partitionCount"u8); writer.WriteNumberValue(PartitionCount.Value); } - if (Optional.IsDefined(Endpoint)) - { - writer.WritePropertyName("endpoint"u8); - writer.WriteStringValue(Endpoint.AbsoluteUri); - } if (Optional.IsDefined(HostingMode)) { writer.WritePropertyName("hostingMode"u8); writer.WriteStringValue(HostingMode.Value.ToSerialString()); } - if (Optional.IsDefined(ComputeType)) - { - writer.WritePropertyName("computeType"u8); - writer.WriteStringValue(ComputeType.Value.ToString()); - } if (Optional.IsDefined(PublicInternetAccess)) { writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicInternetAccess.Value.ToString()); + writer.WriteStringValue(PublicInternetAccess.Value.ToSerialString()); } if (options.Format != "W" && Optional.IsDefined(Status)) { @@ -100,16 +90,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("networkRuleSet"u8); writer.WriteObjectValue(NetworkRuleSet, options); } - if (Optional.IsCollectionDefined(DisabledDataExfiltrationOptions)) - { - writer.WritePropertyName("disabledDataExfiltrationOptions"u8); - writer.WriteStartArray(); - foreach (var item in DisabledDataExfiltrationOptions) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } if (Optional.IsDefined(EncryptionWithCmk)) { writer.WritePropertyName("encryptionWithCmk"u8); @@ -132,6 +112,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("authOptions"u8); writer.WriteObjectValue(AuthOptions, options); } + if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) + { + writer.WritePropertyName("privateEndpointConnections"u8); + writer.WriteStartArray(); + foreach (var item in PrivateEndpointConnections) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(SemanticSearch)) { if (SemanticSearch != null) @@ -144,16 +134,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteNull("semanticSearch"); } } - if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) - { - writer.WritePropertyName("privateEndpointConnections"u8); - writer.WriteStartArray(); - foreach (var item in PrivateEndpointConnections) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } if (options.Format != "W" && Optional.IsCollectionDefined(SharedPrivateLinkResources)) { writer.WritePropertyName("sharedPrivateLinkResources"u8); @@ -164,11 +144,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("eTag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } if (options.Format != "W" && Optional.IsDefined(IsUpgradeAvailable)) { writer.WritePropertyName("upgradeAvailable"u8); @@ -212,22 +187,18 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele SystemData systemData = default; int? replicaCount = default; int? partitionCount = default; - Uri endpoint = default; SearchServiceHostingMode? hostingMode = default; - SearchServiceComputeType? computeType = default; SearchServicePublicInternetAccess? publicNetworkAccess = default; SearchServiceStatus? status = default; string statusDetails = default; SearchServiceProvisioningState? provisioningState = default; SearchServiceNetworkRuleSet networkRuleSet = default; - IList disabledDataExfiltrationOptions = default; SearchEncryptionWithCmk encryptionWithCmk = default; bool? disableLocalAuth = default; SearchAadAuthDataPlaneAuthOptions authOptions = default; - SearchSemanticSearch? semanticSearch = default; IReadOnlyList privateEndpointConnections = default; + SearchSemanticSearch? semanticSearch = default; IReadOnlyList sharedPrivateLinkResources = default; - ETag? eTag = default; bool? upgradeAvailable = default; DateTimeOffset? serviceUpgradeDate = default; IDictionary serializedAdditionalRawData = default; @@ -322,15 +293,6 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele partitionCount = property0.Value.GetInt32(); continue; } - if (property0.NameEquals("endpoint"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpoint = new Uri(property0.Value.GetString()); - continue; - } if (property0.NameEquals("hostingMode"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -340,22 +302,13 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele hostingMode = property0.Value.GetString().ToSearchServiceHostingMode(); continue; } - if (property0.NameEquals("computeType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - computeType = new SearchServiceComputeType(property0.Value.GetString()); - continue; - } if (property0.NameEquals("publicNetworkAccess"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - publicNetworkAccess = new SearchServicePublicInternetAccess(property0.Value.GetString()); + publicNetworkAccess = property0.Value.GetString().ToSearchServicePublicInternetAccess(); continue; } if (property0.NameEquals("status"u8)) @@ -390,20 +343,6 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele networkRuleSet = SearchServiceNetworkRuleSet.DeserializeSearchServiceNetworkRuleSet(property0.Value, options); continue; } - if (property0.NameEquals("disabledDataExfiltrationOptions"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(new SearchDisabledDataExfiltrationOption(item.GetString())); - } - disabledDataExfiltrationOptions = array; - continue; - } if (property0.NameEquals("encryptionWithCmk"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -432,16 +371,6 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele authOptions = SearchAadAuthDataPlaneAuthOptions.DeserializeSearchAadAuthDataPlaneAuthOptions(property0.Value, options); continue; } - if (property0.NameEquals("semanticSearch"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - semanticSearch = null; - continue; - } - semanticSearch = new SearchSemanticSearch(property0.Value.GetString()); - continue; - } if (property0.NameEquals("privateEndpointConnections"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -456,27 +385,28 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele privateEndpointConnections = array; continue; } - if (property0.NameEquals("sharedPrivateLinkResources"u8)) + if (property0.NameEquals("semanticSearch"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { + semanticSearch = null; continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(SharedSearchServicePrivateLinkResourceData.DeserializeSharedSearchServicePrivateLinkResourceData(item, options)); - } - sharedPrivateLinkResources = array; + semanticSearch = new SearchSemanticSearch(property0.Value.GetString()); continue; } - if (property0.NameEquals("eTag"u8)) + if (property0.NameEquals("sharedPrivateLinkResources"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - eTag = new ETag(property0.Value.GetString()); + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(SharedSearchServicePrivateLinkResourceData.DeserializeSharedSearchServicePrivateLinkResourceData(item, options)); + } + sharedPrivateLinkResources = array; continue; } if (property0.NameEquals("upgradeAvailable"u8)) @@ -517,22 +447,18 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele identity, replicaCount, partitionCount, - endpoint, hostingMode, - computeType, publicNetworkAccess, status, statusDetails, provisioningState, networkRuleSet, - disabledDataExfiltrationOptions ?? new ChangeTrackingList(), encryptionWithCmk, disableLocalAuth, authOptions, - semanticSearch, privateEndpointConnections ?? new ChangeTrackingList(), + semanticSearch, sharedPrivateLinkResources ?? new ChangeTrackingList(), - eTag, upgradeAvailable, serviceUpgradeDate, serializedAdditionalRawData); @@ -716,21 +642,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Endpoint), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" endpoint: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Endpoint)) - { - builder.Append(" endpoint: "); - builder.AppendLine($"'{Endpoint.AbsoluteUri}'"); - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HostingMode), out propertyOverride); if (hasPropertyOverride) { @@ -746,21 +657,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComputeType), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" computeType: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ComputeType)) - { - builder.Append(" computeType: "); - builder.AppendLine($"'{ComputeType.Value.ToString()}'"); - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicInternetAccess), out propertyOverride); if (hasPropertyOverride) { @@ -772,7 +668,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(PublicInternetAccess)) { builder.Append(" publicNetworkAccess: "); - builder.AppendLine($"'{PublicInternetAccess.Value.ToString()}'"); + builder.AppendLine($"'{PublicInternetAccess.Value.ToSerialString()}'"); } } @@ -829,11 +725,16 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkRuleSet), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IPRules", out propertyOverride); if (hasPropertyOverride) { builder.Append(" networkRuleSet: "); + builder.AppendLine("{"); + builder.AppendLine(" networkRuleSet: {"); + builder.Append(" ipRules: "); builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); } else { @@ -844,29 +745,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisabledDataExfiltrationOptions), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" disabledDataExfiltrationOptions: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(DisabledDataExfiltrationOptions)) - { - if (DisabledDataExfiltrationOptions.Any()) - { - builder.Append(" disabledDataExfiltrationOptions: "); - builder.AppendLine("["); - foreach (var item in DisabledDataExfiltrationOptions) - { - builder.AppendLine($" '{item.ToString()}'"); - } - builder.AppendLine(" ]"); - } - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EncryptionWithCmk), out propertyOverride); if (hasPropertyOverride) { @@ -913,21 +791,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SemanticSearch), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" semanticSearch: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SemanticSearch)) - { - builder.Append(" semanticSearch: "); - builder.AppendLine($"'{SemanticSearch.Value.ToString()}'"); - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateEndpointConnections), out propertyOverride); if (hasPropertyOverride) { @@ -951,6 +814,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SemanticSearch), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" semanticSearch: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SemanticSearch)) + { + builder.Append(" semanticSearch: "); + builder.AppendLine($"'{SemanticSearch.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SharedPrivateLinkResources), out propertyOverride); if (hasPropertyOverride) { @@ -974,21 +852,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ETag), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" eTag: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ETag)) - { - builder.Append(" eTag: "); - builder.AppendLine($"'{ETag.Value.ToString()}'"); - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsUpgradeAvailable), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.cs index 2698d1cb18b9..b1683d8d71e6 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.Search.Models { - /// The parameters used to update an Azure AI Search service. + /// The parameters used to update a search service. public partial class SearchServicePatch : TrackedResourceData { /// @@ -51,7 +51,6 @@ public partial class SearchServicePatch : TrackedResourceData /// The location. public SearchServicePatch(AzureLocation location) : base(location) { - DisabledDataExfiltrationOptions = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); SharedPrivateLinkResources = new ChangeTrackingList(); } @@ -63,51 +62,43 @@ public SearchServicePatch(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// The SKU of the search service, which determines price tier and capacity limits. This property is required when creating a new search service. - /// Details about the search service identity. A null value indicates that the search service has no identity assigned. + /// The SKU of the search service, which determines the billing rate and capacity limits. This property is required when creating a new search service. + /// The identity of the resource. Current supported identity types: None, SystemAssigned. /// The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. - /// The endpoint of the Azure AI Search service. /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. - /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. - /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. 'stopped': The search service is in a subscription that's disabled. If your service is in the degraded, disabled, or error states, it means the Azure AI Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. + /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. If your service is in the degraded, disabled, or error states, Microsoft is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. /// The details of the search service status. - /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'Succeeded' or 'Failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'Succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. - /// Network specific rules that determine how the Azure AI Search service may be reached. - /// A list of data exfiltration scenarios that are explicitly disallowed for the search service. Currently, the only supported value is 'All' to disable all possible data export scenarios with more fine grained controls planned for the future. + /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. + /// Network-specific rules that determine how the search service may be reached. /// Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. /// When set to true, calls to the search service will not be permitted to utilize API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined. /// Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. - /// Sets options that control the availability of semantic search. This configuration is only possible for certain Azure AI Search SKUs in certain locations. - /// The list of private endpoint connections to the Azure AI Search service. - /// The list of shared private link resources managed by the Azure AI Search service. - /// A system generated property representing the service's etag that can be for optimistic concurrency control during updates. + /// The list of private endpoint connections to the search service. + /// Sets options that control the availability of semantic search. This configuration is only possible for certain search SKUs in certain locations. + /// The list of shared private link resources managed by the search service. /// Indicates whether or not the search service has an upgrade available. /// The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. /// Keeps track of any properties unknown to the library. - internal SearchServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SearchSku searchSku, ManagedServiceIdentity identity, int? replicaCount, int? partitionCount, Uri endpoint, SearchServiceHostingMode? hostingMode, SearchServiceComputeType? computeType, SearchServicePublicInternetAccess? publicInternetAccess, SearchServiceStatus? status, string statusDetails, SearchServiceProvisioningState? provisioningState, SearchServiceNetworkRuleSet networkRuleSet, IList disabledDataExfiltrationOptions, SearchEncryptionWithCmk encryptionWithCmk, bool? isLocalAuthDisabled, SearchAadAuthDataPlaneAuthOptions authOptions, SearchSemanticSearch? semanticSearch, IReadOnlyList privateEndpointConnections, IReadOnlyList sharedPrivateLinkResources, ETag? eTag, bool? isUpgradeAvailable, DateTimeOffset? serviceUpgradeOn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal SearchServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SearchSku searchSku, ManagedServiceIdentity identity, int? replicaCount, int? partitionCount, SearchServiceHostingMode? hostingMode, SearchServicePublicInternetAccess? publicInternetAccess, SearchServiceStatus? status, string statusDetails, SearchServiceProvisioningState? provisioningState, SearchServiceNetworkRuleSet networkRuleSet, SearchEncryptionWithCmk encryptionWithCmk, bool? isLocalAuthDisabled, SearchAadAuthDataPlaneAuthOptions authOptions, IReadOnlyList privateEndpointConnections, SearchSemanticSearch? semanticSearch, IReadOnlyList sharedPrivateLinkResources, bool? isUpgradeAvailable, DateTimeOffset? serviceUpgradeOn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { SearchSku = searchSku; Identity = identity; ReplicaCount = replicaCount; PartitionCount = partitionCount; - Endpoint = endpoint; HostingMode = hostingMode; - ComputeType = computeType; PublicInternetAccess = publicInternetAccess; Status = status; StatusDetails = statusDetails; ProvisioningState = provisioningState; NetworkRuleSet = networkRuleSet; - DisabledDataExfiltrationOptions = disabledDataExfiltrationOptions; EncryptionWithCmk = encryptionWithCmk; IsLocalAuthDisabled = isLocalAuthDisabled; AuthOptions = authOptions; - SemanticSearch = semanticSearch; PrivateEndpointConnections = privateEndpointConnections; + SemanticSearch = semanticSearch; SharedPrivateLinkResources = sharedPrivateLinkResources; - ETag = eTag; IsUpgradeAvailable = isUpgradeAvailable; ServiceUpgradeOn = serviceUpgradeOn; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -118,7 +109,7 @@ internal SearchServicePatch() { } - /// The SKU of the search service, which determines price tier and capacity limits. This property is required when creating a new search service. + /// The SKU of the search service, which determines the billing rate and capacity limits. This property is required when creating a new search service. internal SearchSku SearchSku { get; set; } /// The SKU of the search service. Valid values include: 'free': Shared service. 'basic': Dedicated service with up to 3 replicas. 'standard': Dedicated service with up to 12 partitions and 12 replicas. 'standard2': Similar to standard, but with more capacity per search unit. 'standard3': The largest Standard offering with up to 12 partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports 2TB per partition, up to 12 partitions.'. [WirePath("sku.name")] @@ -133,7 +124,7 @@ public SearchServiceSkuName? SearchSkuName } } - /// Details about the search service identity. A null value indicates that the search service has no identity assigned. + /// The identity of the resource. Current supported identity types: None, SystemAssigned. [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } /// The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. @@ -142,33 +133,24 @@ public SearchServiceSkuName? SearchSkuName /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. [WirePath("properties.partitionCount")] public int? PartitionCount { get; set; } - /// The endpoint of the Azure AI Search service. - [WirePath("properties.endpoint")] - public Uri Endpoint { get; set; } /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. [WirePath("properties.hostingMode")] public SearchServiceHostingMode? HostingMode { get; set; } - /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. - [WirePath("properties.computeType")] - public SearchServiceComputeType? ComputeType { get; set; } /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. [WirePath("properties.publicNetworkAccess")] public SearchServicePublicInternetAccess? PublicInternetAccess { get; set; } - /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. 'stopped': The search service is in a subscription that's disabled. If your service is in the degraded, disabled, or error states, it means the Azure AI Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. + /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. If your service is in the degraded, disabled, or error states, Microsoft is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. [WirePath("properties.status")] public SearchServiceStatus? Status { get; } /// The details of the search service status. [WirePath("properties.statusDetails")] public string StatusDetails { get; } - /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'Succeeded' or 'Failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'Succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. + /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. [WirePath("properties.provisioningState")] public SearchServiceProvisioningState? ProvisioningState { get; } - /// Network specific rules that determine how the Azure AI Search service may be reached. - [WirePath("properties.networkRuleSet")] - public SearchServiceNetworkRuleSet NetworkRuleSet { get; set; } - /// A list of data exfiltration scenarios that are explicitly disallowed for the search service. Currently, the only supported value is 'All' to disable all possible data export scenarios with more fine grained controls planned for the future. - [WirePath("properties.disabledDataExfiltrationOptions")] - public IList DisabledDataExfiltrationOptions { get; } + /// Network-specific rules that determine how the search service may be reached. + internal SearchServiceNetworkRuleSet NetworkRuleSet { get; set; } + /// Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. [WirePath("properties.encryptionWithCmk")] public SearchEncryptionWithCmk EncryptionWithCmk { get; set; } @@ -178,18 +160,15 @@ public SearchServiceSkuName? SearchSkuName /// Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. [WirePath("properties.authOptions")] public SearchAadAuthDataPlaneAuthOptions AuthOptions { get; set; } - /// Sets options that control the availability of semantic search. This configuration is only possible for certain Azure AI Search SKUs in certain locations. - [WirePath("properties.semanticSearch")] - public SearchSemanticSearch? SemanticSearch { get; set; } - /// The list of private endpoint connections to the Azure AI Search service. + /// The list of private endpoint connections to the search service. [WirePath("properties.privateEndpointConnections")] public IReadOnlyList PrivateEndpointConnections { get; } - /// The list of shared private link resources managed by the Azure AI Search service. + /// Sets options that control the availability of semantic search. This configuration is only possible for certain search SKUs in certain locations. + [WirePath("properties.semanticSearch")] + public SearchSemanticSearch? SemanticSearch { get; set; } + /// The list of shared private link resources managed by the search service. [WirePath("properties.sharedPrivateLinkResources")] public IReadOnlyList SharedPrivateLinkResources { get; } - /// A system generated property representing the service's etag that can be for optimistic concurrency control during updates. - [WirePath("properties.eTag")] - public ETag? ETag { get; } /// Indicates whether or not the search service has an upgrade available. [WirePath("properties.upgradeAvailable")] public bool? IsUpgradeAvailable { get; } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.cs index 8c61adec1baa..c5e230214eb3 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateEndpointConnectionProperties.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Describes the properties of an existing private endpoint connection to the search service. + /// Describes the properties of an existing Private Endpoint connection to the search service. public partial class SearchServicePrivateEndpointConnectionProperties { /// @@ -54,9 +54,9 @@ public SearchServicePrivateEndpointConnectionProperties() /// Initializes a new instance of . /// The private endpoint resource from Microsoft.Network provider. - /// Describes the current state of an existing Azure Private Link service connection to the private endpoint. - /// The group ID of the Azure resource for which the private link service is for. - /// The provisioning state of the private link service connection. Valid values are Updating, Deleting, Failed, Succeeded, Incomplete, or Canceled. + /// Describes the current state of an existing Private Link Service connection to the Azure Private Endpoint. + /// The group id from the provider of resource the private link service connection is for. + /// The provisioning state of the private link service connection. Valid values are Updating, Deleting, Failed, Succeeded, or Incomplete. /// Keeps track of any properties unknown to the library. internal SearchServicePrivateEndpointConnectionProperties(WritableSubResource privateEndpoint, SearchServicePrivateLinkServiceConnectionState connectionState, string groupId, SearchPrivateLinkServiceConnectionProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { @@ -82,13 +82,13 @@ public ResourceIdentifier PrivateEndpointId } } - /// Describes the current state of an existing Azure Private Link service connection to the private endpoint. + /// Describes the current state of an existing Private Link Service connection to the Azure Private Endpoint. [WirePath("privateLinkServiceConnectionState")] public SearchServicePrivateLinkServiceConnectionState ConnectionState { get; set; } - /// The group ID of the Azure resource for which the private link service is for. + /// The group id from the provider of resource the private link service connection is for. [WirePath("groupId")] public string GroupId { get; set; } - /// The provisioning state of the private link service connection. Valid values are Updating, Deleting, Failed, Succeeded, Incomplete, or Canceled. + /// The provisioning state of the private link service connection. Valid values are Updating, Deleting, Failed, Succeeded, or Incomplete. [WirePath("provisioningState")] public SearchPrivateLinkServiceConnectionProvisioningState? ProvisioningState { get; set; } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateLinkServiceConnectionState.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateLinkServiceConnectionState.cs index 4e82ef51daf9..d582dc7fd894 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateLinkServiceConnectionState.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePrivateLinkServiceConnectionState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Describes the current state of an existing Azure Private Link service connection to the private endpoint. + /// Describes the current state of an existing Private Link Service connection to the Azure Private Endpoint. public partial class SearchServicePrivateLinkServiceConnectionState { /// diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceProvisioningState.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceProvisioningState.Serialization.cs index 0f9759951994..0c29a1a9066c 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceProvisioningState.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceProvisioningState.Serialization.cs @@ -13,17 +13,17 @@ internal static partial class SearchServiceProvisioningStateExtensions { public static string ToSerialString(this SearchServiceProvisioningState value) => value switch { - SearchServiceProvisioningState.Succeeded => "Succeeded", - SearchServiceProvisioningState.Provisioning => "Provisioning", - SearchServiceProvisioningState.Failed => "Failed", + SearchServiceProvisioningState.Succeeded => "succeeded", + SearchServiceProvisioningState.Provisioning => "provisioning", + SearchServiceProvisioningState.Failed => "failed", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchServiceProvisioningState value.") }; public static SearchServiceProvisioningState ToSearchServiceProvisioningState(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Succeeded")) return SearchServiceProvisioningState.Succeeded; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Provisioning")) return SearchServiceProvisioningState.Provisioning; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Failed")) return SearchServiceProvisioningState.Failed; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "succeeded")) return SearchServiceProvisioningState.Succeeded; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "provisioning")) return SearchServiceProvisioningState.Provisioning; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "failed")) return SearchServiceProvisioningState.Failed; throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchServiceProvisioningState value."); } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceProvisioningState.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceProvisioningState.cs index c00fd1139bdd..e42c9076146c 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceProvisioningState.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceProvisioningState.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Search.Models { - /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'Succeeded' or 'Failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'Succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. + /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. public enum SearchServiceProvisioningState { /// The last provisioning operation has completed successfully. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePublicInternetAccess.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePublicInternetAccess.Serialization.cs new file mode 100644 index 000000000000..b534ec471fb3 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePublicInternetAccess.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.Search.Models +{ + internal static partial class SearchServicePublicInternetAccessExtensions + { + public static string ToSerialString(this SearchServicePublicInternetAccess value) => value switch + { + SearchServicePublicInternetAccess.Enabled => "enabled", + SearchServicePublicInternetAccess.Disabled => "disabled", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchServicePublicInternetAccess value.") + }; + + public static SearchServicePublicInternetAccess ToSearchServicePublicInternetAccess(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "enabled")) return SearchServicePublicInternetAccess.Enabled; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "disabled")) return SearchServicePublicInternetAccess.Disabled; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchServicePublicInternetAccess value."); + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePublicInternetAccess.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePublicInternetAccess.cs index 2923f1301367..9eb303d74107 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePublicInternetAccess.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePublicInternetAccess.cs @@ -5,47 +5,14 @@ #nullable disable -using System; -using System.ComponentModel; - namespace Azure.ResourceManager.Search.Models { /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. - public readonly partial struct SearchServicePublicInternetAccess : IEquatable + public enum SearchServicePublicInternetAccess { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SearchServicePublicInternetAccess(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "enabled"; - private const string DisabledValue = "disabled"; - - /// The search service is accessible from traffic originating from the public internet. - public static SearchServicePublicInternetAccess Enabled { get; } = new SearchServicePublicInternetAccess(EnabledValue); - /// The search service is not accessible from traffic originating from the public internet. Access is only permitted over approved private endpoint connections. - public static SearchServicePublicInternetAccess Disabled { get; } = new SearchServicePublicInternetAccess(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(SearchServicePublicInternetAccess left, SearchServicePublicInternetAccess right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SearchServicePublicInternetAccess left, SearchServicePublicInternetAccess right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SearchServicePublicInternetAccess(string value) => new SearchServicePublicInternetAccess(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SearchServicePublicInternetAccess other && Equals(other); - /// - public bool Equals(SearchServicePublicInternetAccess 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; + /// enabled. + Enabled, + /// disabled. + Disabled } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceQueryKey.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceQueryKey.cs index 76438db6ec2f..a15b42cea065 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceQueryKey.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceQueryKey.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Describes an API key for a given Azure AI Search service that conveys read-only permissions on the docs collection of an index. + /// Describes an API key for a given search service that has permissions for query operations only. public partial class SearchServiceQueryKey { /// @@ -51,7 +51,7 @@ internal SearchServiceQueryKey() } /// Initializes a new instance of . - /// The name of the query API key. Query names are optional, but assigning a name can help you remember how it's used. + /// The name of the query API key; may be empty. /// The value of the query API key. /// Keeps track of any properties unknown to the library. internal SearchServiceQueryKey(string name, string key, IDictionary serializedAdditionalRawData) @@ -61,7 +61,7 @@ internal SearchServiceQueryKey(string name, string key, IDictionary The name of the query API key. Query names are optional, but assigning a name can help you remember how it's used. + /// The name of the query API key; may be empty. [WirePath("name")] public string Name { get; } /// The value of the query API key. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceProvisioningState.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceProvisioningState.Serialization.cs new file mode 100644 index 000000000000..7a94e85c274c --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceProvisioningState.Serialization.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.Search.Models +{ + internal static partial class SearchServiceSharedPrivateLinkResourceProvisioningStateExtensions + { + public static string ToSerialString(this SearchServiceSharedPrivateLinkResourceProvisioningState value) => value switch + { + SearchServiceSharedPrivateLinkResourceProvisioningState.Updating => "Updating", + SearchServiceSharedPrivateLinkResourceProvisioningState.Deleting => "Deleting", + SearchServiceSharedPrivateLinkResourceProvisioningState.Failed => "Failed", + SearchServiceSharedPrivateLinkResourceProvisioningState.Succeeded => "Succeeded", + SearchServiceSharedPrivateLinkResourceProvisioningState.Incomplete => "Incomplete", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchServiceSharedPrivateLinkResourceProvisioningState value.") + }; + + public static SearchServiceSharedPrivateLinkResourceProvisioningState ToSearchServiceSharedPrivateLinkResourceProvisioningState(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Updating")) return SearchServiceSharedPrivateLinkResourceProvisioningState.Updating; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Deleting")) return SearchServiceSharedPrivateLinkResourceProvisioningState.Deleting; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Failed")) return SearchServiceSharedPrivateLinkResourceProvisioningState.Failed; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Succeeded")) return SearchServiceSharedPrivateLinkResourceProvisioningState.Succeeded; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Incomplete")) return SearchServiceSharedPrivateLinkResourceProvisioningState.Incomplete; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchServiceSharedPrivateLinkResourceProvisioningState value."); + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceProvisioningState.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceProvisioningState.cs index d8ee84dbde52..042e781e7408 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceProvisioningState.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceProvisioningState.cs @@ -5,56 +5,20 @@ #nullable disable -using System; -using System.ComponentModel; - namespace Azure.ResourceManager.Search.Models { /// The provisioning state of the shared private link resource. Valid values are Updating, Deleting, Failed, Succeeded or Incomplete. - public readonly partial struct SearchServiceSharedPrivateLinkResourceProvisioningState : IEquatable + public enum SearchServiceSharedPrivateLinkResourceProvisioningState { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SearchServiceSharedPrivateLinkResourceProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UpdatingValue = "Updating"; - private const string DeletingValue = "Deleting"; - private const string FailedValue = "Failed"; - private const string SucceededValue = "Succeeded"; - private const string IncompleteValue = "Incomplete"; - - /// The shared private link resource is in the process of being created along with other resources for it to be fully functional. - public static SearchServiceSharedPrivateLinkResourceProvisioningState Updating { get; } = new SearchServiceSharedPrivateLinkResourceProvisioningState(UpdatingValue); - /// The shared private link resource is in the process of being deleted. - public static SearchServiceSharedPrivateLinkResourceProvisioningState Deleting { get; } = new SearchServiceSharedPrivateLinkResourceProvisioningState(DeletingValue); - /// The shared private link resource has failed to be provisioned or deleted. - public static SearchServiceSharedPrivateLinkResourceProvisioningState Failed { get; } = new SearchServiceSharedPrivateLinkResourceProvisioningState(FailedValue); - /// The shared private link resource has finished provisioning and is ready for approval. - public static SearchServiceSharedPrivateLinkResourceProvisioningState Succeeded { get; } = new SearchServiceSharedPrivateLinkResourceProvisioningState(SucceededValue); - /// Provisioning request for the shared private link resource has been accepted but the process of creation has not commenced yet. - public static SearchServiceSharedPrivateLinkResourceProvisioningState Incomplete { get; } = new SearchServiceSharedPrivateLinkResourceProvisioningState(IncompleteValue); - /// Determines if two values are the same. - public static bool operator ==(SearchServiceSharedPrivateLinkResourceProvisioningState left, SearchServiceSharedPrivateLinkResourceProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SearchServiceSharedPrivateLinkResourceProvisioningState left, SearchServiceSharedPrivateLinkResourceProvisioningState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SearchServiceSharedPrivateLinkResourceProvisioningState(string value) => new SearchServiceSharedPrivateLinkResourceProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SearchServiceSharedPrivateLinkResourceProvisioningState other && Equals(other); - /// - public bool Equals(SearchServiceSharedPrivateLinkResourceProvisioningState 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; + /// Updating. + Updating, + /// Deleting. + Deleting, + /// Failed. + Failed, + /// Succeeded. + Succeeded, + /// Incomplete. + Incomplete } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceStatus.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceStatus.Serialization.cs new file mode 100644 index 000000000000..f828c096c120 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceStatus.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.Search.Models +{ + internal static partial class SearchServiceSharedPrivateLinkResourceStatusExtensions + { + public static string ToSerialString(this SearchServiceSharedPrivateLinkResourceStatus value) => value switch + { + SearchServiceSharedPrivateLinkResourceStatus.Pending => "Pending", + SearchServiceSharedPrivateLinkResourceStatus.Approved => "Approved", + SearchServiceSharedPrivateLinkResourceStatus.Rejected => "Rejected", + SearchServiceSharedPrivateLinkResourceStatus.Disconnected => "Disconnected", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchServiceSharedPrivateLinkResourceStatus value.") + }; + + public static SearchServiceSharedPrivateLinkResourceStatus ToSearchServiceSharedPrivateLinkResourceStatus(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Pending")) return SearchServiceSharedPrivateLinkResourceStatus.Pending; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Approved")) return SearchServiceSharedPrivateLinkResourceStatus.Approved; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Rejected")) return SearchServiceSharedPrivateLinkResourceStatus.Rejected; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Disconnected")) return SearchServiceSharedPrivateLinkResourceStatus.Disconnected; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchServiceSharedPrivateLinkResourceStatus value."); + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceStatus.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceStatus.cs index 97317025f9ea..b936dd4039b8 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceStatus.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSharedPrivateLinkResourceStatus.cs @@ -5,53 +5,18 @@ #nullable disable -using System; -using System.ComponentModel; - namespace Azure.ResourceManager.Search.Models { /// Status of the shared private link resource. Valid values are Pending, Approved, Rejected or Disconnected. - public readonly partial struct SearchServiceSharedPrivateLinkResourceStatus : IEquatable + public enum SearchServiceSharedPrivateLinkResourceStatus { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SearchServiceSharedPrivateLinkResourceStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PendingValue = "Pending"; - private const string ApprovedValue = "Approved"; - private const string RejectedValue = "Rejected"; - private const string DisconnectedValue = "Disconnected"; - - /// The shared private link resource has been created and is pending approval. - public static SearchServiceSharedPrivateLinkResourceStatus Pending { get; } = new SearchServiceSharedPrivateLinkResourceStatus(PendingValue); - /// The shared private link resource is approved and is ready for use. - public static SearchServiceSharedPrivateLinkResourceStatus Approved { get; } = new SearchServiceSharedPrivateLinkResourceStatus(ApprovedValue); - /// The shared private link resource has been rejected and cannot be used. - public static SearchServiceSharedPrivateLinkResourceStatus Rejected { get; } = new SearchServiceSharedPrivateLinkResourceStatus(RejectedValue); - /// The shared private link resource has been removed from the service. - public static SearchServiceSharedPrivateLinkResourceStatus Disconnected { get; } = new SearchServiceSharedPrivateLinkResourceStatus(DisconnectedValue); - /// Determines if two values are the same. - public static bool operator ==(SearchServiceSharedPrivateLinkResourceStatus left, SearchServiceSharedPrivateLinkResourceStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SearchServiceSharedPrivateLinkResourceStatus left, SearchServiceSharedPrivateLinkResourceStatus right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SearchServiceSharedPrivateLinkResourceStatus(string value) => new SearchServiceSharedPrivateLinkResourceStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SearchServiceSharedPrivateLinkResourceStatus other && Equals(other); - /// - public bool Equals(SearchServiceSharedPrivateLinkResourceStatus 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; + /// Pending. + Pending, + /// Approved. + Approved, + /// Rejected. + Rejected, + /// Disconnected. + Disconnected } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuName.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuName.Serialization.cs new file mode 100644 index 000000000000..87d551d144f9 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuName.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.Search.Models +{ + internal static partial class SearchServiceSkuNameExtensions + { + public static string ToSerialString(this SearchServiceSkuName value) => value switch + { + SearchServiceSkuName.Free => "free", + SearchServiceSkuName.Basic => "basic", + SearchServiceSkuName.Standard => "standard", + SearchServiceSkuName.Standard2 => "standard2", + SearchServiceSkuName.Standard3 => "standard3", + SearchServiceSkuName.StorageOptimizedL1 => "storage_optimized_l1", + SearchServiceSkuName.StorageOptimizedL2 => "storage_optimized_l2", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchServiceSkuName value.") + }; + + public static SearchServiceSkuName ToSearchServiceSkuName(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "free")) return SearchServiceSkuName.Free; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "basic")) return SearchServiceSkuName.Basic; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "standard")) return SearchServiceSkuName.Standard; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "standard2")) return SearchServiceSkuName.Standard2; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "standard3")) return SearchServiceSkuName.Standard3; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "storage_optimized_l1")) return SearchServiceSkuName.StorageOptimizedL1; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "storage_optimized_l2")) return SearchServiceSkuName.StorageOptimizedL2; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SearchServiceSkuName value."); + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuName.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuName.cs index 26fec6812e95..24f76a4d2ae7 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuName.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuName.cs @@ -5,62 +5,24 @@ #nullable disable -using System; -using System.ComponentModel; - namespace Azure.ResourceManager.Search.Models { /// The SKU of the search service. Valid values include: 'free': Shared service. 'basic': Dedicated service with up to 3 replicas. 'standard': Dedicated service with up to 12 partitions and 12 replicas. 'standard2': Similar to standard, but with more capacity per search unit. 'standard3': The largest Standard offering with up to 12 partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports 2TB per partition, up to 12 partitions.'. - public readonly partial struct SearchServiceSkuName : IEquatable + public enum SearchServiceSkuName { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SearchServiceSkuName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string FreeValue = "free"; - private const string BasicValue = "basic"; - private const string StandardValue = "standard"; - private const string Standard2Value = "standard2"; - private const string Standard3Value = "standard3"; - private const string StorageOptimizedL1Value = "storage_optimized_l1"; - private const string StorageOptimizedL2Value = "storage_optimized_l2"; - /// Free tier, with no SLA guarantees and a subset of the features offered on billable tiers. - public static SearchServiceSkuName Free { get; } = new SearchServiceSkuName(FreeValue); + Free, /// Billable tier for a dedicated service having up to 3 replicas. - public static SearchServiceSkuName Basic { get; } = new SearchServiceSkuName(BasicValue); + Basic, /// Billable tier for a dedicated service having up to 12 partitions and 12 replicas. - public static SearchServiceSkuName Standard { get; } = new SearchServiceSkuName(StandardValue); + Standard, /// Similar to 'standard', but with more capacity per search unit. - public static SearchServiceSkuName Standard2 { get; } = new SearchServiceSkuName(Standard2Value); + Standard2, /// The largest Standard offering with up to 12 partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). - public static SearchServiceSkuName Standard3 { get; } = new SearchServiceSkuName(Standard3Value); + Standard3, /// Billable tier for a dedicated service that supports 1TB per partition, up to 12 partitions. - public static SearchServiceSkuName StorageOptimizedL1 { get; } = new SearchServiceSkuName(StorageOptimizedL1Value); + StorageOptimizedL1, /// Billable tier for a dedicated service that supports 2TB per partition, up to 12 partitions. - public static SearchServiceSkuName StorageOptimizedL2 { get; } = new SearchServiceSkuName(StorageOptimizedL2Value); - /// Determines if two values are the same. - public static bool operator ==(SearchServiceSkuName left, SearchServiceSkuName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SearchServiceSkuName left, SearchServiceSkuName right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SearchServiceSkuName(string value) => new SearchServiceSkuName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SearchServiceSkuName other && Equals(other); - /// - public bool Equals(SearchServiceSkuName 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; + StorageOptimizedL2 } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuOffering.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuOffering.Serialization.cs deleted file mode 100644 index 0bf6561f2511..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuOffering.Serialization.cs +++ /dev/null @@ -1,199 +0,0 @@ -// 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; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - public partial class SearchServiceSkuOffering : 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(SearchServiceSkuOffering)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku, options); - } - if (Optional.IsDefined(Limits)) - { - writer.WritePropertyName("limits"u8); - writer.WriteObjectValue(Limits, 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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SearchServiceSkuOffering 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(SearchServiceSkuOffering)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSearchServiceSkuOffering(document.RootElement, options); - } - - internal static SearchServiceSkuOffering DeserializeSearchServiceSkuOffering(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - SearchSku sku = default; - SearchServiceSkuOfferingLimits limits = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sku"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sku = SearchSku.DeserializeSearchSku(property.Value, options); - continue; - } - if (property.NameEquals("limits"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - limits = SearchServiceSkuOfferingLimits.DeserializeSearchServiceSkuOfferingLimits(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SearchServiceSkuOffering(sku, limits, serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SkuName", out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" sku: "); - builder.AppendLine("{"); - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - builder.AppendLine(" }"); - } - else - { - if (Optional.IsDefined(Sku)) - { - builder.Append(" sku: "); - BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Limits), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" limits: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Limits)) - { - builder.Append(" limits: "); - BicepSerializationHelpers.AppendChildObject(builder, Limits, options, 2, false, " limits: "); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(SearchServiceSkuOffering)} does not support writing '{options.Format}' format."); - } - } - - SearchServiceSkuOffering 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSearchServiceSkuOffering(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SearchServiceSkuOffering)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuOffering.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuOffering.cs deleted file mode 100644 index a134678f8695..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuOffering.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.Search.Models -{ - /// The SearchServiceSkuOffering. - public partial class SearchServiceSkuOffering - { - /// - /// 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 . - internal SearchServiceSkuOffering() - { - } - - /// Initializes a new instance of . - /// Defines the SKU of a search service, which determines billing rate and capacity limits. - /// The limits associated with this SKU offered in this region. - /// Keeps track of any properties unknown to the library. - internal SearchServiceSkuOffering(SearchSku sku, SearchServiceSkuOfferingLimits limits, IDictionary serializedAdditionalRawData) - { - Sku = sku; - Limits = limits; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Defines the SKU of a search service, which determines billing rate and capacity limits. - internal SearchSku Sku { get; } - /// The SKU of the search service. Valid values include: 'free': Shared service. 'basic': Dedicated service with up to 3 replicas. 'standard': Dedicated service with up to 12 partitions and 12 replicas. 'standard2': Similar to standard, but with more capacity per search unit. 'standard3': The largest Standard offering with up to 12 partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports 2TB per partition, up to 12 partitions.'. - [WirePath("sku.name")] - public SearchServiceSkuName? SkuName - { - get => Sku?.Name; - } - - /// The limits associated with this SKU offered in this region. - [WirePath("limits")] - public SearchServiceSkuOfferingLimits Limits { get; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuOfferingLimits.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuOfferingLimits.Serialization.cs deleted file mode 100644 index a945ccf7247a..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuOfferingLimits.Serialization.cs +++ /dev/null @@ -1,354 +0,0 @@ -// 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; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Search.Models -{ - public partial class SearchServiceSkuOfferingLimits : 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(SearchServiceSkuOfferingLimits)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Indexes)) - { - writer.WritePropertyName("indexes"u8); - writer.WriteNumberValue(Indexes.Value); - } - if (Optional.IsDefined(Indexers)) - { - writer.WritePropertyName("indexers"u8); - writer.WriteNumberValue(Indexers.Value); - } - if (Optional.IsDefined(PartitionStorageInGigabytes)) - { - writer.WritePropertyName("partitionStorageInGigabytes"u8); - writer.WriteNumberValue(PartitionStorageInGigabytes.Value); - } - if (Optional.IsDefined(PartitionVectorStorageInGigabytes)) - { - writer.WritePropertyName("partitionVectorStorageInGigabytes"u8); - writer.WriteNumberValue(PartitionVectorStorageInGigabytes.Value); - } - if (Optional.IsDefined(SearchUnits)) - { - writer.WritePropertyName("searchUnits"u8); - writer.WriteNumberValue(SearchUnits.Value); - } - if (Optional.IsDefined(Replicas)) - { - writer.WritePropertyName("replicas"u8); - writer.WriteNumberValue(Replicas.Value); - } - if (Optional.IsDefined(Partitions)) - { - writer.WritePropertyName("partitions"u8); - writer.WriteNumberValue(Partitions.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, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SearchServiceSkuOfferingLimits 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(SearchServiceSkuOfferingLimits)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSearchServiceSkuOfferingLimits(document.RootElement, options); - } - - internal static SearchServiceSkuOfferingLimits DeserializeSearchServiceSkuOfferingLimits(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int? indexes = default; - int? indexers = default; - float? partitionStorageInGigabytes = default; - float? partitionVectorStorageInGigabytes = default; - int? searchUnits = default; - int? replicas = default; - int? partitions = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("indexes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - indexes = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("indexers"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - indexers = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("partitionStorageInGigabytes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionStorageInGigabytes = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("partitionVectorStorageInGigabytes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitionVectorStorageInGigabytes = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("searchUnits"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - searchUnits = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("replicas"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - replicas = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("partitions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - partitions = property.Value.GetInt32(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SearchServiceSkuOfferingLimits( - indexes, - indexers, - partitionStorageInGigabytes, - partitionVectorStorageInGigabytes, - searchUnits, - replicas, - partitions, - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Indexes), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" indexes: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Indexes)) - { - builder.Append(" indexes: "); - builder.AppendLine($"{Indexes.Value}"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Indexers), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" indexers: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Indexers)) - { - builder.Append(" indexers: "); - builder.AppendLine($"{Indexers.Value}"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartitionStorageInGigabytes), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" partitionStorageInGigabytes: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(PartitionStorageInGigabytes)) - { - builder.Append(" partitionStorageInGigabytes: "); - builder.AppendLine($"'{PartitionStorageInGigabytes.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartitionVectorStorageInGigabytes), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" partitionVectorStorageInGigabytes: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(PartitionVectorStorageInGigabytes)) - { - builder.Append(" partitionVectorStorageInGigabytes: "); - builder.AppendLine($"'{PartitionVectorStorageInGigabytes.Value.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SearchUnits), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" searchUnits: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SearchUnits)) - { - builder.Append(" searchUnits: "); - builder.AppendLine($"{SearchUnits.Value}"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Replicas), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" replicas: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Replicas)) - { - builder.Append(" replicas: "); - builder.AppendLine($"{Replicas.Value}"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Partitions), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" partitions: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Partitions)) - { - builder.Append(" partitions: "); - builder.AppendLine($"{Partitions.Value}"); - } - } - - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(SearchServiceSkuOfferingLimits)} does not support writing '{options.Format}' format."); - } - } - - SearchServiceSkuOfferingLimits 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSearchServiceSkuOfferingLimits(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SearchServiceSkuOfferingLimits)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuOfferingLimits.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuOfferingLimits.cs deleted file mode 100644 index 3752a52646d0..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceSkuOfferingLimits.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.Search.Models -{ - /// The limits associated with this SKU offered in this region. - public partial class SearchServiceSkuOfferingLimits - { - /// - /// 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 . - internal SearchServiceSkuOfferingLimits() - { - } - - /// Initializes a new instance of . - /// The maximum number of indexes available for this SKU. - /// The maximum number of indexers available for this SKU. - /// The maximum storage size in Gigabytes available for this SKU per partition. - /// The maximum vector storage size in Gigabytes available for this SKU per partition. - /// The maximum number of search units available for this SKU. - /// The maximum number of replicas available for this SKU. - /// The maximum number of partitions available for this SKU. - /// Keeps track of any properties unknown to the library. - internal SearchServiceSkuOfferingLimits(int? indexes, int? indexers, float? partitionStorageInGigabytes, float? partitionVectorStorageInGigabytes, int? searchUnits, int? replicas, int? partitions, IDictionary serializedAdditionalRawData) - { - Indexes = indexes; - Indexers = indexers; - PartitionStorageInGigabytes = partitionStorageInGigabytes; - PartitionVectorStorageInGigabytes = partitionVectorStorageInGigabytes; - SearchUnits = searchUnits; - Replicas = replicas; - Partitions = partitions; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The maximum number of indexes available for this SKU. - [WirePath("indexes")] - public int? Indexes { get; } - /// The maximum number of indexers available for this SKU. - [WirePath("indexers")] - public int? Indexers { get; } - /// The maximum storage size in Gigabytes available for this SKU per partition. - [WirePath("partitionStorageInGigabytes")] - public float? PartitionStorageInGigabytes { get; } - /// The maximum vector storage size in Gigabytes available for this SKU per partition. - [WirePath("partitionVectorStorageInGigabytes")] - public float? PartitionVectorStorageInGigabytes { get; } - /// The maximum number of search units available for this SKU. - [WirePath("searchUnits")] - public int? SearchUnits { get; } - /// The maximum number of replicas available for this SKU. - [WirePath("replicas")] - public int? Replicas { get; } - /// The maximum number of partitions available for this SKU. - [WirePath("partitions")] - public int? Partitions { get; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceStatus.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceStatus.cs index 0cf93dd02fe0..5a71290c9c69 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceStatus.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServiceStatus.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Search.Models { - /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. 'stopped': The search service is in a subscription that's disabled. If your service is in the degraded, disabled, or error states, it means the Azure AI Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. + /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. If your service is in the degraded, disabled, or error states, Microsoft is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. public enum SearchServiceStatus { /// The search service is running and no provisioning operations are underway. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchSku.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchSku.Serialization.cs index f540094da8d4..10eb9b54fb2f 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchSku.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchSku.Serialization.cs @@ -38,7 +38,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name.Value.ToString()); + writer.WriteStringValue(Name.Value.ToSerialString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -88,7 +88,7 @@ internal static SearchSku DeserializeSearchSku(JsonElement element, ModelReaderW { continue; } - name = new SearchServiceSkuName(property.Value.GetString()); + name = property.Value.GetString().ToSearchServiceSkuName(); continue; } if (options.Format != "W") @@ -122,7 +122,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(Name)) { builder.Append(" name: "); - builder.AppendLine($"'{Name.Value.ToString()}'"); + builder.AppendLine($"'{Name.Value.ToSerialString()}'"); } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ShareableSearchServicePrivateLinkResourceProperties.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ShareableSearchServicePrivateLinkResourceProperties.cs index 84a5c2b2d937..c1143d75859a 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ShareableSearchServicePrivateLinkResourceProperties.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ShareableSearchServicePrivateLinkResourceProperties.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Describes the properties of a resource type that has been onboarded to private link service, supported by Azure AI Search. + /// Describes the properties of a resource type that has been onboarded to private link service and that's supported by search. public partial class ShareableSearchServicePrivateLinkResourceProperties { /// @@ -51,9 +51,9 @@ internal ShareableSearchServicePrivateLinkResourceProperties() } /// Initializes a new instance of . - /// The resource provider type for the resource that has been onboarded to private link service, supported by Azure AI Search. - /// The resource provider group id for the resource that has been onboarded to private link service, supported by Azure AI Search. - /// The description of the resource type that has been onboarded to private link service, supported by Azure AI Search. + /// The resource provider type for the resource that has been onboarded to private link service and that's supported by search. + /// The resource provider group id for the resource that has been onboarded to private link service and that's supported by search. + /// The description of the resource type that has been onboarded to private link service and that's supported by search. /// Keeps track of any properties unknown to the library. internal ShareableSearchServicePrivateLinkResourceProperties(string shareablePrivateLinkResourcePropertiesType, string groupId, string description, IDictionary serializedAdditionalRawData) { @@ -63,13 +63,13 @@ internal ShareableSearchServicePrivateLinkResourceProperties(string shareablePri _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The resource provider type for the resource that has been onboarded to private link service, supported by Azure AI Search. + /// The resource provider type for the resource that has been onboarded to private link service and that's supported by search. [WirePath("type")] public string ShareablePrivateLinkResourcePropertiesType { get; } - /// The resource provider group id for the resource that has been onboarded to private link service, supported by Azure AI Search. + /// The resource provider group id for the resource that has been onboarded to private link service and that's supported by search. [WirePath("groupId")] public string GroupId { get; } - /// The description of the resource type that has been onboarded to private link service, supported by Azure AI Search. + /// The description of the resource type that has been onboarded to private link service and that's supported by search. [WirePath("description")] public string Description { get; } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ShareableSearchServicePrivateLinkResourceType.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ShareableSearchServicePrivateLinkResourceType.cs index 9d6bca19c81b..cc6e370a3c2d 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ShareableSearchServicePrivateLinkResourceType.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ShareableSearchServicePrivateLinkResourceType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Describes an resource type that has been onboarded to private link service, supported by Azure AI Search. + /// Describes a resource type that has been onboarded to private link service and that's supported by search. public partial class ShareableSearchServicePrivateLinkResourceType { /// @@ -51,8 +51,8 @@ internal ShareableSearchServicePrivateLinkResourceType() } /// Initializes a new instance of . - /// The name of the resource type that has been onboarded to private link service, supported by Azure AI Search. - /// Describes the properties of a resource type that has been onboarded to private link service, supported by Azure AI Search. + /// The name of the resource type that has been onboarded to private link service and that's supported by search. + /// Describes the properties of a resource type that has been onboarded to private link service and that's supported by search. /// Keeps track of any properties unknown to the library. internal ShareableSearchServicePrivateLinkResourceType(string name, ShareableSearchServicePrivateLinkResourceProperties properties, IDictionary serializedAdditionalRawData) { @@ -61,10 +61,10 @@ internal ShareableSearchServicePrivateLinkResourceType(string name, ShareableSea _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The name of the resource type that has been onboarded to private link service, supported by Azure AI Search. + /// The name of the resource type that has been onboarded to private link service and that's supported by search. [WirePath("name")] public string Name { get; } - /// Describes the properties of a resource type that has been onboarded to private link service, supported by Azure AI Search. + /// Describes the properties of a resource type that has been onboarded to private link service and that's supported by search. [WirePath("properties")] public ShareableSearchServicePrivateLinkResourceProperties Properties { get; } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SharedPrivateLinkResourceListResult.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SharedPrivateLinkResourceListResult.cs index f89816ef828a..204c01d3175f 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SharedPrivateLinkResourceListResult.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SharedPrivateLinkResourceListResult.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Response containing a list of shared private link resources. + /// Response containing a list of Shared Private Link Resources. internal partial class SharedPrivateLinkResourceListResult { /// @@ -52,7 +52,7 @@ internal SharedPrivateLinkResourceListResult() } /// Initializes a new instance of . - /// The list of shared private link resources. + /// The list of Shared Private Link Resources. /// The URL to get the next set of shared private link resources, if there are any. /// Keeps track of any properties unknown to the library. internal SharedPrivateLinkResourceListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) @@ -62,7 +62,7 @@ internal SharedPrivateLinkResourceListResult(IReadOnlyList The list of shared private link resources. + /// The list of Shared Private Link Resources. public IReadOnlyList Value { get; } /// The URL to get the next set of shared private link resources, if there are any. public string NextLink { get; } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceProperties.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceProperties.Serialization.cs index 916999f1245b..0d9fc6c6a30e 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceProperties.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceProperties.Serialization.cs @@ -58,12 +58,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(SharedPrivateLinkResourceStatus)) { writer.WritePropertyName("status"u8); - writer.WriteStringValue(SharedPrivateLinkResourceStatus.Value.ToString()); + writer.WriteStringValue(SharedPrivateLinkResourceStatus.Value.ToSerialString()); } if (Optional.IsDefined(SharedPrivateLinkResourceProvisioningState)) { writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(SharedPrivateLinkResourceProvisioningState.Value.ToString()); + writer.WriteStringValue(SharedPrivateLinkResourceProvisioningState.Value.ToSerialString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -146,7 +146,7 @@ internal static SharedSearchServicePrivateLinkResourceProperties DeserializeShar { continue; } - status = new SearchServiceSharedPrivateLinkResourceStatus(property.Value.GetString()); + status = property.Value.GetString().ToSearchServiceSharedPrivateLinkResourceStatus(); continue; } if (property.NameEquals("provisioningState"u8)) @@ -155,7 +155,7 @@ internal static SharedSearchServicePrivateLinkResourceProperties DeserializeShar { continue; } - provisioningState = new SearchServiceSharedPrivateLinkResourceProvisioningState(property.Value.GetString()); + provisioningState = property.Value.GetString().ToSearchServiceSharedPrivateLinkResourceProvisioningState(); continue; } if (options.Format != "W") @@ -272,7 +272,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(SharedPrivateLinkResourceStatus)) { builder.Append(" status: "); - builder.AppendLine($"'{SharedPrivateLinkResourceStatus.Value.ToString()}'"); + builder.AppendLine($"'{SharedPrivateLinkResourceStatus.Value.ToSerialString()}'"); } } @@ -287,7 +287,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(SharedPrivateLinkResourceProvisioningState)) { builder.Append(" provisioningState: "); - builder.AppendLine($"'{SharedPrivateLinkResourceProvisioningState.Value.ToString()}'"); + builder.AppendLine($"'{SharedPrivateLinkResourceProvisioningState.Value.ToSerialString()}'"); } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceProperties.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceProperties.cs index 12533742bff9..4650d3372a49 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceProperties.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SharedSearchServicePrivateLinkResourceProperties.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Search.Models { - /// Describes the properties of an existing shared private link resource managed by the Azure AI Search service. + /// Describes the properties of an existing Shared Private Link Resource managed by the search service. public partial class SharedSearchServicePrivateLinkResourceProperties { /// @@ -52,10 +52,10 @@ public SharedSearchServicePrivateLinkResourceProperties() } /// Initializes a new instance of . - /// The resource ID of the resource the shared private link resource is for. - /// The group ID from the provider of resource the shared private link resource is for. - /// The message for requesting approval of the shared private link resource. - /// Optional. Can be used to specify the Azure Resource Manager location of the resource for which a shared private link is being created. This is only required for those resources whose DNS configuration are regional (such as Azure Kubernetes Service). + /// The resource id of the resource the shared private link resource is for. + /// The group id from the provider of resource the shared private link resource is for. + /// The request message for requesting approval of the shared private link resource. + /// Optional. Can be used to specify the Azure Resource Manager location of the resource to which a shared private link is to be created. This is only required for those resources whose DNS configuration are regional (such as Azure Kubernetes Service). /// Status of the shared private link resource. Valid values are Pending, Approved, Rejected or Disconnected. /// The provisioning state of the shared private link resource. Valid values are Updating, Deleting, Failed, Succeeded or Incomplete. /// Keeps track of any properties unknown to the library. @@ -70,16 +70,16 @@ internal SharedSearchServicePrivateLinkResourceProperties(ResourceIdentifier pri _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The resource ID of the resource the shared private link resource is for. + /// The resource id of the resource the shared private link resource is for. [WirePath("privateLinkResourceId")] public ResourceIdentifier PrivateLinkResourceId { get; set; } - /// The group ID from the provider of resource the shared private link resource is for. + /// The group id from the provider of resource the shared private link resource is for. [WirePath("groupId")] public string GroupId { get; set; } - /// The message for requesting approval of the shared private link resource. + /// The request message for requesting approval of the shared private link resource. [WirePath("requestMessage")] public string RequestMessage { get; set; } - /// Optional. Can be used to specify the Azure Resource Manager location of the resource for which a shared private link is being created. This is only required for those resources whose DNS configuration are regional (such as Azure Kubernetes Service). + /// Optional. Can be used to specify the Azure Resource Manager location of the resource to which a shared private link is to be created. This is only required for those resources whose DNS configuration are regional (such as Azure Kubernetes Service). [WirePath("resourceRegion")] public AzureLocation? ResourceRegion { get; set; } /// Status of the shared private link resource. Valid values are Pending, Approved, Rejected or Disconnected. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs deleted file mode 100644 index 0d683769bcb3..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs +++ /dev/null @@ -1,395 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.Search -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetNetworkSecurityPerimeterConfigurations method from an instance of . - /// - public partial class NetworkSecurityPerimeterConfigurationCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _networkSecurityPerimeterConfigurationClientDiagnostics; - private readonly NetworkSecurityPerimeterConfigurationsRestOperations _networkSecurityPerimeterConfigurationRestClient; - - /// Initializes a new instance of the class for mocking. - protected NetworkSecurityPerimeterConfigurationCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal NetworkSecurityPerimeterConfigurationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _networkSecurityPerimeterConfigurationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Search", NetworkSecurityPerimeterConfigurationResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(NetworkSecurityPerimeterConfigurationResource.ResourceType, out string networkSecurityPerimeterConfigurationApiVersion); - _networkSecurityPerimeterConfigurationRestClient = new NetworkSecurityPerimeterConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkSecurityPerimeterConfigurationApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != SearchServiceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SearchServiceResource.ResourceType), nameof(id)); - } - - /// - /// Gets a network security perimeter configuration. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName} - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_Get - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The network security configuration name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string nspConfigName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nspConfigName, nameof(nspConfigName)); - - using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationCollection.Get"); - scope.Start(); - try - { - var response = await _networkSecurityPerimeterConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, nspConfigName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a network security perimeter configuration. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName} - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_Get - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The network security configuration name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string nspConfigName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nspConfigName, nameof(nspConfigName)); - - using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationCollection.Get"); - scope.Start(); - try - { - var response = _networkSecurityPerimeterConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, nspConfigName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a list of network security perimeter configurations for a search service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_ListByService - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _networkSecurityPerimeterConfigurationRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkSecurityPerimeterConfigurationRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkSecurityPerimeterConfigurationResource(Client, NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(e)), _networkSecurityPerimeterConfigurationClientDiagnostics, Pipeline, "NetworkSecurityPerimeterConfigurationCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Gets a list of network security perimeter configurations for a search service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_ListByService - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _networkSecurityPerimeterConfigurationRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkSecurityPerimeterConfigurationRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkSecurityPerimeterConfigurationResource(Client, NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(e)), _networkSecurityPerimeterConfigurationClientDiagnostics, Pipeline, "NetworkSecurityPerimeterConfigurationCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName} - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_Get - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The network security configuration name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string nspConfigName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nspConfigName, nameof(nspConfigName)); - - using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationCollection.Exists"); - scope.Start(); - try - { - var response = await _networkSecurityPerimeterConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, nspConfigName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName} - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_Get - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The network security configuration name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string nspConfigName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nspConfigName, nameof(nspConfigName)); - - using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationCollection.Exists"); - scope.Start(); - try - { - var response = _networkSecurityPerimeterConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, nspConfigName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName} - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_Get - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The network security configuration name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string nspConfigName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nspConfigName, nameof(nspConfigName)); - - using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _networkSecurityPerimeterConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, nspConfigName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new NetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName} - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_Get - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The network security configuration name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string nspConfigName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(nspConfigName, nameof(nspConfigName)); - - using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationCollection.GetIfExists"); - scope.Start(); - try - { - var response = _networkSecurityPerimeterConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, nspConfigName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new NetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs deleted file mode 100644 index a047985f9510..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs +++ /dev/null @@ -1,406 +0,0 @@ -// 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.Linq; -using System.Text; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.Search.Models; - -namespace Azure.ResourceManager.Search -{ - public partial class NetworkSecurityPerimeterConfigurationData : 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 override 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(NetworkSecurityPerimeterConfigurationData)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState); - } - if (Optional.IsDefined(NetworkSecurityPerimeter)) - { - writer.WritePropertyName("networkSecurityPerimeter"u8); - writer.WriteObjectValue(NetworkSecurityPerimeter, options); - } - if (Optional.IsDefined(ResourceAssociation)) - { - writer.WritePropertyName("resourceAssociation"u8); - writer.WriteObjectValue(ResourceAssociation, options); - } - if (Optional.IsDefined(Profile)) - { - writer.WritePropertyName("profile"u8); - writer.WriteObjectValue(Profile, options); - } - if (Optional.IsCollectionDefined(ProvisioningIssues)) - { - writer.WritePropertyName("provisioningIssues"u8); - writer.WriteStartArray(); - foreach (var item in ProvisioningIssues) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - NetworkSecurityPerimeterConfigurationData 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(NetworkSecurityPerimeterConfigurationData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement, options); - } - - internal static NetworkSecurityPerimeterConfigurationData DeserializeNetworkSecurityPerimeterConfigurationData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - string provisioningState = default; - NspConfigPerimeter networkSecurityPerimeter = default; - NspConfigAssociation resourceAssociation = default; - NspConfigProfile profile = default; - IList provisioningIssues = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("provisioningState"u8)) - { - provisioningState = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("networkSecurityPerimeter"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - networkSecurityPerimeter = NspConfigPerimeter.DeserializeNspConfigPerimeter(property0.Value, options); - continue; - } - if (property0.NameEquals("resourceAssociation"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resourceAssociation = NspConfigAssociation.DeserializeNspConfigAssociation(property0.Value, options); - continue; - } - if (property0.NameEquals("profile"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - profile = NspConfigProfile.DeserializeNspConfigProfile(property0.Value, options); - continue; - } - if (property0.NameEquals("provisioningIssues"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(NspProvisioningIssue.DeserializeNspProvisioningIssue(item, options)); - } - provisioningIssues = array; - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new NetworkSecurityPerimeterConfigurationData( - id, - name, - type, - systemData, - provisioningState, - networkSecurityPerimeter, - resourceAssociation, - profile, - provisioningIssues ?? new ChangeTrackingList(), - serializedAdditionalRawData); - } - - private BinaryData SerializeBicep(ModelReaderWriterOptions options) - { - StringBuilder builder = new StringBuilder(); - BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; - IDictionary propertyOverrides = null; - bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); - bool hasPropertyOverride = false; - string propertyOverride = null; - - builder.AppendLine("{"); - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" name: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Name)) - { - builder.Append(" name: "); - if (Name.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Name}'''"); - } - else - { - builder.AppendLine($"'{Name}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" id: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Id)) - { - builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" systemData: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SystemData)) - { - builder.Append(" systemData: "); - builder.AppendLine($"'{SystemData.ToString()}'"); - } - } - - builder.Append(" properties:"); - builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" provisioningState: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ProvisioningState)) - { - builder.Append(" provisioningState: "); - if (ProvisioningState.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{ProvisioningState}'''"); - } - else - { - builder.AppendLine($"'{ProvisioningState}'"); - } - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkSecurityPerimeter), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" networkSecurityPerimeter: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(NetworkSecurityPerimeter)) - { - builder.Append(" networkSecurityPerimeter: "); - BicepSerializationHelpers.AppendChildObject(builder, NetworkSecurityPerimeter, options, 4, false, " networkSecurityPerimeter: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ResourceAssociation), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" resourceAssociation: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ResourceAssociation)) - { - builder.Append(" resourceAssociation: "); - BicepSerializationHelpers.AppendChildObject(builder, ResourceAssociation, options, 4, false, " resourceAssociation: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Profile), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" profile: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Profile)) - { - builder.Append(" profile: "); - BicepSerializationHelpers.AppendChildObject(builder, Profile, options, 4, false, " profile: "); - } - } - - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningIssues), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" provisioningIssues: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(ProvisioningIssues)) - { - if (ProvisioningIssues.Any()) - { - builder.Append(" provisioningIssues: "); - builder.AppendLine("["); - foreach (var item in ProvisioningIssues) - { - BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " provisioningIssues: "); - } - builder.AppendLine(" ]"); - } - } - } - - builder.AppendLine(" }"); - builder.AppendLine("}"); - return BinaryData.FromString(builder.ToString()); - } - - 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); - case "bicep": - return SerializeBicep(options); - default: - throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support writing '{options.Format}' format."); - } - } - - NetworkSecurityPerimeterConfigurationData 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, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationData.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationData.cs deleted file mode 100644 index a46b54fe3a32..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationData.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.Search.Models; - -namespace Azure.ResourceManager.Search -{ - /// - /// A class representing the NetworkSecurityPerimeterConfiguration data model. - /// Network security perimeter configuration for a server. - /// - public partial class NetworkSecurityPerimeterConfigurationData : ResourceData - { - /// - /// 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 NetworkSecurityPerimeterConfigurationData() - { - ProvisioningIssues = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// The perimeter for a network security perimeter configuration. - /// The resource association for the network security perimeter. - /// The profile for a network security perimeter configuration. - /// - /// Keeps track of any properties unknown to the library. - internal NetworkSecurityPerimeterConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string provisioningState, NspConfigPerimeter networkSecurityPerimeter, NspConfigAssociation resourceAssociation, NspConfigProfile profile, IList provisioningIssues, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - ProvisioningState = provisioningState; - NetworkSecurityPerimeter = networkSecurityPerimeter; - ResourceAssociation = resourceAssociation; - Profile = profile; - ProvisioningIssues = provisioningIssues; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets the provisioning state. - [WirePath("properties.provisioningState")] - public string ProvisioningState { get; } - /// The perimeter for a network security perimeter configuration. - [WirePath("properties.networkSecurityPerimeter")] - public NspConfigPerimeter NetworkSecurityPerimeter { get; set; } - /// The resource association for the network security perimeter. - [WirePath("properties.resourceAssociation")] - public NspConfigAssociation ResourceAssociation { get; set; } - /// The profile for a network security perimeter configuration. - [WirePath("properties.profile")] - public NspConfigProfile Profile { get; set; } - /// Gets the provisioning issues. - [WirePath("properties.provisioningIssues")] - public IList ProvisioningIssues { get; } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs deleted file mode 100644 index 26094e742419..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.Search -{ - public partial class NetworkSecurityPerimeterConfigurationResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - NetworkSecurityPerimeterConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs deleted file mode 100644 index 1b03582779ad..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.Search -{ - /// - /// A Class representing a NetworkSecurityPerimeterConfiguration along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetNetworkSecurityPerimeterConfigurationResource method. - /// Otherwise you can get one from its parent resource using the GetNetworkSecurityPerimeterConfiguration method. - /// - public partial class NetworkSecurityPerimeterConfigurationResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The searchServiceName. - /// The nspConfigName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string searchServiceName, string nspConfigName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _networkSecurityPerimeterConfigurationClientDiagnostics; - private readonly NetworkSecurityPerimeterConfigurationsRestOperations _networkSecurityPerimeterConfigurationRestClient; - private readonly NetworkSecurityPerimeterConfigurationData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.Search/searchServices/networkSecurityPerimeterConfigurations"; - - /// Initializes a new instance of the class for mocking. - protected NetworkSecurityPerimeterConfigurationResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal NetworkSecurityPerimeterConfigurationResource(ArmClient client, NetworkSecurityPerimeterConfigurationData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal NetworkSecurityPerimeterConfigurationResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _networkSecurityPerimeterConfigurationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Search", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string networkSecurityPerimeterConfigurationApiVersion); - _networkSecurityPerimeterConfigurationRestClient = new NetworkSecurityPerimeterConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkSecurityPerimeterConfigurationApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual NetworkSecurityPerimeterConfigurationData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets a network security perimeter configuration. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName} - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_Get - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationResource.Get"); - scope.Start(); - try - { - var response = await _networkSecurityPerimeterConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a network security perimeter configuration. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName} - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_Get - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationResource.Get"); - scope.Start(); - try - { - var response = _networkSecurityPerimeterConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new NetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Reconcile network security perimeter configuration for the Azure AI Search resource provider. This triggers a manual resync with network security perimeter configurations by ensuring the search service carries the latest configuration. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}/reconcile - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_Reconcile - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task ReconcileAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationResource.Reconcile"); - scope.Start(); - try - { - var response = await _networkSecurityPerimeterConfigurationRestClient.ReconcileAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new SearchArmOperation(_networkSecurityPerimeterConfigurationClientDiagnostics, Pipeline, _networkSecurityPerimeterConfigurationRestClient.CreateReconcileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Reconcile network security perimeter configuration for the Azure AI Search resource provider. This triggers a manual resync with network security perimeter configurations by ensuring the search service carries the latest configuration. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}/reconcile - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_Reconcile - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Reconcile(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationResource.Reconcile"); - scope.Start(); - try - { - var response = _networkSecurityPerimeterConfigurationRestClient.Reconcile(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new SearchArmOperation(_networkSecurityPerimeterConfigurationClientDiagnostics, Pipeline, _networkSecurityPerimeterConfigurationRestClient.CreateReconcileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/AdminKeysRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/AdminKeysRestOperations.cs index a5b39a26c410..d0d8e6dd239a 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/AdminKeysRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/AdminKeysRestOperations.cs @@ -32,7 +32,7 @@ public AdminKeysRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,10 +72,10 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Gets the primary and secondary admin API keys for the specified Azure AI Search service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// Gets the primary and secondary admin API keys for the specified search service. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. @@ -102,10 +102,10 @@ public async Task> GetAsync(string subscri } } - /// Gets the primary and secondary admin API keys for the specified Azure AI Search service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// Gets the primary and secondary admin API keys for the specified search service. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. @@ -171,9 +171,9 @@ internal HttpMessage CreateRegenerateRequest(string subscriptionId, string resou } /// Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Specifies which key to regenerate. Valid values include 'primary' and 'secondary'. /// Parameter group. /// The cancellation token to use. @@ -202,9 +202,9 @@ public async Task> RegenerateAsync(string } /// Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Specifies which key to regenerate. Valid values include 'primary' and 'secondary'. /// Parameter group. /// The cancellation token to use. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs deleted file mode 100644 index 7881c84a1115..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs +++ /dev/null @@ -1,413 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Search.Models; - -namespace Azure.ResourceManager.Search -{ - internal partial class NetworkSecurityPerimeterConfigurationsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of NetworkSecurityPerimeterConfigurationsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public NetworkSecurityPerimeterConfigurationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListByServiceRequestUri(string subscriptionId, string resourceGroupName, string searchServiceName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Search/searchServices/", false); - uri.AppendPath(searchServiceName, true); - uri.AppendPath("/networkSecurityPerimeterConfigurations", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string searchServiceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Search/searchServices/", false); - uri.AppendPath(searchServiceName, true); - uri.AppendPath("/networkSecurityPerimeterConfigurations", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a list of network security perimeter configurations for a search service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string searchServiceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); - - using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, searchServiceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - NetworkSecurityPerimeterConfigurationListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NetworkSecurityPerimeterConfigurationListResult.DeserializeNetworkSecurityPerimeterConfigurationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a list of network security perimeter configurations for a search service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByService(string subscriptionId, string resourceGroupName, string searchServiceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); - - using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, searchServiceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - NetworkSecurityPerimeterConfigurationListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NetworkSecurityPerimeterConfigurationListResult.DeserializeNetworkSecurityPerimeterConfigurationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string searchServiceName, string nspConfigName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Search/searchServices/", false); - uri.AppendPath(searchServiceName, true); - uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); - uri.AppendPath(nspConfigName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string searchServiceName, string nspConfigName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Search/searchServices/", false); - uri.AppendPath(searchServiceName, true); - uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); - uri.AppendPath(nspConfigName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a network security perimeter configuration. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The network security configuration name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string searchServiceName, string nspConfigName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); - Argument.AssertNotNullOrEmpty(nspConfigName, nameof(nspConfigName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, searchServiceName, nspConfigName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - NetworkSecurityPerimeterConfigurationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((NetworkSecurityPerimeterConfigurationData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a network security perimeter configuration. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The network security configuration name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string searchServiceName, string nspConfigName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); - Argument.AssertNotNullOrEmpty(nspConfigName, nameof(nspConfigName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, searchServiceName, nspConfigName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - NetworkSecurityPerimeterConfigurationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((NetworkSecurityPerimeterConfigurationData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateReconcileRequestUri(string subscriptionId, string resourceGroupName, string searchServiceName, string nspConfigName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Search/searchServices/", false); - uri.AppendPath(searchServiceName, true); - uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); - uri.AppendPath(nspConfigName, true); - uri.AppendPath("/reconcile", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateReconcileRequest(string subscriptionId, string resourceGroupName, string searchServiceName, string nspConfigName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Search/searchServices/", false); - uri.AppendPath(searchServiceName, true); - uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); - uri.AppendPath(nspConfigName, true); - uri.AppendPath("/reconcile", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Reconcile network security perimeter configuration for the Azure AI Search resource provider. This triggers a manual resync with network security perimeter configurations by ensuring the search service carries the latest configuration. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The network security configuration name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task ReconcileAsync(string subscriptionId, string resourceGroupName, string searchServiceName, string nspConfigName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); - Argument.AssertNotNullOrEmpty(nspConfigName, nameof(nspConfigName)); - - using var message = CreateReconcileRequest(subscriptionId, resourceGroupName, searchServiceName, nspConfigName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Reconcile network security perimeter configuration for the Azure AI Search resource provider. This triggers a manual resync with network security perimeter configurations by ensuring the search service carries the latest configuration. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The network security configuration name. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Reconcile(string subscriptionId, string resourceGroupName, string searchServiceName, string nspConfigName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); - Argument.AssertNotNullOrEmpty(nspConfigName, nameof(nspConfigName)); - - using var message = CreateReconcileRequest(subscriptionId, resourceGroupName, searchServiceName, nspConfigName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByServiceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string searchServiceName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string searchServiceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a list of network security perimeter configurations for a search service. - /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByServiceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string searchServiceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); - - using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, searchServiceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - NetworkSecurityPerimeterConfigurationListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NetworkSecurityPerimeterConfigurationListResult.DeserializeNetworkSecurityPerimeterConfigurationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a list of network security perimeter configurations for a search service. - /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByServiceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string searchServiceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); - - using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, searchServiceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - NetworkSecurityPerimeterConfigurationListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NetworkSecurityPerimeterConfigurationListResult.DeserializeNetworkSecurityPerimeterConfigurationListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/OfferingsRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/OfferingsRestOperations.cs deleted file mode 100644 index ab0623465aec..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/OfferingsRestOperations.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Search.Models; - -namespace Azure.ResourceManager.Search -{ - internal partial class OfferingsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of OfferingsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public OfferingsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri() - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/providers/Microsoft.Search/offerings", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest() - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/providers/Microsoft.Search/offerings", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all of the features and SKUs offered by the Azure AI Search service in each region. - /// The cancellation token to use. - public async Task> ListAsync(CancellationToken cancellationToken = default) - { - using var message = CreateListRequest(); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - OfferingsListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = OfferingsListResult.DeserializeOfferingsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all of the features and SKUs offered by the Azure AI Search service in each region. - /// The cancellation token to use. - public Response List(CancellationToken cancellationToken = default) - { - using var message = CreateListRequest(); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - OfferingsListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = OfferingsListResult.DeserializeOfferingsListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 0154071832fb..0944eee413b7 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -78,11 +78,11 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// Updates a private endpoint connection to the search service in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// Updates a Private Endpoint connection to the search service in the given resource group. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the search service associated with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// The definition of the private endpoint connection to update. /// Parameter group. /// The cancellation token to use. @@ -112,11 +112,11 @@ public async Task> UpdateAsync(str } } - /// Updates a private endpoint connection to the search service in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// Updates a Private Endpoint connection to the search service in the given resource group. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the search service associated with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// The definition of the private endpoint connection to update. /// Parameter group. /// The cancellation token to use. @@ -185,10 +185,10 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the private endpoint connection to the search service in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the search service associated with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. @@ -219,10 +219,10 @@ public async Task> GetAsync(string } /// Gets the details of the private endpoint connection to the search service in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the search service associated with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. @@ -291,10 +291,10 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Disconnects the private endpoint connection and deletes it from the search service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the search service associated with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. @@ -325,10 +325,10 @@ public async Task> DeleteAsync(str } /// Disconnects the private endpoint connection and deletes it from the search service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the search service associated with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. @@ -395,9 +395,9 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Gets a list of all private endpoint connections in the given service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. @@ -425,9 +425,9 @@ public async Task> ListBySer } /// Gets a list of all private endpoint connections in the given service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. @@ -478,9 +478,9 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Gets a list of all private endpoint connections in the given service. /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. @@ -510,9 +510,9 @@ public async Task> ListBySer /// Gets a list of all private endpoint connections in the given service. /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 05f482d22dcc..b8ee1c090769 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,9 +73,9 @@ internal HttpMessage CreateListSupportedRequest(string subscriptionId, string re } /// Gets a list of all supported private link resource types for the given service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. @@ -103,9 +103,9 @@ public async Task> ListSupportedAsync(strin } /// Gets a list of all supported private link resource types for the given service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/QueryKeysRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/QueryKeysRestOperations.cs index e343d573800c..cfdbec6a6dbc 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/QueryKeysRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/QueryKeysRestOperations.cs @@ -32,7 +32,7 @@ public QueryKeysRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,9 +75,9 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG } /// Generates a new query key for the specified search service. You can create up to 50 query keys per service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// The name of the new query API key. /// Parameter group. /// The cancellation token to use. @@ -107,9 +107,9 @@ public async Task> CreateAsync(string subscripti } /// Generates a new query key for the specified search service. You can create up to 50 query keys per service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// The name of the new query API key. /// Parameter group. /// The cancellation token to use. @@ -174,10 +174,10 @@ internal HttpMessage CreateListBySearchServiceRequest(string subscriptionId, str return message; } - /// Returns the list of query API keys for the given Azure AI Search service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// Returns the list of query API keys for the given search service. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. @@ -204,10 +204,10 @@ public async Task> ListBySearchServiceAsync(string } } - /// Returns the list of query API keys for the given Azure AI Search service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// Returns the list of query API keys for the given search service. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. @@ -273,9 +273,9 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating a query key is to delete and then recreate it. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// The query key to be deleted. Query keys are identified by value, not by name. /// Parameter group. /// The cancellation token to use. @@ -302,9 +302,9 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating a query key is to delete and then recreate it. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// The query key to be deleted. Query keys are identified by value, not by name. /// Parameter group. /// The cancellation token to use. @@ -352,11 +352,11 @@ internal HttpMessage CreateListBySearchServiceNextPageRequest(string nextLink, s return message; } - /// Returns the list of query API keys for the given Azure AI Search service. + /// Returns the list of query API keys for the given search service. /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. @@ -384,11 +384,11 @@ public async Task> ListBySearchServiceNextPageAsyn } } - /// Returns the list of query API keys for the given Azure AI Search service. + /// Returns the list of query API keys for the given search service. /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/SearchManagementRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/SearchManagementRestOperations.cs index 80410e504705..a521da090072 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/SearchManagementRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/SearchManagementRestOperations.cs @@ -32,7 +32,7 @@ public SearchManagementRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,7 +71,7 @@ internal HttpMessage CreateUsageBySubscriptionSkuRequest(string subscriptionId, } /// Gets the quota usage for a search SKU in the given subscription. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The unique location name for a Microsoft Azure geographic region. /// The unique SKU name that identifies a billable tier. /// Parameter group. @@ -100,7 +100,7 @@ public async Task> UsageBySubscriptionSkuAsync(string } /// Gets the quota usage for a search SKU in the given subscription. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The unique location name for a Microsoft Azure geographic region. /// The unique SKU name that identifies a billable tier. /// Parameter group. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServiceRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServiceRestOperations.cs deleted file mode 100644 index ff8597fb676c..000000000000 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServiceRestOperations.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.Search -{ - internal partial class ServiceRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ServiceRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public ServiceRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateUpgradeRequestUri(string subscriptionId, string resourceGroupName, string searchServiceName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Search/searchServices/", false); - uri.AppendPath(searchServiceName, true); - uri.AppendPath("/upgrade", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpgradeRequest(string subscriptionId, string resourceGroupName, string searchServiceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Search/searchServices/", false); - uri.AppendPath(searchServiceName, true); - uri.AppendPath("/upgrade", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Upgrades the Azure AI Search service to the latest version available. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpgradeAsync(string subscriptionId, string resourceGroupName, string searchServiceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); - - using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, searchServiceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Upgrades the Azure AI Search service to the latest version available. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Upgrade(string subscriptionId, string resourceGroupName, string searchServiceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); - - using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, searchServiceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServicesRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServicesRestOperations.cs index 0da04517a7d9..4af6428efa8b 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServicesRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServicesRestOperations.cs @@ -32,7 +32,7 @@ public ServicesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,9 +75,9 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service to create or update. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net). You cannot change the service name after the service is created. + /// The name of the search service to create or update. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net). You cannot change the service name after the service is created. /// The definition of the search service to create or update. /// Parameter group. /// The cancellation token to use. @@ -103,9 +103,9 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Creates or updates a search service in the given resource group. If the search service already exists, all properties will be updated with the given values. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service to create or update. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net). You cannot change the service name after the service is created. + /// The name of the search service to create or update. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net). You cannot change the service name after the service is created. /// The definition of the search service to create or update. /// Parameter group. /// The cancellation token to use. @@ -169,9 +169,9 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates an existing search service in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service to update. + /// The name of the search service to update. /// The definition of the search service to update. /// Parameter group. /// The cancellation token to use. @@ -201,9 +201,9 @@ public async Task> UpdateAsync(string subscriptionId } /// Updates an existing search service in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service to update. + /// The name of the search service to update. /// The definition of the search service to update. /// Parameter group. /// The cancellation token to use. @@ -267,9 +267,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the search service with the given name in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. @@ -299,9 +299,9 @@ public async Task> GetAsync(string subscriptionId, s } /// Gets the search service with the given name in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. @@ -365,9 +365,9 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Deletes a search service in the given resource group, along with its associated resources. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. @@ -392,9 +392,9 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Deletes a search service in the given resource group, along with its associated resources. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. @@ -418,6 +418,92 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } + internal RequestUriBuilder CreateUpgradeRequestUri(string subscriptionId, string resourceGroupName, string searchServiceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Search/searchServices/", false); + uri.AppendPath(searchServiceName, true); + uri.AppendPath("/upgrade", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpgradeRequest(string subscriptionId, string resourceGroupName, string searchServiceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Search/searchServices/", false); + uri.AppendPath(searchServiceName, true); + uri.AppendPath("/upgrade", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Upgrades the Azure AI Search service to the latest version available. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. + /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the search service associated with the specified resource group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpgradeAsync(string subscriptionId, string resourceGroupName, string searchServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, searchServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Upgrades the Azure AI Search service to the latest version available. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. + /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the search service associated with the specified resource group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Upgrade(string subscriptionId, string resourceGroupName, string searchServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, searchServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName, SearchManagementRequestOptions searchManagementRequestOptions) { var uri = new RawRequestUriBuilder(); @@ -451,7 +537,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Gets a list of all Search services in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// Parameter group. /// The cancellation token to use. @@ -479,7 +565,7 @@ public async Task> ListByResourceGroupAsync(st } /// Gets a list of all Search services in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// Parameter group. /// The cancellation token to use. @@ -535,7 +621,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, Sear } /// Gets a list of all Search services in the given subscription. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// Parameter group. /// The cancellation token to use. /// is null. @@ -561,7 +647,7 @@ public async Task> ListBySubscriptionAsync(str } /// Gets a list of all Search services in the given subscription. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// Parameter group. /// The cancellation token to use. /// is null. @@ -619,7 +705,7 @@ internal HttpMessage CreateCheckNameAvailabilityRequest(string subscriptionId, S } /// Checks whether or not the given search service name is available for use. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net). - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The resource name and type to check. /// Parameter group. /// The cancellation token to use. @@ -647,7 +733,7 @@ public async Task> CheckNameAvaila } /// Checks whether or not the given search service name is available for use. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net). - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The resource name and type to check. /// Parameter group. /// The cancellation token to use. @@ -698,7 +784,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Gets a list of all Search services in the given resource group. /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// Parameter group. /// The cancellation token to use. @@ -728,7 +814,7 @@ public async Task> ListByResourceGroupNextPage /// Gets a list of all Search services in the given resource group. /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// Parameter group. /// The cancellation token to use. @@ -780,7 +866,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Gets a list of all Search services in the given subscription. /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// Parameter group. /// The cancellation token to use. /// or is null. @@ -808,7 +894,7 @@ public async Task> ListBySubscriptionNextPageA /// Gets a list of all Search services in the given subscription. /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// Parameter group. /// The cancellation token to use. /// or is null. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/SharedPrivateLinkResourcesRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/SharedPrivateLinkResourcesRestOperations.cs index 8d04656e7830..215457a4eedb 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/SharedPrivateLinkResourcesRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/SharedPrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public SharedPrivateLinkResourcesRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -79,10 +79,10 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Initiates the creation or update of a shared private link resource managed by the search service in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the search service associated with the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// The definition of the shared private link resource to create or update. /// Parameter group. /// The cancellation token to use. @@ -109,10 +109,10 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Initiates the creation or update of a shared private link resource managed by the search service in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the search service associated with the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// The definition of the shared private link resource to create or update. /// Parameter group. /// The cancellation token to use. @@ -177,10 +177,10 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Gets the details of the shared private link resource managed by the search service in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the search service associated with the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. @@ -211,10 +211,10 @@ public async Task> GetAsync } /// Gets the details of the shared private link resource managed by the search service in the given resource group. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the search service associated with the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. @@ -283,10 +283,10 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Initiates the deletion of the shared private link resource from the search service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the search service associated with the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. @@ -312,10 +312,10 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Initiates the deletion of the shared private link resource from the search service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the search service associated with the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. @@ -377,9 +377,9 @@ internal HttpMessage CreateListByServiceRequest(string subscriptionId, string re } /// Gets a list of all shared private link resources managed by the given service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. @@ -407,9 +407,9 @@ public async Task> ListByServiceAs } /// Gets a list of all shared private link resources managed by the given service. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , or is null. @@ -460,9 +460,9 @@ internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string /// Gets a list of all shared private link resources managed by the given service. /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. @@ -492,9 +492,9 @@ public async Task> ListByServiceNe /// Gets a list of all shared private link resources managed by the given service. /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/UsagesRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/UsagesRestOperations.cs index 6dacbcb8b88c..3b3d4749ca9c 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/UsagesRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/UsagesRestOperations.cs @@ -32,7 +32,7 @@ public UsagesRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-02-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -68,8 +68,8 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, Azur return message; } - /// Get a list of all Azure AI Search quota usages across the subscription. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// Gets a list of all Search quota usages in the given subscription. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The unique location name for a Microsoft Azure geographic region. /// Parameter group. /// The cancellation token to use. @@ -95,8 +95,8 @@ public async Task> ListBySubscriptionAsync(strin } } - /// Get a list of all Azure AI Search quota usages across the subscription. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// Gets a list of all Search quota usages in the given subscription. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The unique location name for a Microsoft Azure geographic region. /// Parameter group. /// The cancellation token to use. @@ -144,9 +144,9 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st return message; } - /// Get a list of all Azure AI Search quota usages across the subscription. + /// Gets a list of all Search quota usages in the given subscription. /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The unique location name for a Microsoft Azure geographic region. /// Parameter group. /// The cancellation token to use. @@ -173,9 +173,9 @@ public async Task> ListBySubscriptionNextPageAsy } } - /// Get a list of all Azure AI Search quota usages across the subscription. + /// Gets a list of all Search quota usages in the given subscription. /// The URL to the next page of results. - /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API, command line tools, or the portal. /// The unique location name for a Microsoft Azure geographic region. /// Parameter group. /// The cancellation token to use. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionCollection.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionCollection.cs index a7ba13c7d54d..4922d7c2e86d 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionCollection.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionCollection.cs @@ -53,7 +53,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Updates a private endpoint connection to the search service in the given resource group. + /// Updates a Private Endpoint connection to the search service in the given resource group. /// /// /// Request Path @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -74,7 +74,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// The definition of the private endpoint connection to update. /// Parameter group. /// The cancellation token to use. @@ -105,7 +105,7 @@ public virtual async Task> } /// - /// Updates a private endpoint connection to the search service in the given resource group. + /// Updates a Private Endpoint connection to the search service in the given resource group. /// /// /// Request Path @@ -117,7 +117,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -126,7 +126,7 @@ public virtual async Task> /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// The definition of the private endpoint connection to update. /// Parameter group. /// The cancellation token to use. @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -215,7 +215,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task> Get /// /// /// - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -261,7 +261,7 @@ public virtual Response Get(string priv /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Pageable GetAll(SearchMa /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -331,7 +331,7 @@ public virtual Pageable GetAll(SearchMa /// /// /// - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -375,7 +375,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -411,7 +411,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Searc /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -419,7 +419,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Searc /// /// /// - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -457,7 +457,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -465,7 +465,7 @@ public virtual async Task /// /// - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionData.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionData.cs index 4681d123b9a1..be60b906cf2f 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionData.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionData.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.Search { /// /// A class representing the SearchPrivateEndpointConnection data model. - /// Describes an existing private endpoint connection to the Azure AI Search service. + /// Describes an existing private endpoint connection to the search service. /// public partial class SearchPrivateEndpointConnectionData : ResourceData { @@ -61,7 +61,7 @@ public SearchPrivateEndpointConnectionData() /// The name. /// The resourceType. /// The systemData. - /// Describes the properties of an existing private endpoint connection to the Azure AI Search service. + /// Describes the properties of an existing private endpoint connection to the search service. /// Keeps track of any properties unknown to the library. internal SearchPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SearchServicePrivateEndpointConnectionProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -69,7 +69,7 @@ internal SearchPrivateEndpointConnectionData(ResourceIdentifier id, string name, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Describes the properties of an existing private endpoint connection to the Azure AI Search service. + /// Describes the properties of an existing private endpoint connection to the search service. [WirePath("properties")] public SearchServicePrivateEndpointConnectionProperties Properties { get; set; } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionResource.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionResource.cs index 9f81d38faf39..5a5a32a6aed7 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionResource.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(SearchManag /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -262,7 +262,7 @@ public virtual ArmOperation Delete(Wait } /// - /// Updates a private endpoint connection to the search service in the given resource group. + /// Updates a Private Endpoint connection to the search service in the given resource group. /// /// /// Request Path @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(Wait /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> } /// - /// Updates a private endpoint connection to the search service in the given resource group. + /// Updates a Private Endpoint connection to the search service in the given resource group. /// /// /// Request Path @@ -323,7 +323,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceCollection.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceCollection.cs index 76e1ecf46853..5feb02013b3f 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceCollection.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -75,7 +75,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the Azure AI Search service to create or update. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net). You cannot change the service name after the service is created. + /// The name of the search service to create or update. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net). You cannot change the service name after the service is created. /// The definition of the search service to create or update. /// Parameter group. /// The cancellation token to use. @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -125,7 +125,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the Azure AI Search service to create or update. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net). You cannot change the service name after the service is created. + /// The name of the search service to create or update. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net). You cannot change the service name after the service is created. /// The definition of the search service to create or update. /// Parameter group. /// The cancellation token to use. @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -174,7 +174,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string searc /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual async Task> GetAsync(string searc /// /// /// - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -258,7 +258,7 @@ public virtual Response Get(string searchServiceName, Sea /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(SearchManagement /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(SearchManagementRequestOpt /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual Pageable GetAll(SearchManagementRequestOpt /// /// /// - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string searchServiceName, /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -372,7 +372,7 @@ public virtual async Task> ExistsAsync(string searchServiceName, /// /// /// - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -408,7 +408,7 @@ public virtual Response Exists(string searchServiceName, SearchManagementR /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -416,7 +416,7 @@ public virtual Response Exists(string searchServiceName, SearchManagementR /// /// /// - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -454,7 +454,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -462,7 +462,7 @@ public virtual async Task> GetIfExistsAs /// /// /// - /// The name of the Azure AI Search service associated with the specified resource group. + /// The name of the search service associated with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.Serialization.cs index a312ca36b42a..55b9378b49b7 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.Serialization.cs @@ -61,25 +61,15 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("partitionCount"u8); writer.WriteNumberValue(PartitionCount.Value); } - if (Optional.IsDefined(Endpoint)) - { - writer.WritePropertyName("endpoint"u8); - writer.WriteStringValue(Endpoint.AbsoluteUri); - } if (Optional.IsDefined(HostingMode)) { writer.WritePropertyName("hostingMode"u8); writer.WriteStringValue(HostingMode.Value.ToSerialString()); } - if (Optional.IsDefined(ComputeType)) - { - writer.WritePropertyName("computeType"u8); - writer.WriteStringValue(ComputeType.Value.ToString()); - } if (Optional.IsDefined(PublicInternetAccess)) { writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicInternetAccess.Value.ToString()); + writer.WriteStringValue(PublicInternetAccess.Value.ToSerialString()); } if (options.Format != "W" && Optional.IsDefined(Status)) { @@ -101,16 +91,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("networkRuleSet"u8); writer.WriteObjectValue(NetworkRuleSet, options); } - if (Optional.IsCollectionDefined(DisabledDataExfiltrationOptions)) - { - writer.WritePropertyName("disabledDataExfiltrationOptions"u8); - writer.WriteStartArray(); - foreach (var item in DisabledDataExfiltrationOptions) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } if (Optional.IsDefined(EncryptionWithCmk)) { writer.WritePropertyName("encryptionWithCmk"u8); @@ -133,6 +113,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("authOptions"u8); writer.WriteObjectValue(AuthOptions, options); } + if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) + { + writer.WritePropertyName("privateEndpointConnections"u8); + writer.WriteStartArray(); + foreach (var item in PrivateEndpointConnections) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(SemanticSearch)) { if (SemanticSearch != null) @@ -145,16 +135,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteNull("semanticSearch"); } } - if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) - { - writer.WritePropertyName("privateEndpointConnections"u8); - writer.WriteStartArray(); - foreach (var item in PrivateEndpointConnections) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } if (options.Format != "W" && Optional.IsCollectionDefined(SharedPrivateLinkResources)) { writer.WritePropertyName("sharedPrivateLinkResources"u8); @@ -165,11 +145,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("eTag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } if (options.Format != "W" && Optional.IsDefined(IsUpgradeAvailable)) { writer.WritePropertyName("upgradeAvailable"u8); @@ -213,22 +188,18 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme SystemData systemData = default; int? replicaCount = default; int? partitionCount = default; - Uri endpoint = default; SearchServiceHostingMode? hostingMode = default; - SearchServiceComputeType? computeType = default; SearchServicePublicInternetAccess? publicNetworkAccess = default; SearchServiceStatus? status = default; string statusDetails = default; SearchServiceProvisioningState? provisioningState = default; SearchServiceNetworkRuleSet networkRuleSet = default; - IList disabledDataExfiltrationOptions = default; SearchEncryptionWithCmk encryptionWithCmk = default; bool? disableLocalAuth = default; SearchAadAuthDataPlaneAuthOptions authOptions = default; - SearchSemanticSearch? semanticSearch = default; IReadOnlyList privateEndpointConnections = default; + SearchSemanticSearch? semanticSearch = default; IReadOnlyList sharedPrivateLinkResources = default; - ETag? eTag = default; bool? upgradeAvailable = default; DateTimeOffset? serviceUpgradeDate = default; IDictionary serializedAdditionalRawData = default; @@ -323,15 +294,6 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme partitionCount = property0.Value.GetInt32(); continue; } - if (property0.NameEquals("endpoint"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpoint = new Uri(property0.Value.GetString()); - continue; - } if (property0.NameEquals("hostingMode"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -341,22 +303,13 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme hostingMode = property0.Value.GetString().ToSearchServiceHostingMode(); continue; } - if (property0.NameEquals("computeType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - computeType = new SearchServiceComputeType(property0.Value.GetString()); - continue; - } if (property0.NameEquals("publicNetworkAccess"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - publicNetworkAccess = new SearchServicePublicInternetAccess(property0.Value.GetString()); + publicNetworkAccess = property0.Value.GetString().ToSearchServicePublicInternetAccess(); continue; } if (property0.NameEquals("status"u8)) @@ -391,20 +344,6 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme networkRuleSet = SearchServiceNetworkRuleSet.DeserializeSearchServiceNetworkRuleSet(property0.Value, options); continue; } - if (property0.NameEquals("disabledDataExfiltrationOptions"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(new SearchDisabledDataExfiltrationOption(item.GetString())); - } - disabledDataExfiltrationOptions = array; - continue; - } if (property0.NameEquals("encryptionWithCmk"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -433,16 +372,6 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme authOptions = SearchAadAuthDataPlaneAuthOptions.DeserializeSearchAadAuthDataPlaneAuthOptions(property0.Value, options); continue; } - if (property0.NameEquals("semanticSearch"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - semanticSearch = null; - continue; - } - semanticSearch = new SearchSemanticSearch(property0.Value.GetString()); - continue; - } if (property0.NameEquals("privateEndpointConnections"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -457,27 +386,28 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme privateEndpointConnections = array; continue; } - if (property0.NameEquals("sharedPrivateLinkResources"u8)) + if (property0.NameEquals("semanticSearch"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { + semanticSearch = null; continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(SharedSearchServicePrivateLinkResourceData.DeserializeSharedSearchServicePrivateLinkResourceData(item, options)); - } - sharedPrivateLinkResources = array; + semanticSearch = new SearchSemanticSearch(property0.Value.GetString()); continue; } - if (property0.NameEquals("eTag"u8)) + if (property0.NameEquals("sharedPrivateLinkResources"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - eTag = new ETag(property0.Value.GetString()); + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(SharedSearchServicePrivateLinkResourceData.DeserializeSharedSearchServicePrivateLinkResourceData(item, options)); + } + sharedPrivateLinkResources = array; continue; } if (property0.NameEquals("upgradeAvailable"u8)) @@ -518,22 +448,18 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme identity, replicaCount, partitionCount, - endpoint, hostingMode, - computeType, publicNetworkAccess, status, statusDetails, provisioningState, networkRuleSet, - disabledDataExfiltrationOptions ?? new ChangeTrackingList(), encryptionWithCmk, disableLocalAuth, authOptions, - semanticSearch, privateEndpointConnections ?? new ChangeTrackingList(), + semanticSearch, sharedPrivateLinkResources ?? new ChangeTrackingList(), - eTag, upgradeAvailable, serviceUpgradeDate, serializedAdditionalRawData); @@ -717,21 +643,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Endpoint), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" endpoint: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Endpoint)) - { - builder.Append(" endpoint: "); - builder.AppendLine($"'{Endpoint.AbsoluteUri}'"); - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HostingMode), out propertyOverride); if (hasPropertyOverride) { @@ -747,21 +658,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComputeType), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" computeType: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ComputeType)) - { - builder.Append(" computeType: "); - builder.AppendLine($"'{ComputeType.Value.ToString()}'"); - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicInternetAccess), out propertyOverride); if (hasPropertyOverride) { @@ -773,7 +669,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(PublicInternetAccess)) { builder.Append(" publicNetworkAccess: "); - builder.AppendLine($"'{PublicInternetAccess.Value.ToString()}'"); + builder.AppendLine($"'{PublicInternetAccess.Value.ToSerialString()}'"); } } @@ -830,11 +726,16 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkRuleSet), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("IPRules", out propertyOverride); if (hasPropertyOverride) { builder.Append(" networkRuleSet: "); + builder.AppendLine("{"); + builder.AppendLine(" networkRuleSet: {"); + builder.Append(" ipRules: "); builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); } else { @@ -845,29 +746,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DisabledDataExfiltrationOptions), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" disabledDataExfiltrationOptions: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsCollectionDefined(DisabledDataExfiltrationOptions)) - { - if (DisabledDataExfiltrationOptions.Any()) - { - builder.Append(" disabledDataExfiltrationOptions: "); - builder.AppendLine("["); - foreach (var item in DisabledDataExfiltrationOptions) - { - builder.AppendLine($" '{item.ToString()}'"); - } - builder.AppendLine(" ]"); - } - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EncryptionWithCmk), out propertyOverride); if (hasPropertyOverride) { @@ -914,21 +792,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SemanticSearch), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" semanticSearch: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(SemanticSearch)) - { - builder.Append(" semanticSearch: "); - builder.AppendLine($"'{SemanticSearch.Value.ToString()}'"); - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PrivateEndpointConnections), out propertyOverride); if (hasPropertyOverride) { @@ -952,6 +815,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SemanticSearch), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" semanticSearch: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SemanticSearch)) + { + builder.Append(" semanticSearch: "); + builder.AppendLine($"'{SemanticSearch.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SharedPrivateLinkResources), out propertyOverride); if (hasPropertyOverride) { @@ -975,21 +853,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ETag), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" eTag: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(ETag)) - { - builder.Append(" eTag: "); - builder.AppendLine($"'{ETag.Value.ToString()}'"); - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsUpgradeAvailable), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.cs index 1693805beb16..7353924e6470 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.Search { /// /// A class representing the SearchService data model. - /// Describes an Azure AI Search service and its current state. + /// Describes a search service and its current state. /// public partial class SearchServiceData : TrackedResourceData { @@ -55,7 +55,6 @@ public partial class SearchServiceData : TrackedResourceData /// The location. public SearchServiceData(AzureLocation location) : base(location) { - DisabledDataExfiltrationOptions = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); SharedPrivateLinkResources = new ChangeTrackingList(); } @@ -67,51 +66,43 @@ public SearchServiceData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// The SKU of the search service, which determines price tier and capacity limits. This property is required when creating a new search service. - /// The identity of the resource. + /// The SKU of the search service, which determines billing rate and capacity limits. This property is required when creating a new search service. + /// The identity of the resource. Current supported identity types: None, SystemAssigned. /// The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. - /// The endpoint of the Azure AI Search service. /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. - /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. - /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. 'stopped': The search service is in a subscription that's disabled. If your service is in the degraded, disabled, or error states, it means the Azure AI Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. + /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. If your service is in the degraded, disabled, or error states, Microsoft is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. /// The details of the search service status. - /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'Succeeded' or 'Failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'Succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. - /// Network specific rules that determine how the Azure AI Search service may be reached. - /// A list of data exfiltration scenarios that are explicitly disallowed for the search service. Currently, the only supported value is 'All' to disable all possible data export scenarios with more fine grained controls planned for the future. + /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. + /// Network-specific rules that determine how the search service may be reached. /// Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. /// When set to true, calls to the search service will not be permitted to utilize API keys for authentication. This cannot be set to true if 'dataPlaneAuthOptions' are defined. /// Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. - /// Sets options that control the availability of semantic search. This configuration is only possible for certain Azure AI Search SKUs in certain locations. - /// The list of private endpoint connections to the Azure AI Search service. - /// The list of shared private link resources managed by the Azure AI Search service. - /// A system generated property representing the service's etag that can be for optimistic concurrency control during updates. + /// The list of private endpoint connections to the search service. + /// Sets options that control the availability of semantic search. This configuration is only possible for certain search SKUs in certain locations. + /// The list of shared private link resources managed by the search service. /// Indicates whether or not the search service has an upgrade available. /// The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. /// Keeps track of any properties unknown to the library. - internal SearchServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SearchSku searchSku, ManagedServiceIdentity identity, int? replicaCount, int? partitionCount, Uri endpoint, SearchServiceHostingMode? hostingMode, SearchServiceComputeType? computeType, SearchServicePublicInternetAccess? publicInternetAccess, SearchServiceStatus? status, string statusDetails, SearchServiceProvisioningState? provisioningState, SearchServiceNetworkRuleSet networkRuleSet, IList disabledDataExfiltrationOptions, SearchEncryptionWithCmk encryptionWithCmk, bool? isLocalAuthDisabled, SearchAadAuthDataPlaneAuthOptions authOptions, SearchSemanticSearch? semanticSearch, IReadOnlyList privateEndpointConnections, IReadOnlyList sharedPrivateLinkResources, ETag? eTag, bool? isUpgradeAvailable, DateTimeOffset? serviceUpgradeOn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal SearchServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SearchSku searchSku, ManagedServiceIdentity identity, int? replicaCount, int? partitionCount, SearchServiceHostingMode? hostingMode, SearchServicePublicInternetAccess? publicInternetAccess, SearchServiceStatus? status, string statusDetails, SearchServiceProvisioningState? provisioningState, SearchServiceNetworkRuleSet networkRuleSet, SearchEncryptionWithCmk encryptionWithCmk, bool? isLocalAuthDisabled, SearchAadAuthDataPlaneAuthOptions authOptions, IReadOnlyList privateEndpointConnections, SearchSemanticSearch? semanticSearch, IReadOnlyList sharedPrivateLinkResources, bool? isUpgradeAvailable, DateTimeOffset? serviceUpgradeOn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { SearchSku = searchSku; Identity = identity; ReplicaCount = replicaCount; PartitionCount = partitionCount; - Endpoint = endpoint; HostingMode = hostingMode; - ComputeType = computeType; PublicInternetAccess = publicInternetAccess; Status = status; StatusDetails = statusDetails; ProvisioningState = provisioningState; NetworkRuleSet = networkRuleSet; - DisabledDataExfiltrationOptions = disabledDataExfiltrationOptions; EncryptionWithCmk = encryptionWithCmk; IsLocalAuthDisabled = isLocalAuthDisabled; AuthOptions = authOptions; - SemanticSearch = semanticSearch; PrivateEndpointConnections = privateEndpointConnections; + SemanticSearch = semanticSearch; SharedPrivateLinkResources = sharedPrivateLinkResources; - ETag = eTag; IsUpgradeAvailable = isUpgradeAvailable; ServiceUpgradeOn = serviceUpgradeOn; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -122,7 +113,7 @@ internal SearchServiceData() { } - /// The SKU of the search service, which determines price tier and capacity limits. This property is required when creating a new search service. + /// The SKU of the search service, which determines billing rate and capacity limits. This property is required when creating a new search service. internal SearchSku SearchSku { get; set; } /// The SKU of the search service. Valid values include: 'free': Shared service. 'basic': Dedicated service with up to 3 replicas. 'standard': Dedicated service with up to 12 partitions and 12 replicas. 'standard2': Similar to standard, but with more capacity per search unit. 'standard3': The largest Standard offering with up to 12 partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports 2TB per partition, up to 12 partitions.'. [WirePath("sku.name")] @@ -137,7 +128,7 @@ public SearchServiceSkuName? SearchSkuName } } - /// The identity of the resource. + /// The identity of the resource. Current supported identity types: None, SystemAssigned. [WirePath("identity")] public ManagedServiceIdentity Identity { get; set; } /// The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. @@ -146,33 +137,24 @@ public SearchServiceSkuName? SearchSkuName /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. [WirePath("properties.partitionCount")] public int? PartitionCount { get; set; } - /// The endpoint of the Azure AI Search service. - [WirePath("properties.endpoint")] - public Uri Endpoint { get; set; } /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. [WirePath("properties.hostingMode")] public SearchServiceHostingMode? HostingMode { get; set; } - /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. - [WirePath("properties.computeType")] - public SearchServiceComputeType? ComputeType { get; set; } /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. [WirePath("properties.publicNetworkAccess")] public SearchServicePublicInternetAccess? PublicInternetAccess { get; set; } - /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. 'stopped': The search service is in a subscription that's disabled. If your service is in the degraded, disabled, or error states, it means the Azure AI Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. + /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. If your service is in the degraded, disabled, or error states, Microsoft is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. [WirePath("properties.status")] public SearchServiceStatus? Status { get; } /// The details of the search service status. [WirePath("properties.statusDetails")] public string StatusDetails { get; } - /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'Succeeded' or 'Failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'Succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. + /// The state of the last provisioning operation performed on the search service. Provisioning is an intermediate state that occurs while service capacity is being established. After capacity is set up, provisioningState changes to either 'succeeded' or 'failed'. Client applications can poll provisioning status (the recommended polling interval is from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'succeeded' directly in the call to Create search service. This is because the free service uses capacity that is already set up. [WirePath("properties.provisioningState")] public SearchServiceProvisioningState? ProvisioningState { get; } - /// Network specific rules that determine how the Azure AI Search service may be reached. - [WirePath("properties.networkRuleSet")] - public SearchServiceNetworkRuleSet NetworkRuleSet { get; set; } - /// A list of data exfiltration scenarios that are explicitly disallowed for the search service. Currently, the only supported value is 'All' to disable all possible data export scenarios with more fine grained controls planned for the future. - [WirePath("properties.disabledDataExfiltrationOptions")] - public IList DisabledDataExfiltrationOptions { get; } + /// Network-specific rules that determine how the search service may be reached. + internal SearchServiceNetworkRuleSet NetworkRuleSet { get; set; } + /// Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. [WirePath("properties.encryptionWithCmk")] public SearchEncryptionWithCmk EncryptionWithCmk { get; set; } @@ -182,18 +164,15 @@ public SearchServiceSkuName? SearchSkuName /// Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. [WirePath("properties.authOptions")] public SearchAadAuthDataPlaneAuthOptions AuthOptions { get; set; } - /// Sets options that control the availability of semantic search. This configuration is only possible for certain Azure AI Search SKUs in certain locations. - [WirePath("properties.semanticSearch")] - public SearchSemanticSearch? SemanticSearch { get; set; } - /// The list of private endpoint connections to the Azure AI Search service. + /// The list of private endpoint connections to the search service. [WirePath("properties.privateEndpointConnections")] public IReadOnlyList PrivateEndpointConnections { get; } - /// The list of shared private link resources managed by the Azure AI Search service. + /// Sets options that control the availability of semantic search. This configuration is only possible for certain search SKUs in certain locations. + [WirePath("properties.semanticSearch")] + public SearchSemanticSearch? SemanticSearch { get; set; } + /// The list of shared private link resources managed by the search service. [WirePath("properties.sharedPrivateLinkResources")] public IReadOnlyList SharedPrivateLinkResources { get; } - /// A system generated property representing the service's etag that can be for optimistic concurrency control during updates. - [WirePath("properties.eTag")] - public ETag? ETag { get; } /// Indicates whether or not the search service has an upgrade available. [WirePath("properties.upgradeAvailable")] public bool? IsUpgradeAvailable { get; } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.cs index 85e8683dbfc5..65ca7264ee32 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.cs @@ -44,8 +44,6 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly QueryKeysRestOperations _queryKeysRestClient; private readonly ClientDiagnostics _privateLinkResourcesClientDiagnostics; private readonly PrivateLinkResourcesRestOperations _privateLinkResourcesRestClient; - private readonly ClientDiagnostics _serviceClientDiagnostics; - private readonly ServiceRestOperations _serviceRestClient; private readonly SearchServiceData _data; /// Gets the resource type for the operations. @@ -79,8 +77,6 @@ internal SearchServiceResource(ArmClient client, ResourceIdentifier id) : base(c _queryKeysRestClient = new QueryKeysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _privateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Search", ProviderConstants.DefaultProviderNamespace, Diagnostics); _privateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _serviceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Search", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _serviceRestClient = new ServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -127,7 +123,7 @@ public virtual SearchPrivateEndpointConnectionCollection GetSearchPrivateEndpoin /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -135,7 +131,7 @@ public virtual SearchPrivateEndpointConnectionCollection GetSearchPrivateEndpoin /// /// /// - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is null. @@ -159,7 +155,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -167,7 +163,7 @@ public virtual async Task> Get /// /// /// - /// The name of the private endpoint connection to the Azure AI Search service with the specified resource group. + /// The name of the private endpoint connection to the search service with the specified resource group. /// Parameter group. /// The cancellation token to use. /// is null. @@ -198,7 +194,7 @@ public virtual SharedSearchServicePrivateLinkResourceCollection GetSharedSearchS /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -206,7 +202,7 @@ public virtual SharedSearchServicePrivateLinkResourceCollection GetSharedSearchS /// /// /// - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// Parameter group. /// The cancellation token to use. /// is null. @@ -230,7 +226,7 @@ public virtual async Task> GetS /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -238,7 +234,7 @@ public virtual async Task> GetS /// /// /// - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// Parameter group. /// The cancellation token to use. /// is null. @@ -249,75 +245,6 @@ public virtual Response GetSharedSearchS return GetSharedSearchServicePrivateLinkResources().Get(sharedPrivateLinkResourceName, searchManagementRequestOptions, cancellationToken); } - /// Gets a collection of NetworkSecurityPerimeterConfigurationResources in the SearchService. - /// An object representing collection of NetworkSecurityPerimeterConfigurationResources and their operations over a NetworkSecurityPerimeterConfigurationResource. - public virtual NetworkSecurityPerimeterConfigurationCollection GetNetworkSecurityPerimeterConfigurations() - { - return GetCachedClient(client => new NetworkSecurityPerimeterConfigurationCollection(client, Id)); - } - - /// - /// Gets a network security perimeter configuration. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName} - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_Get - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The network security configuration name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetNetworkSecurityPerimeterConfigurationAsync(string nspConfigName, CancellationToken cancellationToken = default) - { - return await GetNetworkSecurityPerimeterConfigurations().GetAsync(nspConfigName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a network security perimeter configuration. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName} - /// - /// - /// Operation Id - /// NetworkSecurityPerimeterConfigurations_Get - /// - /// - /// Default Api Version - /// 2025-02-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The network security configuration name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetNetworkSecurityPerimeterConfiguration(string nspConfigName, CancellationToken cancellationToken = default) - { - return GetNetworkSecurityPerimeterConfigurations().Get(nspConfigName, cancellationToken); - } - /// /// Gets the search service with the given name in the given resource group. /// @@ -331,7 +258,7 @@ public virtual Response GetNetwor /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -372,7 +299,7 @@ public virtual async Task> GetAsync(SearchManage /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -413,7 +340,7 @@ public virtual Response Get(SearchManagementRequestOption /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -458,7 +385,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, SearchM /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -503,7 +430,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, SearchManagementRequestO /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -546,7 +473,7 @@ public virtual async Task> UpdateAsync(SearchSer /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -577,7 +504,7 @@ public virtual Response Update(SearchServicePatch patch, } /// - /// Gets the primary and secondary admin API keys for the specified Azure AI Search service. + /// Gets the primary and secondary admin API keys for the specified search service. /// /// /// Request Path @@ -589,7 +516,7 @@ public virtual Response Update(SearchServicePatch patch, /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -612,7 +539,7 @@ public virtual async Task> GetAdminKeyAsyn } /// - /// Gets the primary and secondary admin API keys for the specified Azure AI Search service. + /// Gets the primary and secondary admin API keys for the specified search service. /// /// /// Request Path @@ -624,7 +551,7 @@ public virtual async Task> GetAdminKeyAsyn /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -659,7 +586,7 @@ public virtual Response GetAdminKey(SearchManagemen /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -695,7 +622,7 @@ public virtual async Task> RegenerateAdmin /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -731,7 +658,7 @@ public virtual Response RegenerateAdminKey(SearchSe /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -771,7 +698,7 @@ public virtual async Task> CreateQueryKeyAsync(s /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -799,7 +726,7 @@ public virtual Response CreateQueryKey(string name, Searc } /// - /// Returns the list of query API keys for the given Azure AI Search service. + /// Returns the list of query API keys for the given search service. /// /// /// Request Path @@ -811,7 +738,7 @@ public virtual Response CreateQueryKey(string name, Searc /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -826,7 +753,7 @@ public virtual AsyncPageable GetQueryKeysBySearchServiceA } /// - /// Returns the list of query API keys for the given Azure AI Search service. + /// Returns the list of query API keys for the given search service. /// /// /// Request Path @@ -838,7 +765,7 @@ public virtual AsyncPageable GetQueryKeysBySearchServiceA /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -865,7 +792,7 @@ public virtual Pageable GetQueryKeysBySearchService(Searc /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -905,7 +832,7 @@ public virtual async Task DeleteQueryKeyAsync(string key, SearchManage /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// @@ -933,131 +860,139 @@ public virtual Response DeleteQueryKey(string key, SearchManagementRequestOption } /// - /// Gets a list of all supported private link resource types for the given service. + /// Upgrades the Azure AI Search service to the latest version available. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateLinkResources + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/upgrade /// /// /// Operation Id - /// PrivateLinkResources_ListSupported + /// Services_Upgrade /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 + /// + /// + /// Resource + /// /// /// /// - /// Parameter group. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSupportedPrivateLinkResourcesAsync(SearchManagementRequestOptions searchManagementRequestOptions = null, CancellationToken cancellationToken = default) + public virtual async Task> UpgradeAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _privateLinkResourcesRestClient.CreateListSupportedRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, searchManagementRequestOptions); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => SearchPrivateLinkResource.DeserializeSearchPrivateLinkResource(e), _privateLinkResourcesClientDiagnostics, Pipeline, "SearchServiceResource.GetSupportedPrivateLinkResources", "value", null, cancellationToken); + using var scope = _searchServiceServicesClientDiagnostics.CreateScope("SearchServiceResource.Upgrade"); + scope.Start(); + try + { + var response = await _searchServiceServicesRestClient.UpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SearchArmOperation(new SearchServiceOperationSource(Client), _searchServiceServicesClientDiagnostics, Pipeline, _searchServiceServicesRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Gets a list of all supported private link resource types for the given service. + /// Upgrades the Azure AI Search service to the latest version available. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateLinkResources + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/upgrade /// /// /// Operation Id - /// PrivateLinkResources_ListSupported + /// Services_Upgrade /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 + /// + /// + /// Resource + /// /// /// /// - /// Parameter group. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSupportedPrivateLinkResources(SearchManagementRequestOptions searchManagementRequestOptions = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Upgrade(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _privateLinkResourcesRestClient.CreateListSupportedRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, searchManagementRequestOptions); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => SearchPrivateLinkResource.DeserializeSearchPrivateLinkResource(e), _privateLinkResourcesClientDiagnostics, Pipeline, "SearchServiceResource.GetSupportedPrivateLinkResources", "value", null, cancellationToken); + using var scope = _searchServiceServicesClientDiagnostics.CreateScope("SearchServiceResource.Upgrade"); + scope.Start(); + try + { + var response = _searchServiceServicesRestClient.Upgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new SearchArmOperation(new SearchServiceOperationSource(Client), _searchServiceServicesClientDiagnostics, Pipeline, _searchServiceServicesRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Upgrades the Azure AI Search service to the latest version available. + /// Gets a list of all supported private link resource types for the given service. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/upgrade + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateLinkResources /// /// /// Operation Id - /// Service_Upgrade + /// PrivateLinkResources_ListSupported /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameter group. /// The cancellation token to use. - public virtual async Task> UpgradeServiceAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSupportedPrivateLinkResourcesAsync(SearchManagementRequestOptions searchManagementRequestOptions = null, CancellationToken cancellationToken = default) { - using var scope = _serviceClientDiagnostics.CreateScope("SearchServiceResource.UpgradeService"); - scope.Start(); - try - { - var response = await _serviceRestClient.UpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new SearchArmOperation(new SearchServiceOperationSource(Client), _serviceClientDiagnostics, Pipeline, _serviceRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _privateLinkResourcesRestClient.CreateListSupportedRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, searchManagementRequestOptions); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => SearchPrivateLinkResource.DeserializeSearchPrivateLinkResource(e), _privateLinkResourcesClientDiagnostics, Pipeline, "SearchServiceResource.GetSupportedPrivateLinkResources", "value", null, cancellationToken); } /// - /// Upgrades the Azure AI Search service to the latest version available. + /// Gets a list of all supported private link resource types for the given service. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/upgrade + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateLinkResources /// /// /// Operation Id - /// Service_Upgrade + /// PrivateLinkResources_ListSupported /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameter group. /// The cancellation token to use. - public virtual ArmOperation UpgradeService(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSupportedPrivateLinkResources(SearchManagementRequestOptions searchManagementRequestOptions = null, CancellationToken cancellationToken = default) { - using var scope = _serviceClientDiagnostics.CreateScope("SearchServiceResource.UpgradeService"); - scope.Start(); - try - { - var response = _serviceRestClient.Upgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new SearchArmOperation(new SearchServiceOperationSource(Client), _serviceClientDiagnostics, Pipeline, _serviceRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _privateLinkResourcesRestClient.CreateListSupportedRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, searchManagementRequestOptions); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => SearchPrivateLinkResource.DeserializeSearchPrivateLinkResource(e), _privateLinkResourcesClientDiagnostics, Pipeline, "SearchServiceResource.GetSupportedPrivateLinkResources", "value", null, cancellationToken); } /// @@ -1073,7 +1008,7 @@ public virtual ArmOperation UpgradeService(WaitUntil wait /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -1135,7 +1070,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -1197,7 +1132,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -1254,7 +1189,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -1311,7 +1246,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -1371,7 +1306,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResource.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResource.cs index a45f98017bb4..11f534c20214 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResource.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(SearchManage /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, SearchM /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, SearchManagementRequestO /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResourceCollection.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResourceCollection.cs index e5b53686ff10..dfd9646b8422 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResourceCollection.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResourceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -74,7 +74,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// The definition of the shared private link resource to create or update. /// Parameter group. /// The cancellation token to use. @@ -115,7 +115,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -124,7 +124,7 @@ public virtual async Task> /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// The definition of the shared private link resource to create or update. /// Parameter group. /// The cancellation token to use. @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -173,7 +173,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -211,7 +211,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual async Task> GetA /// /// /// - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -257,7 +257,7 @@ public virtual Response Get(string share /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(SearchMan /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual Pageable GetAll(SearchMan /// /// /// - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string sharedPrivateLinkRe /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual async Task> ExistsAsync(string sharedPrivateLinkRe /// /// /// - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -407,7 +407,7 @@ public virtual Response Exists(string sharedPrivateLinkResourceName, Searc /// /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual Response Exists(string sharedPrivateLinkResourceName, Searc /// /// /// - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -453,7 +453,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-02-01-preview + /// 2025-05-01 /// /// /// Resource @@ -461,7 +461,7 @@ public virtual async Task /// /// - /// The name of the shared private link resource managed by the Azure AI Search service within the specified resource group. + /// The name of the shared private link resource managed by the search service within the specified resource group. /// Parameter group. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResourceData.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResourceData.cs index 305d7ca594a8..8db718023ab9 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResourceData.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResourceData.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.Search { /// /// A class representing the SharedSearchServicePrivateLinkResource data model. - /// Describes a shared private link resource managed by the Azure AI Search service. + /// Describes a Shared Private Link Resource managed by the search service. /// public partial class SharedSearchServicePrivateLinkResourceData : ResourceData { @@ -61,7 +61,7 @@ public SharedSearchServicePrivateLinkResourceData() /// The name. /// The resourceType. /// The systemData. - /// Describes the properties of a shared private link resource managed by the Azure AI Search service. + /// Describes the properties of a Shared Private Link Resource managed by the search service. /// Keeps track of any properties unknown to the library. internal SharedSearchServicePrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SharedSearchServicePrivateLinkResourceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -69,7 +69,7 @@ internal SharedSearchServicePrivateLinkResourceData(ResourceIdentifier id, strin _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Describes the properties of a shared private link resource managed by the Azure AI Search service. + /// Describes the properties of a Shared Private Link Resource managed by the search service. [WirePath("properties")] public SharedSearchServicePrivateLinkResourceProperties Properties { get; set; } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/autorest.md b/sdk/search/Azure.ResourceManager.Search/src/autorest.md index 2174d6918074..2ef767be0ae4 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/autorest.md +++ b/sdk/search/Azure.ResourceManager.Search/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: Search namespace: Azure.ResourceManager.Search -require: https://github.com/Azure/azure-rest-api-specs/blob/2aaa7ef3c48b8f4b7cb0e1e9bbe0041eec62c92d/specification/search/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/search/resource-manager/readme.md #tag: package-preview-2025-02 output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..4e749e6b85b1 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -12,6 +12,8 @@ trigger: - sdk/storage/Azure.Storage.DataMovement/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/