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 40d8efc5ab29..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/2024-06-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/2024-06-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/2024-06-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/2024-06-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/2024-06-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 32c1717a8f70..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/2024-06-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/2024-06-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/2024-06-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 2828300f5436..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/2024-06-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 @@ -67,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/2024-06-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 @@ -116,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/2024-06-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 @@ -162,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/2024-06-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 @@ -208,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/2024-06-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 @@ -234,72 +234,13 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceToAllowAccessFromPub ReplicaCount = 1, PartitionCount = 1, HostingMode = SearchServiceHostingMode.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/2024-06-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, - 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" @@ -319,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/2024-06-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 @@ -364,57 +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/2024-06-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, - 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/2024-06-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 @@ -437,13 +332,7 @@ 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, @@ -466,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/2024-06-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 @@ -512,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/2024-06-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 @@ -545,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/2024-06-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 @@ -580,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/2024-06-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 @@ -609,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/2024-06-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 6f2775314b74..7f5982b62515 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/2024-06-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/2024-06-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/2024-06-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/2024-06-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/2024-06-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/2024-06-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/2024-06-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 + 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/2024-06-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 -{ -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/2024-06-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/2024-06-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/2024-06-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/2024-06-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 @@ -486,7 +396,7 @@ public async Task Update_SearchUpdateServiceWithSemanticSearch() [Ignore("Only validating compilation of examples")] public async Task GetAdminKey_SearchGetAdminKeys() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2024-06-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 @@ -512,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/2024-06-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 @@ -539,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/2024-06-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 @@ -556,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}"); @@ -566,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/2024-06-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 @@ -595,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/2024-06-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 @@ -622,7 +532,7 @@ public async Task DeleteQueryKey_SearchDeleteQueryKey() [Ignore("Only validating compilation of examples")] public async Task GetSupportedPrivateLinkResources_ListSupportedPrivateLinkResources() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2024-06-01-preview/examples/ListSupportedPrivateLinkResources.json + // 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 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 f30a77fccfa9..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/2024-06-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/2024-06-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/2024-06-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 d0fd0d79439f..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/2024-06-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/2024-06-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/2024-06-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/2024-06-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/2024-06-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 9688cb27405a..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/2024-06-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/2024-06-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/2024-06-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/2024-06-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 bd725011bfd3..e9b5b988f0de 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/ArmSearchModelFactory.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/ArmSearchModelFactory.cs @@ -26,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) @@ -41,29 +41,27 @@ 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. /// 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'. /// 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. /// 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, SearchServiceHostingMode? hostingMode = 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) + 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) { tags ??= new Dictionary(); - disabledDataExfiltrationOptions ??= new List(); + ipRules ??= new List(); privateEndpointConnections ??= new List(); sharedPrivateLinkResources ??= new List(); @@ -83,21 +81,19 @@ public static SearchServiceData SearchServiceData(ResourceIdentifier id = null, 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, 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) { @@ -109,7 +105,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) { @@ -127,7 +123,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) { @@ -147,29 +143,27 @@ 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. /// 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'. /// 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. /// 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, SearchServiceHostingMode? hostingMode = 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) + 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) { tags ??= new Dictionary(); - disabledDataExfiltrationOptions ??= new List(); + ipRules ??= new List(); privateEndpointConnections ??= new List(); sharedPrivateLinkResources ??= new List(); @@ -189,15 +183,13 @@ public static SearchServicePatch SearchServicePatch(ResourceIdentifier id = null 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, serializedAdditionalRawData: null); } @@ -206,7 +198,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) { @@ -223,7 +215,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) { @@ -235,8 +227,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) { @@ -244,9 +236,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) { @@ -298,33 +290,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 d169c5578792..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 - /// 2024-06-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 - /// 2024-06-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 1b9ea1cdd4c6..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 - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -94,7 +94,7 @@ public virtual AsyncPageable GetSearchServicesAsync(Searc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -125,7 +125,7 @@ public virtual Pageable GetSearchServices(SearchManagemen /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual async Task> CheckSe /// /// /// Default Api Version - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -255,7 +255,7 @@ public virtual Pageable GetUsagesBySubscription(AzureLocation } /// - /// Gets the quota usage for a search sku in the given subscription. + /// Gets the quota usage for a search SKU in the given subscription. /// /// /// Request Path @@ -267,7 +267,7 @@ public virtual Pageable GetUsagesBySubscription(AzureLocation /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -296,7 +296,7 @@ public virtual async Task> UsageBySubscriptionSkuAsyn } /// - /// Gets the quota usage for a search sku in the given subscription. + /// Gets the quota usage for a search SKU in the given subscription. /// /// /// Request Path @@ -308,7 +308,7 @@ public virtual async Task> UsageBySubscriptionSkuAsyn /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// 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 7f5237e60a82..b99028bf5406 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs @@ -90,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. /// @@ -139,7 +120,7 @@ public static SearchServiceCollection GetSearchServices(this ResourceGroupResour /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -152,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. @@ -178,7 +159,7 @@ public static async Task> GetSearchServiceAsync( /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -191,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. @@ -217,7 +198,7 @@ public static Response GetSearchService(this ResourceGrou /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -254,7 +235,7 @@ public static AsyncPageable GetSearchServicesAsync(this S /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -291,7 +272,7 @@ public static Pageable GetSearchServices(this Subscriptio /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -328,7 +309,7 @@ public static async Task> CheckSea /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -353,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 @@ -365,7 +346,7 @@ public static Response CheckSearchServiceNa /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -387,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 @@ -399,7 +380,7 @@ public static AsyncPageable GetUsagesBySubscriptionAsync(this /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -421,7 +402,7 @@ public static Pageable GetUsagesBySubscription(this Subscripti } /// - /// Gets the quota usage for a search sku in the given subscription. + /// Gets the quota usage for a search SKU in the given subscription. /// /// /// Request Path @@ -433,7 +414,7 @@ public static Pageable GetUsagesBySubscription(this Subscripti /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -456,7 +437,7 @@ public static async Task> UsageBySubscriptionSkuAsync } /// - /// Gets the quota usage for a search sku in the given subscription. + /// Gets the quota usage for a search SKU in the given subscription. /// /// /// Request Path @@ -468,7 +449,7 @@ public static async Task> UsageBySubscriptionSkuAsync /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// 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 a77b1fc10d3b..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)) - { - 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); - 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 952b975c647a..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)) - { - 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); - 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 22ca0e04e9e0..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)) - { - 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); - 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 1d9e5056281b..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)) - { - 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); - 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 0bd70c770598..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)) - { - 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); - 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 6330154374f0..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)) - { - 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); - 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 e21b8c3af488..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)) - { - 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); - 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 7f0acf9af4fb..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)) - { - 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); - 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 161b63d3dd42..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)) - { - 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); - 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/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/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 3ed055eb84f2..2f666ad01f71 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/SearchServicePatch.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.Serialization.cs index bdab89059ad3..9fa9b702bfb1 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 @@ -68,7 +68,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri 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)) { @@ -90,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); @@ -122,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) @@ -134,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); @@ -154,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()); - } writer.WriteEndObject(); } @@ -198,14 +183,12 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele 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; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -313,7 +296,7 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele { continue; } - publicNetworkAccess = new SearchServicePublicInternetAccess(property0.Value.GetString()); + publicNetworkAccess = property0.Value.GetString().ToSearchServicePublicInternetAccess(); continue; } if (property0.NameEquals("status"u8)) @@ -348,20 +331,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) @@ -390,16 +359,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) @@ -414,27 +373,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; } } @@ -463,14 +423,12 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele statusDetails, provisioningState, networkRuleSet, - disabledDataExfiltrationOptions ?? new ChangeTrackingList(), encryptionWithCmk, disableLocalAuth, authOptions, - semanticSearch, privateEndpointConnections ?? new ChangeTrackingList(), + semanticSearch, sharedPrivateLinkResources ?? new ChangeTrackingList(), - eTag, serializedAdditionalRawData); } @@ -678,7 +636,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(PublicInternetAccess)) { builder.Append(" publicNetworkAccess: "); - builder.AppendLine($"'{PublicInternetAccess.Value.ToString()}'"); + builder.AppendLine($"'{PublicInternetAccess.Value.ToSerialString()}'"); } } @@ -735,11 +693,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 { @@ -750,29 +713,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) { @@ -819,21 +759,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) { @@ -857,6 +782,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) { @@ -880,21 +820,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()}'"); - } - } - builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); 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 6bfa879ffa92..85e1c585c1a8 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,26 +62,24 @@ 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. /// 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'. /// 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. /// 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, SearchServiceHostingMode? hostingMode, 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, 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, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { SearchSku = searchSku; Identity = identity; @@ -94,14 +91,12 @@ internal SearchServicePatch(ResourceIdentifier id, string name, ResourceType res StatusDetails = statusDetails; ProvisioningState = provisioningState; NetworkRuleSet = networkRuleSet; - DisabledDataExfiltrationOptions = disabledDataExfiltrationOptions; EncryptionWithCmk = encryptionWithCmk; IsLocalAuthDisabled = isLocalAuthDisabled; AuthOptions = authOptions; - SemanticSearch = semanticSearch; PrivateEndpointConnections = privateEndpointConnections; + SemanticSearch = semanticSearch; SharedPrivateLinkResources = sharedPrivateLinkResources; - ETag = eTag; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -110,7 +105,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")] @@ -125,7 +120,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. @@ -140,21 +135,18 @@ public SearchServiceSkuName? SearchSkuName /// 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; } @@ -164,17 +156,14 @@ 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; } } } 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/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 5d7c4cc23dbc..f9f7ec4dffe7 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 10f479387cd5..f3d96db6034a 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 8a93d2af2c41..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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 e52b5bcca987..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); - 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 c31e2cd7febd..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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 f747c70f33a9..bd224d995bf1 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 ?? "2024-06-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 6cddfa59e4f0..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 ?? "2024-06-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, default, 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); - 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, default, 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); - 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, default, 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); - 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/PrivateEndpointConnectionsRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index dfacf5e79a64..ab95eed502d8 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 ?? "2024-06-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 8f331bf3413d..e7b11cbcfd38 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 ?? "2024-06-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 307c0ff0a2e6..09b430926c54 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 ?? "2024-06-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 964dd9d7c7b6..049f0f0911ee 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 ?? "2024-06-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -70,8 +70,8 @@ internal HttpMessage CreateUsageBySubscriptionSkuRequest(string subscriptionId, return message; } - /// 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. + /// 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, 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. @@ -99,8 +99,8 @@ 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. + /// 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, 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/ServicesRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServicesRestOperations.cs index 82acdc17d3a0..86e2200cd618 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 ?? "2024-06-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. @@ -451,7 +451,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 +479,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 +535,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 +561,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 +619,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 +647,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 +698,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 +728,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 +780,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 +808,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 00a1820fb0c6..a382211eca36 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 ?? "2024-06-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 8265a798e0aa..70388f7752e9 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 ?? "2024-06-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 81c1e21df4bb..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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Pageable GetAll(SearchMa /// /// /// Default Api Version - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 7445dfd703e4..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 - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(SearchManag /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 1f97032d4001..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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(SearchManagement /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(SearchManagementRequestOpt /// /// /// Default Api Version - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 ea2dbcf5fe6c..bb662086cb8f 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.Serialization.cs @@ -69,7 +69,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri 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)) { @@ -91,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); @@ -123,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) @@ -135,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); @@ -155,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()); - } writer.WriteEndObject(); } @@ -199,14 +184,12 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme 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; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -314,7 +297,7 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme { continue; } - publicNetworkAccess = new SearchServicePublicInternetAccess(property0.Value.GetString()); + publicNetworkAccess = property0.Value.GetString().ToSearchServicePublicInternetAccess(); continue; } if (property0.NameEquals("status"u8)) @@ -349,20 +332,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) @@ -391,16 +360,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) @@ -415,27 +374,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; } } @@ -464,14 +424,12 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme statusDetails, provisioningState, networkRuleSet, - disabledDataExfiltrationOptions ?? new ChangeTrackingList(), encryptionWithCmk, disableLocalAuth, authOptions, - semanticSearch, privateEndpointConnections ?? new ChangeTrackingList(), + semanticSearch, sharedPrivateLinkResources ?? new ChangeTrackingList(), - eTag, serializedAdditionalRawData); } @@ -679,7 +637,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(PublicInternetAccess)) { builder.Append(" publicNetworkAccess: "); - builder.AppendLine($"'{PublicInternetAccess.Value.ToString()}'"); + builder.AppendLine($"'{PublicInternetAccess.Value.ToSerialString()}'"); } } @@ -736,11 +694,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 { @@ -751,29 +714,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) { @@ -820,21 +760,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) { @@ -858,6 +783,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) { @@ -881,21 +821,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()}'"); - } - } - builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.cs index 16bd658fa137..b9deb578ec10 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,26 +66,24 @@ 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. /// 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'. /// 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. /// 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, SearchServiceHostingMode? hostingMode, 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, 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, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { SearchSku = searchSku; Identity = identity; @@ -98,14 +95,12 @@ internal SearchServiceData(ResourceIdentifier id, string name, ResourceType reso StatusDetails = statusDetails; ProvisioningState = provisioningState; NetworkRuleSet = networkRuleSet; - DisabledDataExfiltrationOptions = disabledDataExfiltrationOptions; EncryptionWithCmk = encryptionWithCmk; IsLocalAuthDisabled = isLocalAuthDisabled; AuthOptions = authOptions; - SemanticSearch = semanticSearch; PrivateEndpointConnections = privateEndpointConnections; + SemanticSearch = semanticSearch; SharedPrivateLinkResources = sharedPrivateLinkResources; - ETag = eTag; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -114,7 +109,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")] @@ -129,7 +124,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. @@ -144,21 +139,18 @@ public SearchServiceSkuName? SearchSkuName /// 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; } @@ -168,17 +160,14 @@ 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; } } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.cs index d2dd992350ed..2ba562d19fa5 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.cs @@ -123,7 +123,7 @@ public virtual SearchPrivateEndpointConnectionCollection GetSearchPrivateEndpoin /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -131,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. @@ -155,7 +155,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -163,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. @@ -194,7 +194,7 @@ public virtual SharedSearchServicePrivateLinkResourceCollection GetSharedSearchS /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -202,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. @@ -226,7 +226,7 @@ public virtual async Task> GetS /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -234,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. @@ -245,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 - /// 2024-06-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 - /// 2024-06-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. /// @@ -327,7 +258,7 @@ public virtual Response GetNetwor /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -368,7 +299,7 @@ public virtual async Task> GetAsync(SearchManage /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -409,7 +340,7 @@ public virtual Response Get(SearchManagementRequestOption /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -454,7 +385,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, SearchM /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -499,7 +430,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, SearchManagementRequestO /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -542,7 +473,7 @@ public virtual async Task> UpdateAsync(SearchSer /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -573,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 @@ -585,7 +516,7 @@ public virtual Response Update(SearchServicePatch patch, /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -608,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 @@ -620,7 +551,7 @@ public virtual async Task> GetAdminKeyAsyn /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -655,7 +586,7 @@ public virtual Response GetAdminKey(SearchManagemen /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -691,7 +622,7 @@ public virtual async Task> RegenerateAdmin /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -727,7 +658,7 @@ public virtual Response RegenerateAdminKey(SearchSe /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -767,7 +698,7 @@ public virtual async Task> CreateQueryKeyAsync(s /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -795,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 @@ -807,7 +738,7 @@ public virtual Response CreateQueryKey(string name, Searc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -822,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 @@ -834,7 +765,7 @@ public virtual AsyncPageable GetQueryKeysBySearchServiceA /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -861,7 +792,7 @@ public virtual Pageable GetQueryKeysBySearchService(Searc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -901,7 +832,7 @@ public virtual async Task DeleteQueryKeyAsync(string key, SearchManage /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -941,7 +872,7 @@ public virtual Response DeleteQueryKey(string key, SearchManagementRequestOption /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -967,7 +898,7 @@ public virtual AsyncPageable GetSupportedPrivateLinkR /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// @@ -993,7 +924,7 @@ public virtual Pageable GetSupportedPrivateLinkResour /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -1055,7 +986,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -1117,7 +1048,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -1174,7 +1105,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -1231,7 +1162,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -1291,7 +1222,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-06-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 9dd85b8aa162..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 - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(SearchManage /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, SearchM /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, SearchManagementRequestO /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-06-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 7d43a01c7616..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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(SearchMan /// /// /// Default Api Version - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 - /// 2024-06-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 18933445ada5..ae31048a37af 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/c3cc9abe085093ba880ee3eeb792edb4fa789553/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-2024-06 output-folder: $(this-folder)/Generated clear-output-folder: true