diff --git a/sdk/search/Azure.ResourceManager.Search/api/Azure.ResourceManager.Search.net8.0.cs b/sdk/search/Azure.ResourceManager.Search/api/Azure.ResourceManager.Search.net8.0.cs index 9c9ca6a45c91..0c60f8d26327 100644 --- a/sdk/search/Azure.ResourceManager.Search/api/Azure.ResourceManager.Search.net8.0.cs +++ b/sdk/search/Azure.ResourceManager.Search/api/Azure.ResourceManager.Search.net8.0.cs @@ -52,6 +52,8 @@ public static partial class SearchExtensions public static Azure.Response CheckSearchServiceNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Search.Models.SearchServiceNameAvailabilityContent content, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckSearchServiceNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Search.Models.SearchServiceNameAvailabilityContent content, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Search.NetworkSecurityPerimeterConfigurationResource GetNetworkSecurityPerimeterConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Pageable GetOfferings(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetOfferingsAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Search.SearchPrivateEndpointConnectionResource GetSearchPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSearchService(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string searchServiceName, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSearchServiceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string searchServiceName, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -133,8 +135,10 @@ public partial class SearchServiceData : Azure.ResourceManager.Models.TrackedRes { public SearchServiceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions AuthOptions { get { throw null; } set { } } + public Azure.ResourceManager.Search.Models.ComputeType? ComputeType { get { throw null; } set { } } public System.Collections.Generic.IList DisabledDataExfiltrationOptions { get { throw null; } } public Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk EncryptionWithCmk { get { throw null; } set { } } + public System.Uri Endpoint { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Search.Models.SearchServiceHostingMode? HostingMode { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } @@ -151,11 +155,13 @@ public SearchServiceData(Azure.Core.AzureLocation location) { } public int? ReplicaCount { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchServiceSkuName? SearchSkuName { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchSemanticSearch? SemanticSearch { get { throw null; } set { } } + public System.DateTimeOffset? ServiceUpgradeOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList SharedPrivateLinkResources { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Search.Models.SearchSkuName? SkuName { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchServiceStatus? Status { get { throw null; } } public string StatusDetails { get { throw null; } } + public bool? UpgradeAvailable { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Search.SearchServiceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -208,6 +214,8 @@ protected SearchServiceResource() { } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } public virtual Azure.Response Update(Azure.ResourceManager.Search.Models.SearchServicePatch patch, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Search.Models.SearchServicePatch patch, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpgradeService(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpgradeServiceAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class SharedSearchServicePrivateLinkResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -286,12 +294,20 @@ protected MockableSearchSubscriptionResource() { } public virtual Azure.Response UsageBySubscriptionSku(Azure.Core.AzureLocation location, string skuName, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UsageBySubscriptionSkuAsync(Azure.Core.AzureLocation location, string skuName, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class MockableSearchTenantResource : Azure.ResourceManager.ArmResource + { + protected MockableSearchTenantResource() { } + public virtual Azure.Pageable GetOfferings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetOfferingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } } namespace Azure.ResourceManager.Search.Models { public static partial class ArmSearchModelFactory { + public static Azure.ResourceManager.Search.Models.FeatureOffering FeatureOffering(Azure.ResourceManager.Search.Models.FeatureName? name = default(Azure.ResourceManager.Search.Models.FeatureName?)) { throw null; } public static Azure.ResourceManager.Search.NetworkSecurityPerimeterConfigurationData NetworkSecurityPerimeterConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null, Azure.ResourceManager.Search.Models.NspConfigPerimeter networkSecurityPerimeter = null, Azure.ResourceManager.Search.Models.NspConfigAssociation resourceAssociation = null, Azure.ResourceManager.Search.Models.NspConfigProfile profile = null, System.Collections.Generic.IEnumerable provisioningIssues = null) { throw null; } + public static Azure.ResourceManager.Search.Models.OfferingsByRegion OfferingsByRegion(string regionName = null, System.Collections.Generic.IEnumerable features = null, System.Collections.Generic.IEnumerable skus = null) { throw null; } public static Azure.ResourceManager.Search.Models.QuotaUsageResult QuotaUsageResult(Azure.Core.ResourceIdentifier id = null, string unit = null, int? currentValue = default(int?), int? limit = default(int?), Azure.ResourceManager.Search.Models.QuotaUsageResultName name = null) { throw null; } public static Azure.ResourceManager.Search.Models.QuotaUsageResultName QuotaUsageResultName(string value = null, string localizedValue = null) { throw null; } public static Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk SearchEncryptionWithCmk(Azure.ResourceManager.Search.Models.SearchEncryptionWithCmkEnforcement? enforcement = default(Azure.ResourceManager.Search.Models.SearchEncryptionWithCmkEnforcement?), Azure.ResourceManager.Search.Models.SearchEncryptionComplianceStatus? encryptionComplianceStatus = default(Azure.ResourceManager.Search.Models.SearchEncryptionComplianceStatus?)) { throw null; } @@ -299,18 +315,76 @@ public static partial class ArmSearchModelFactory public static Azure.ResourceManager.Search.Models.SearchPrivateLinkResource SearchPrivateLinkResource(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Search.Models.SearchPrivateLinkResourceProperties properties = null) { throw null; } public static Azure.ResourceManager.Search.Models.SearchPrivateLinkResourceProperties SearchPrivateLinkResourceProperties(string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null, System.Collections.Generic.IEnumerable shareablePrivateLinkResourceTypes = null) { throw null; } public static Azure.ResourceManager.Search.Models.SearchServiceAdminKeyResult SearchServiceAdminKeyResult(string primaryKey = null, string secondaryKey = null) { throw null; } - public static Azure.ResourceManager.Search.SearchServiceData SearchServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchServiceSkuName? searchSkuName = default(Azure.ResourceManager.Search.Models.SearchServiceSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess? publicInternetAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), Azure.ResourceManager.Search.Models.SearchServiceNetworkRuleSet networkRuleSet = null, System.Collections.Generic.IEnumerable disabledDataExfiltrationOptions = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, Azure.ETag? eTag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.Search.SearchServiceData SearchServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchServiceSkuName? searchSkuName = default(Azure.ResourceManager.Search.Models.SearchServiceSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), System.Uri endpoint = null, Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.ComputeType? computeType = default(Azure.ResourceManager.Search.Models.ComputeType?), Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess? publicInternetAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), Azure.ResourceManager.Search.Models.SearchServiceNetworkRuleSet networkRuleSet = null, System.Collections.Generic.IEnumerable disabledDataExfiltrationOptions = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, Azure.ETag? eTag = default(Azure.ETag?), bool? upgradeAvailable = default(bool?), System.DateTimeOffset? serviceUpgradeOn = default(System.DateTimeOffset?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Search.SearchServiceData SearchServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchSkuName? skuName = default(Azure.ResourceManager.Search.Models.SearchSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), System.Collections.Generic.IEnumerable ipRules = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null) { throw null; } + public static Azure.ResourceManager.Search.SearchServiceData SearchServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchSkuName? skuName = default(Azure.ResourceManager.Search.Models.SearchSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), System.Uri endpoint = null, Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.ComputeType? computeType = default(Azure.ResourceManager.Search.Models.ComputeType?), Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), System.Collections.Generic.IEnumerable ipRules = null, System.Collections.Generic.IEnumerable disabledDataExfiltrationOptions = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, bool? upgradeAvailable = default(bool?), System.DateTimeOffset? serviceUpgradeOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Search.Models.SearchServiceNameAvailabilityContent SearchServiceNameAvailabilityContent(string name = null, Azure.ResourceManager.Search.Models.SearchServiceResourceType resourceType = default(Azure.ResourceManager.Search.Models.SearchServiceResourceType)) { throw null; } public static Azure.ResourceManager.Search.Models.SearchServiceNameAvailabilityResult SearchServiceNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.Search.Models.SearchServiceNameUnavailableReason? reason = default(Azure.ResourceManager.Search.Models.SearchServiceNameUnavailableReason?), string message = null) { throw null; } - public static Azure.ResourceManager.Search.Models.SearchServicePatch SearchServicePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchServiceSkuName? searchSkuName = default(Azure.ResourceManager.Search.Models.SearchServiceSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess? publicInternetAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), Azure.ResourceManager.Search.Models.SearchServiceNetworkRuleSet networkRuleSet = null, System.Collections.Generic.IEnumerable disabledDataExfiltrationOptions = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, Azure.ETag? eTag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.Search.Models.SearchServicePatch SearchServicePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchServiceSkuName? searchSkuName = default(Azure.ResourceManager.Search.Models.SearchServiceSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), System.Uri endpoint = null, Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.ComputeType? computeType = default(Azure.ResourceManager.Search.Models.ComputeType?), Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess? publicInternetAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), Azure.ResourceManager.Search.Models.SearchServiceNetworkRuleSet networkRuleSet = null, System.Collections.Generic.IEnumerable disabledDataExfiltrationOptions = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, Azure.ETag? eTag = default(Azure.ETag?), bool? upgradeAvailable = default(bool?), System.DateTimeOffset? serviceUpgradeOn = default(System.DateTimeOffset?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Search.Models.SearchServicePatch SearchServicePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchSkuName? skuName = default(Azure.ResourceManager.Search.Models.SearchSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), System.Collections.Generic.IEnumerable ipRules = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null) { throw null; } + public static Azure.ResourceManager.Search.Models.SearchServicePatch SearchServicePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchSkuName? skuName = default(Azure.ResourceManager.Search.Models.SearchSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), System.Uri endpoint = null, Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.ComputeType? computeType = default(Azure.ResourceManager.Search.Models.ComputeType?), Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), System.Collections.Generic.IEnumerable ipRules = null, System.Collections.Generic.IEnumerable disabledDataExfiltrationOptions = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, bool? upgradeAvailable = default(bool?), System.DateTimeOffset? serviceUpgradeOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Search.Models.SearchServiceQueryKey SearchServiceQueryKey(string name = null, string key = null) { throw null; } public static Azure.ResourceManager.Search.Models.ShareableSearchServicePrivateLinkResourceProperties ShareableSearchServicePrivateLinkResourceProperties(string shareablePrivateLinkResourcePropertiesType = null, string groupId = null, string description = null) { throw null; } public static Azure.ResourceManager.Search.Models.ShareableSearchServicePrivateLinkResourceType ShareableSearchServicePrivateLinkResourceType(string name = null, Azure.ResourceManager.Search.Models.ShareableSearchServicePrivateLinkResourceProperties properties = null) { throw null; } public static Azure.ResourceManager.Search.SharedSearchServicePrivateLinkResourceData SharedSearchServicePrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Search.Models.SharedSearchServicePrivateLinkResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.Search.Models.SkuOffering SkuOffering(Azure.ResourceManager.Search.Models.SearchServiceSkuName? skuName = default(Azure.ResourceManager.Search.Models.SearchServiceSkuName?), Azure.ResourceManager.Search.Models.SkuOfferingLimits limits = null) { throw null; } + public static Azure.ResourceManager.Search.Models.SkuOfferingLimits SkuOfferingLimits(int? indexes = default(int?), int? indexers = default(int?), float? partitionStorageInGigabytes = default(float?), float? partitionVectorStorageInGigabytes = default(float?), int? searchUnits = default(int?), int? replicas = default(int?), int? partitions = default(int?)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ComputeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ComputeType(string value) { throw null; } + public static Azure.ResourceManager.Search.Models.ComputeType Confidential { get { throw null; } } + public static Azure.ResourceManager.Search.Models.ComputeType Default { get { throw null; } } + public bool Equals(Azure.ResourceManager.Search.Models.ComputeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Search.Models.ComputeType left, Azure.ResourceManager.Search.Models.ComputeType right) { throw null; } + public static implicit operator Azure.ResourceManager.Search.Models.ComputeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Search.Models.ComputeType left, Azure.ResourceManager.Search.Models.ComputeType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FeatureName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FeatureName(string value) { throw null; } + public static Azure.ResourceManager.Search.Models.FeatureName AvailabilityZones { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName DocumentIntelligence { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName Grok { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName ImageVectorization { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName MegaStore { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName QueryRewrite { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName S3 { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName SemanticSearch { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName StorageOptimized { get { throw null; } } + public bool Equals(Azure.ResourceManager.Search.Models.FeatureName other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Search.Models.FeatureName left, Azure.ResourceManager.Search.Models.FeatureName right) { throw null; } + public static implicit operator Azure.ResourceManager.Search.Models.FeatureName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Search.Models.FeatureName left, Azure.ResourceManager.Search.Models.FeatureName right) { throw null; } + public override string ToString() { throw null; } + } + public partial class FeatureOffering : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FeatureOffering() { } + public Azure.ResourceManager.Search.Models.FeatureName? Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.FeatureOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.FeatureOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class NspConfigAccessRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -417,6 +491,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class OfferingsByRegion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OfferingsByRegion() { } + public System.Collections.Generic.IReadOnlyList Features { get { throw null; } } + public string RegionName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Skus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.OfferingsByRegion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.OfferingsByRegion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class QuotaUsageResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal QuotaUsageResult() { } @@ -683,8 +770,10 @@ public partial class SearchServicePatch : Azure.ResourceManager.Models.TrackedRe { public SearchServicePatch(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions AuthOptions { get { throw null; } set { } } + public Azure.ResourceManager.Search.Models.ComputeType? ComputeType { get { throw null; } set { } } public System.Collections.Generic.IList DisabledDataExfiltrationOptions { get { throw null; } } public Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk EncryptionWithCmk { get { throw null; } set { } } + public System.Uri Endpoint { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Search.Models.SearchServiceHostingMode? HostingMode { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } @@ -701,11 +790,13 @@ public SearchServicePatch(Azure.Core.AzureLocation location) { } public int? ReplicaCount { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchServiceSkuName? SearchSkuName { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchSemanticSearch? SemanticSearch { get { throw null; } set { } } + public System.DateTimeOffset? ServiceUpgradeOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList SharedPrivateLinkResources { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Search.Models.SearchSkuName? SkuName { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchServiceStatus? Status { get { throw null; } } public string StatusDetails { get { throw null; } } + public bool? UpgradeAvailable { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Search.Models.SearchServicePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -952,4 +1043,33 @@ public enum SharedSearchServicePrivateLinkResourceStatus Rejected = 2, Disconnected = 3, } + public partial class SkuOffering : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SkuOffering() { } + public Azure.ResourceManager.Search.Models.SkuOfferingLimits Limits { get { throw null; } } + public Azure.ResourceManager.Search.Models.SearchServiceSkuName? SkuName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.SkuOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.SkuOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SkuOfferingLimits : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SkuOfferingLimits() { } + public int? Indexers { get { throw null; } } + public int? Indexes { get { throw null; } } + public int? Partitions { get { throw null; } } + public float? PartitionStorageInGigabytes { get { throw null; } } + public float? PartitionVectorStorageInGigabytes { get { throw null; } } + public int? Replicas { get { throw null; } } + public int? SearchUnits { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.SkuOfferingLimits System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.SkuOfferingLimits System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } diff --git a/sdk/search/Azure.ResourceManager.Search/api/Azure.ResourceManager.Search.netstandard2.0.cs b/sdk/search/Azure.ResourceManager.Search/api/Azure.ResourceManager.Search.netstandard2.0.cs index 9c9ca6a45c91..0c60f8d26327 100644 --- a/sdk/search/Azure.ResourceManager.Search/api/Azure.ResourceManager.Search.netstandard2.0.cs +++ b/sdk/search/Azure.ResourceManager.Search/api/Azure.ResourceManager.Search.netstandard2.0.cs @@ -52,6 +52,8 @@ public static partial class SearchExtensions public static Azure.Response CheckSearchServiceNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Search.Models.SearchServiceNameAvailabilityContent content, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckSearchServiceNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Search.Models.SearchServiceNameAvailabilityContent content, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Search.NetworkSecurityPerimeterConfigurationResource GetNetworkSecurityPerimeterConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Pageable GetOfferings(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetOfferingsAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Search.SearchPrivateEndpointConnectionResource GetSearchPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSearchService(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string searchServiceName, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSearchServiceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string searchServiceName, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -133,8 +135,10 @@ public partial class SearchServiceData : Azure.ResourceManager.Models.TrackedRes { public SearchServiceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions AuthOptions { get { throw null; } set { } } + public Azure.ResourceManager.Search.Models.ComputeType? ComputeType { get { throw null; } set { } } public System.Collections.Generic.IList DisabledDataExfiltrationOptions { get { throw null; } } public Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk EncryptionWithCmk { get { throw null; } set { } } + public System.Uri Endpoint { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Search.Models.SearchServiceHostingMode? HostingMode { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } @@ -151,11 +155,13 @@ public SearchServiceData(Azure.Core.AzureLocation location) { } public int? ReplicaCount { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchServiceSkuName? SearchSkuName { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchSemanticSearch? SemanticSearch { get { throw null; } set { } } + public System.DateTimeOffset? ServiceUpgradeOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList SharedPrivateLinkResources { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Search.Models.SearchSkuName? SkuName { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchServiceStatus? Status { get { throw null; } } public string StatusDetails { get { throw null; } } + public bool? UpgradeAvailable { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Search.SearchServiceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -208,6 +214,8 @@ protected SearchServiceResource() { } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } public virtual Azure.Response Update(Azure.ResourceManager.Search.Models.SearchServicePatch patch, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Search.Models.SearchServicePatch patch, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpgradeService(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpgradeServiceAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class SharedSearchServicePrivateLinkResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -286,12 +294,20 @@ protected MockableSearchSubscriptionResource() { } public virtual Azure.Response UsageBySubscriptionSku(Azure.Core.AzureLocation location, string skuName, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UsageBySubscriptionSkuAsync(Azure.Core.AzureLocation location, string skuName, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class MockableSearchTenantResource : Azure.ResourceManager.ArmResource + { + protected MockableSearchTenantResource() { } + public virtual Azure.Pageable GetOfferings(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetOfferingsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } } namespace Azure.ResourceManager.Search.Models { public static partial class ArmSearchModelFactory { + public static Azure.ResourceManager.Search.Models.FeatureOffering FeatureOffering(Azure.ResourceManager.Search.Models.FeatureName? name = default(Azure.ResourceManager.Search.Models.FeatureName?)) { throw null; } public static Azure.ResourceManager.Search.NetworkSecurityPerimeterConfigurationData NetworkSecurityPerimeterConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null, Azure.ResourceManager.Search.Models.NspConfigPerimeter networkSecurityPerimeter = null, Azure.ResourceManager.Search.Models.NspConfigAssociation resourceAssociation = null, Azure.ResourceManager.Search.Models.NspConfigProfile profile = null, System.Collections.Generic.IEnumerable provisioningIssues = null) { throw null; } + public static Azure.ResourceManager.Search.Models.OfferingsByRegion OfferingsByRegion(string regionName = null, System.Collections.Generic.IEnumerable features = null, System.Collections.Generic.IEnumerable skus = null) { throw null; } public static Azure.ResourceManager.Search.Models.QuotaUsageResult QuotaUsageResult(Azure.Core.ResourceIdentifier id = null, string unit = null, int? currentValue = default(int?), int? limit = default(int?), Azure.ResourceManager.Search.Models.QuotaUsageResultName name = null) { throw null; } public static Azure.ResourceManager.Search.Models.QuotaUsageResultName QuotaUsageResultName(string value = null, string localizedValue = null) { throw null; } public static Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk SearchEncryptionWithCmk(Azure.ResourceManager.Search.Models.SearchEncryptionWithCmkEnforcement? enforcement = default(Azure.ResourceManager.Search.Models.SearchEncryptionWithCmkEnforcement?), Azure.ResourceManager.Search.Models.SearchEncryptionComplianceStatus? encryptionComplianceStatus = default(Azure.ResourceManager.Search.Models.SearchEncryptionComplianceStatus?)) { throw null; } @@ -299,18 +315,76 @@ public static partial class ArmSearchModelFactory public static Azure.ResourceManager.Search.Models.SearchPrivateLinkResource SearchPrivateLinkResource(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Search.Models.SearchPrivateLinkResourceProperties properties = null) { throw null; } public static Azure.ResourceManager.Search.Models.SearchPrivateLinkResourceProperties SearchPrivateLinkResourceProperties(string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null, System.Collections.Generic.IEnumerable shareablePrivateLinkResourceTypes = null) { throw null; } public static Azure.ResourceManager.Search.Models.SearchServiceAdminKeyResult SearchServiceAdminKeyResult(string primaryKey = null, string secondaryKey = null) { throw null; } - public static Azure.ResourceManager.Search.SearchServiceData SearchServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchServiceSkuName? searchSkuName = default(Azure.ResourceManager.Search.Models.SearchServiceSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess? publicInternetAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), Azure.ResourceManager.Search.Models.SearchServiceNetworkRuleSet networkRuleSet = null, System.Collections.Generic.IEnumerable disabledDataExfiltrationOptions = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, Azure.ETag? eTag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.Search.SearchServiceData SearchServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchServiceSkuName? searchSkuName = default(Azure.ResourceManager.Search.Models.SearchServiceSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), System.Uri endpoint = null, Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.ComputeType? computeType = default(Azure.ResourceManager.Search.Models.ComputeType?), Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess? publicInternetAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), Azure.ResourceManager.Search.Models.SearchServiceNetworkRuleSet networkRuleSet = null, System.Collections.Generic.IEnumerable disabledDataExfiltrationOptions = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, Azure.ETag? eTag = default(Azure.ETag?), bool? upgradeAvailable = default(bool?), System.DateTimeOffset? serviceUpgradeOn = default(System.DateTimeOffset?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Search.SearchServiceData SearchServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchSkuName? skuName = default(Azure.ResourceManager.Search.Models.SearchSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), System.Collections.Generic.IEnumerable ipRules = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null) { throw null; } + public static Azure.ResourceManager.Search.SearchServiceData SearchServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchSkuName? skuName = default(Azure.ResourceManager.Search.Models.SearchSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), System.Uri endpoint = null, Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.ComputeType? computeType = default(Azure.ResourceManager.Search.Models.ComputeType?), Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), System.Collections.Generic.IEnumerable ipRules = null, System.Collections.Generic.IEnumerable disabledDataExfiltrationOptions = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, bool? upgradeAvailable = default(bool?), System.DateTimeOffset? serviceUpgradeOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Search.Models.SearchServiceNameAvailabilityContent SearchServiceNameAvailabilityContent(string name = null, Azure.ResourceManager.Search.Models.SearchServiceResourceType resourceType = default(Azure.ResourceManager.Search.Models.SearchServiceResourceType)) { throw null; } public static Azure.ResourceManager.Search.Models.SearchServiceNameAvailabilityResult SearchServiceNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.Search.Models.SearchServiceNameUnavailableReason? reason = default(Azure.ResourceManager.Search.Models.SearchServiceNameUnavailableReason?), string message = null) { throw null; } - public static Azure.ResourceManager.Search.Models.SearchServicePatch SearchServicePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchServiceSkuName? searchSkuName = default(Azure.ResourceManager.Search.Models.SearchServiceSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess? publicInternetAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), Azure.ResourceManager.Search.Models.SearchServiceNetworkRuleSet networkRuleSet = null, System.Collections.Generic.IEnumerable disabledDataExfiltrationOptions = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, Azure.ETag? eTag = default(Azure.ETag?)) { throw null; } + public static Azure.ResourceManager.Search.Models.SearchServicePatch SearchServicePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchServiceSkuName? searchSkuName = default(Azure.ResourceManager.Search.Models.SearchServiceSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), System.Uri endpoint = null, Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.ComputeType? computeType = default(Azure.ResourceManager.Search.Models.ComputeType?), Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess? publicInternetAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicInternetAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), Azure.ResourceManager.Search.Models.SearchServiceNetworkRuleSet networkRuleSet = null, System.Collections.Generic.IEnumerable disabledDataExfiltrationOptions = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, Azure.ETag? eTag = default(Azure.ETag?), bool? upgradeAvailable = default(bool?), System.DateTimeOffset? serviceUpgradeOn = default(System.DateTimeOffset?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Search.Models.SearchServicePatch SearchServicePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchSkuName? skuName = default(Azure.ResourceManager.Search.Models.SearchSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), System.Collections.Generic.IEnumerable ipRules = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null) { throw null; } + public static Azure.ResourceManager.Search.Models.SearchServicePatch SearchServicePatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Search.Models.SearchSkuName? skuName = default(Azure.ResourceManager.Search.Models.SearchSkuName?), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, int? replicaCount = default(int?), int? partitionCount = default(int?), System.Uri endpoint = null, Azure.ResourceManager.Search.Models.SearchServiceHostingMode? hostingMode = default(Azure.ResourceManager.Search.Models.SearchServiceHostingMode?), Azure.ResourceManager.Search.Models.ComputeType? computeType = default(Azure.ResourceManager.Search.Models.ComputeType?), Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.Search.Models.SearchServicePublicNetworkAccess?), Azure.ResourceManager.Search.Models.SearchServiceStatus? status = default(Azure.ResourceManager.Search.Models.SearchServiceStatus?), string statusDetails = null, Azure.ResourceManager.Search.Models.SearchServiceProvisioningState? provisioningState = default(Azure.ResourceManager.Search.Models.SearchServiceProvisioningState?), System.Collections.Generic.IEnumerable ipRules = null, System.Collections.Generic.IEnumerable disabledDataExfiltrationOptions = null, Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = default(bool?), Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions authOptions = null, Azure.ResourceManager.Search.Models.SearchSemanticSearch? semanticSearch = default(Azure.ResourceManager.Search.Models.SearchSemanticSearch?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, bool? upgradeAvailable = default(bool?), System.DateTimeOffset? serviceUpgradeOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Search.Models.SearchServiceQueryKey SearchServiceQueryKey(string name = null, string key = null) { throw null; } public static Azure.ResourceManager.Search.Models.ShareableSearchServicePrivateLinkResourceProperties ShareableSearchServicePrivateLinkResourceProperties(string shareablePrivateLinkResourcePropertiesType = null, string groupId = null, string description = null) { throw null; } public static Azure.ResourceManager.Search.Models.ShareableSearchServicePrivateLinkResourceType ShareableSearchServicePrivateLinkResourceType(string name = null, Azure.ResourceManager.Search.Models.ShareableSearchServicePrivateLinkResourceProperties properties = null) { throw null; } public static Azure.ResourceManager.Search.SharedSearchServicePrivateLinkResourceData SharedSearchServicePrivateLinkResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Search.Models.SharedSearchServicePrivateLinkResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.Search.Models.SkuOffering SkuOffering(Azure.ResourceManager.Search.Models.SearchServiceSkuName? skuName = default(Azure.ResourceManager.Search.Models.SearchServiceSkuName?), Azure.ResourceManager.Search.Models.SkuOfferingLimits limits = null) { throw null; } + public static Azure.ResourceManager.Search.Models.SkuOfferingLimits SkuOfferingLimits(int? indexes = default(int?), int? indexers = default(int?), float? partitionStorageInGigabytes = default(float?), float? partitionVectorStorageInGigabytes = default(float?), int? searchUnits = default(int?), int? replicas = default(int?), int? partitions = default(int?)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ComputeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ComputeType(string value) { throw null; } + public static Azure.ResourceManager.Search.Models.ComputeType Confidential { get { throw null; } } + public static Azure.ResourceManager.Search.Models.ComputeType Default { get { throw null; } } + public bool Equals(Azure.ResourceManager.Search.Models.ComputeType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Search.Models.ComputeType left, Azure.ResourceManager.Search.Models.ComputeType right) { throw null; } + public static implicit operator Azure.ResourceManager.Search.Models.ComputeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Search.Models.ComputeType left, Azure.ResourceManager.Search.Models.ComputeType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct FeatureName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public FeatureName(string value) { throw null; } + public static Azure.ResourceManager.Search.Models.FeatureName AvailabilityZones { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName DocumentIntelligence { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName Grok { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName ImageVectorization { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName MegaStore { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName QueryRewrite { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName S3 { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName SemanticSearch { get { throw null; } } + public static Azure.ResourceManager.Search.Models.FeatureName StorageOptimized { get { throw null; } } + public bool Equals(Azure.ResourceManager.Search.Models.FeatureName other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Search.Models.FeatureName left, Azure.ResourceManager.Search.Models.FeatureName right) { throw null; } + public static implicit operator Azure.ResourceManager.Search.Models.FeatureName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Search.Models.FeatureName left, Azure.ResourceManager.Search.Models.FeatureName right) { throw null; } + public override string ToString() { throw null; } + } + public partial class FeatureOffering : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FeatureOffering() { } + public Azure.ResourceManager.Search.Models.FeatureName? Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.FeatureOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.FeatureOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class NspConfigAccessRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -417,6 +491,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class OfferingsByRegion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OfferingsByRegion() { } + public System.Collections.Generic.IReadOnlyList Features { get { throw null; } } + public string RegionName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Skus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.OfferingsByRegion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.OfferingsByRegion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class QuotaUsageResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal QuotaUsageResult() { } @@ -683,8 +770,10 @@ public partial class SearchServicePatch : Azure.ResourceManager.Models.TrackedRe { public SearchServicePatch(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Search.Models.SearchAadAuthDataPlaneAuthOptions AuthOptions { get { throw null; } set { } } + public Azure.ResourceManager.Search.Models.ComputeType? ComputeType { get { throw null; } set { } } public System.Collections.Generic.IList DisabledDataExfiltrationOptions { get { throw null; } } public Azure.ResourceManager.Search.Models.SearchEncryptionWithCmk EncryptionWithCmk { get { throw null; } set { } } + public System.Uri Endpoint { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.Search.Models.SearchServiceHostingMode? HostingMode { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } @@ -701,11 +790,13 @@ public SearchServicePatch(Azure.Core.AzureLocation location) { } public int? ReplicaCount { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchServiceSkuName? SearchSkuName { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchSemanticSearch? SemanticSearch { get { throw null; } set { } } + public System.DateTimeOffset? ServiceUpgradeOn { get { throw null; } } public System.Collections.Generic.IReadOnlyList SharedPrivateLinkResources { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Search.Models.SearchSkuName? SkuName { get { throw null; } set { } } public Azure.ResourceManager.Search.Models.SearchServiceStatus? Status { get { throw null; } } public string StatusDetails { get { throw null; } } + public bool? UpgradeAvailable { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Search.Models.SearchServicePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -952,4 +1043,33 @@ public enum SharedSearchServicePrivateLinkResourceStatus Rejected = 2, Disconnected = 3, } + public partial class SkuOffering : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SkuOffering() { } + public Azure.ResourceManager.Search.Models.SkuOfferingLimits Limits { get { throw null; } } + public Azure.ResourceManager.Search.Models.SearchServiceSkuName? SkuName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.SkuOffering System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.SkuOffering System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SkuOfferingLimits : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SkuOfferingLimits() { } + public int? Indexers { get { throw null; } } + public int? Indexes { get { throw null; } } + public int? Partitions { get { throw null; } } + public float? PartitionStorageInGigabytes { get { throw null; } } + public float? PartitionVectorStorageInGigabytes { get { throw null; } } + public int? Replicas { get { throw null; } } + public int? SearchUnits { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.SkuOfferingLimits System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Search.Models.SkuOfferingLimits System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } diff --git a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs index 0afe9befb528..1484fd45cc4d 100644 --- a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs +++ b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkSecurityPerimeterConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetAnNSPConfigByName() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_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 @@ -53,7 +53,7 @@ public async Task Get_GetAnNSPConfigByName() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListNSPConfigsBySearchService() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByService.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByService.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_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 @@ -89,7 +89,7 @@ public async Task GetAll_ListNSPConfigsBySearchService() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnNSPConfigByName() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_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 @@ -119,7 +119,7 @@ public async Task Exists_GetAnNSPConfigByName() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnNSPConfigByName() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_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_NetworkSecurityPerimeterConfigurationResource.cs b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs index c576f6b65a27..1ef103f94ba7 100644 --- a/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs +++ b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_NetworkSecurityPerimeterConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnNSPConfigByName() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_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 @@ -50,7 +50,7 @@ public async Task Get_GetAnNSPConfigByName() [Ignore("Only validating compilation of examples")] public async Task Reconcile_ReconcileNSPConfig() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Reconcile" 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_SearchPrivateEndpointConnectionCollection.cs b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_SearchPrivateEndpointConnectionCollection.cs index 40d8efc5ab29..b895ee82b831 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/preview/2025-02-01-preview/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 @@ -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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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..592ae530c478 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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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 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..8236be09c067 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/preview/2025-02-01-preview/examples/SearchCreateOrUpdateService.json // this example is just showing the usage of "Services_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,6 +48,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateService() ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, + ComputeType = ComputeType.Default, Tags = { ["app-name"] = "My e-commerce app" @@ -67,7 +68,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/preview/2025-02-01-preview/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 @@ -93,6 +94,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceAuthOptions() ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, + ComputeType = ComputeType.Default, AuthOptions = new SearchAadAuthDataPlaneAuthOptions { AadAuthFailureMode = SearchAadAuthFailureMode.Http401WithBearerChallenge, @@ -116,7 +118,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/preview/2025-02-01-preview/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 @@ -142,6 +144,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceDisableLocalAuth() ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, + ComputeType = ComputeType.Default, IsLocalAuthDisabled = true, Tags = { @@ -162,7 +165,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/preview/2025-02-01-preview/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 @@ -188,6 +191,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceToAllowAccessFromPri ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, + ComputeType = ComputeType.Default, PublicInternetAccess = SearchServicePublicInternetAccess.Disabled, Tags = { @@ -208,7 +212,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/preview/2025-02-01-preview/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,6 +238,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceToAllowAccessFromPub ReplicaCount = 1, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, + ComputeType = ComputeType.Default, NetworkRuleSet = new SearchServiceNetworkRuleSet { IPRules = {new SearchServiceIPRule @@ -263,7 +268,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceToAllowAccessFromPub [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 + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json // this example is just showing the usage of "Services_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -289,6 +294,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceToAllowAccessFromPub ReplicaCount = 1, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, + ComputeType = ComputeType.Default, NetworkRuleSet = new SearchServiceNetworkRuleSet { IPRules = {new SearchServiceIPRule @@ -319,7 +325,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/preview/2025-02-01-preview/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 @@ -345,6 +351,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceWithCmkEnforcement() ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, + ComputeType = ComputeType.Default, EncryptionWithCmk = new SearchEncryptionWithCmk { Enforcement = SearchEncryptionWithCmkEnforcement.Enabled, @@ -368,7 +375,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceWithCmkEnforcement() [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 + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceWithDataExfiltration.json // this example is just showing the usage of "Services_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -394,6 +401,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceWithDataExfiltration ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, + ComputeType = ComputeType.Default, DisabledDataExfiltrationOptions = { SearchDisabledDataExfiltrationOption.All }, Tags = { @@ -414,7 +422,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceWithDataExfiltration [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/preview/2025-02-01-preview/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 @@ -447,6 +455,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateServiceWithIdentity() ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, + ComputeType = ComputeType.Default, Tags = { ["app-name"] = "My e-commerce app" @@ -466,7 +475,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/preview/2025-02-01-preview/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 @@ -492,6 +501,7 @@ public async Task CreateOrUpdate_SearchCreateOrUpdateWithSemanticSearch() ReplicaCount = 3, PartitionCount = 1, HostingMode = SearchServiceHostingMode.Default, + ComputeType = ComputeType.Default, SemanticSearch = SearchSemanticSearch.Free, Tags = { @@ -512,7 +522,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/preview/2025-02-01-preview/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 +555,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/preview/2025-02-01-preview/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 +590,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/preview/2025-02-01-preview/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 +619,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/preview/2025-02-01-preview/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..b2a23e239622 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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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 @@ -281,7 +281,7 @@ public async Task Update_SearchUpdateServiceToAllowAccessFromPublicCustomIPs() [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 + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json // this example is just showing the usage of "Services_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -328,7 +328,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/preview/2025-02-01-preview/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 +363,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/preview/2025-02-01-preview/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 @@ -406,7 +406,7 @@ public async Task Update_SearchUpdateServiceWithCmkEnforcement() [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 + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceWithDataExfiltration.json // this example is just showing the usage of "Services_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -446,7 +446,7 @@ public async Task Update_SearchUpdateServiceWithDataExfiltration() [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/preview/2025-02-01-preview/examples/SearchUpdateServiceWithSemanticSearch.json // this example is just showing the usage of "Services_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -482,11 +482,50 @@ public async Task Update_SearchUpdateServiceWithSemanticSearch() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SearchUpdateServiceWithSku() + { + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceWithSku.json + // this example is just showing the usage of "Services_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SearchServiceResource created on azure + // for more information of creating SearchServiceResource, please refer to the document of SearchServiceResource + string subscriptionId = "subid"; + string resourceGroupName = "rg1"; + string searchServiceName = "mysearchservice"; + ResourceIdentifier searchServiceResourceId = SearchServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, searchServiceName); + SearchServiceResource searchService = client.GetSearchServiceResource(searchServiceResourceId); + + // invoke the operation + SearchServicePatch patch = new SearchServicePatch(default) + { + SearchSkuName = SearchServiceSkuName.Standard2, + Tags = +{ +["app-name"] = "My e-commerce app", +["new-tag"] = "Adding a new tag" +}, + }; + SearchServiceResource result = await searchService.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SearchServiceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetAdminKey_SearchGetAdminKeys() { - // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2024-06-01-preview/examples/SearchGetAdminKeys.json + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/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 +551,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/preview/2025-02-01-preview/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 +578,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/preview/2025-02-01-preview/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 @@ -566,7 +605,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/preview/2025-02-01-preview/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 +634,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/preview/2025-02-01-preview/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 +661,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/preview/2025-02-01-preview/examples/ListSupportedPrivateLinkResources.json // this example is just showing the usage of "PrivateLinkResources_ListSupported" operation, for the dependent resources, they will have to be created separately. // 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 @@ -646,5 +685,36 @@ public async Task GetSupportedPrivateLinkResources_ListSupportedPrivateLinkResou Console.WriteLine("Succeeded"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task UpgradeService_UpgradeSearchServiceToLatestVersion() + { + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/UpgradeSearchServiceToLatestVersion.json + // this example is just showing the usage of "Service_Upgrade" operation, for the dependent resources, they will have to be created separately. + + // 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 + ArmOperation lro = await searchService.UpgradeServiceAsync(WaitUntil.Completed); + 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}"); + } } } 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..6cf46fdad646 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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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..466e3b55ebb7 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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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..e081d0df1ae0 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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/preview/2025-02-01-preview/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/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_TenantResourceExtensions.cs new file mode 100644 index 000000000000..7af863a20a16 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/samples/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Search.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.Search.Samples +{ + public partial class Sample_TenantResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetOfferings_SearchListOfferings() + { + // Generated from example definition: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchListOfferings.json + // this example is just showing the usage of "Offerings_List" 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); + + TenantResource tenantResource = client.GetTenants().GetAllAsync().GetAsyncEnumerator().Current; + + // invoke the operation and iterate over the result + await foreach (OfferingsByRegion item in tenantResource.GetOfferingsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Customization/ArmSearchModelFactory.cs b/sdk/search/Azure.ResourceManager.Search/src/Customization/ArmSearchModelFactory.cs index 3e4cb4020038..707b73a43678 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Customization/ArmSearchModelFactory.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Customization/ArmSearchModelFactory.cs @@ -3,6 +3,7 @@ #nullable disable +using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; @@ -14,6 +15,66 @@ namespace Azure.ResourceManager.Search.Models /// Model factory for models. public static partial class ArmSearchModelFactory { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The SKU of the search service, which determines billing rate and capacity limits. This property is required when creating a new search service. + /// The identity of the resource. Current supported identity types: None, SystemAssigned. + /// The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. + /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. + /// The endpoint of the Azure AI Search service. + /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. + /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. + /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. + /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. 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 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. + /// 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. + /// The list of private endpoint connections to the search service. + /// Sets options that control the availability of semantic search. This configuration is only possible for certain search SKUs in certain locations. + /// The list of shared private link resources managed by the search service. + /// Indicates whether or not the search service has an upgrade available. + /// The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. + public static SearchServiceData SearchServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SearchSkuName? skuName = null, ManagedServiceIdentity identity = null, int? replicaCount = null, int? partitionCount = null, Uri endpoint = null, SearchServiceHostingMode? hostingMode = null, ComputeType? computeType = null, SearchServicePublicNetworkAccess? publicNetworkAccess = null, SearchServiceStatus? status = null, string statusDetails = null, SearchServiceProvisioningState? provisioningState = null, IEnumerable ipRules = null, IEnumerable disabledDataExfiltrationOptions = null, SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = null, SearchAadAuthDataPlaneAuthOptions authOptions = null, SearchSemanticSearch? semanticSearch = null, IEnumerable privateEndpointConnections = null, IEnumerable sharedPrivateLinkResources = null, bool? upgradeAvailable = null, DateTimeOffset? serviceUpgradeOn = null) + { + return SearchServiceData(id, + name, + resourceType, + systemData, + tags, + location, + // ternary operator must use a nullable instance of the type to avoid triggering the implicit cast on the null + skuName.HasValue ? new SearchServiceSkuName?(skuName.Value.ToSerialString()) : null, + identity, + replicaCount, + partitionCount, + endpoint, + hostingMode, + computeType, + // ternary operator must use a nullable instance of the type to avoid triggering the implicit cast on the null + publicNetworkAccess.HasValue ? new SearchServicePublicInternetAccess?(publicNetworkAccess.Value.ToSerialString()) : null, + status, + statusDetails, + provisioningState, + ipRules != null ? new SearchServiceNetworkRuleSet(ipRules?.ToList(), null, null) : null, + disabledDataExfiltrationOptions, + encryptionWithCmk, + isLocalAuthDisabled, + authOptions, + semanticSearch, + privateEndpointConnections, + sharedPrivateLinkResources, + null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -52,7 +113,9 @@ public static SearchServiceData SearchServiceData(ResourceIdentifier id = null, identity, replicaCount, partitionCount, + null, hostingMode, + null, // ternary operator must use a nullable instance of the type to avoid triggering the implicit cast on the null publicNetworkAccess.HasValue ? new SearchServicePublicInternetAccess?(publicNetworkAccess.Value.ToSerialString()) : null, status, @@ -69,6 +132,70 @@ public static SearchServiceData SearchServiceData(ResourceIdentifier id = null, null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The SKU of the search service, which determines billing rate 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 number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. + /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. + /// The endpoint of the Azure AI Search service. + /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. + /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. + /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. + /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. 'stopped': The search service is in a subscription that's disabled. If your service is in the degraded, disabled, or error states, it means the Azure AI Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. + /// The 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 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. + /// 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. + /// Indicates whether or not the search service has an upgrade available. + /// The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. + /// A new instance for mocking. + public static SearchServicePatch SearchServicePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SearchSkuName? skuName = null, ManagedServiceIdentity identity = null, int? replicaCount = null, int? partitionCount = null, Uri endpoint = null, SearchServiceHostingMode? hostingMode = null, ComputeType? computeType = null, SearchServicePublicNetworkAccess? publicNetworkAccess = null, SearchServiceStatus? status = null, string statusDetails = null, SearchServiceProvisioningState? provisioningState = null, IEnumerable ipRules = null, IEnumerable disabledDataExfiltrationOptions = null, SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = null, SearchAadAuthDataPlaneAuthOptions authOptions = null, SearchSemanticSearch? semanticSearch = null, IEnumerable privateEndpointConnections = null, IEnumerable sharedPrivateLinkResources = null, bool? upgradeAvailable = null, DateTimeOffset? serviceUpgradeOn = null) + { + tags ??= new Dictionary(); + disabledDataExfiltrationOptions ??= new List(); + privateEndpointConnections ??= new List(); + sharedPrivateLinkResources ??= new List(); + + return SearchServicePatch(id, + name, + resourceType, + systemData, + tags, + location, + skuName.ToString(), + identity, + replicaCount, + partitionCount, + endpoint, + hostingMode, + computeType, + publicNetworkAccess.ToString(), + status, + statusDetails, + provisioningState, + (ipRules != null ? new SearchServiceNetworkRuleSet(ipRules?.ToList(), null, null) : null), + disabledDataExfiltrationOptions, + encryptionWithCmk, + isLocalAuthDisabled, + authOptions, + semanticSearch, + privateEndpointConnections, + sharedPrivateLinkResources, + null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -106,7 +233,9 @@ public static SearchServicePatch SearchServicePatch(ResourceIdentifier id = null identity, replicaCount, partitionCount, + null, hostingMode, + null, publicNetworkAccess.ToString(), status, statusDetails, diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/ArmSearchModelFactory.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/ArmSearchModelFactory.cs index bd725011bfd3..4c145b62a9f3 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/ArmSearchModelFactory.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/ArmSearchModelFactory.cs @@ -16,6 +16,58 @@ namespace Azure.ResourceManager.Search.Models /// Model factory for models. public static partial class ArmSearchModelFactory { + /// Initializes a new instance of . + /// The name of the region. + /// The list of features offered in this region. + /// The list of SKUs offered in this region. + /// A new instance for mocking. + public static OfferingsByRegion OfferingsByRegion(string regionName = null, IEnumerable features = null, IEnumerable skus = null) + { + features ??= new List(); + skus ??= new List(); + + return new OfferingsByRegion(regionName, features?.ToList(), skus?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the feature offered in this region. + /// A new instance for mocking. + public static FeatureOffering FeatureOffering(FeatureName? name = null) + { + return new FeatureOffering(name, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Defines the SKU of a search service, which determines billing rate and capacity limits. + /// The limits associated with this SKU offered in this region. + /// A new instance for mocking. + public static SkuOffering SkuOffering(SearchServiceSkuName? skuName = null, SkuOfferingLimits limits = null) + { + return new SkuOffering(skuName != null ? new SearchSku(skuName, serializedAdditionalRawData: null) : null, limits, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The maximum number of indexes available for this SKU. + /// The maximum number of indexers available for this SKU. + /// The maximum storage size in Gigabytes available for this SKU per partition. + /// The maximum vector storage size in Gigabytes available for this SKU per partition. + /// The maximum number of search units available for this SKU. + /// The maximum number of replicas available for this SKU. + /// The maximum number of partitions available for this SKU. + /// A new instance for mocking. + public static SkuOfferingLimits SkuOfferingLimits(int? indexes = null, int? indexers = null, float? partitionStorageInGigabytes = null, float? partitionVectorStorageInGigabytes = null, int? searchUnits = null, int? replicas = null, int? partitions = null) + { + return new SkuOfferingLimits( + indexes, + indexers, + partitionStorageInGigabytes, + partitionVectorStorageInGigabytes, + searchUnits, + replicas, + partitions, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The primary admin API key of the search service. /// The secondary admin API key of the search service. @@ -45,7 +97,9 @@ public static SearchServiceQueryKey SearchServiceQueryKey(string name = null, st /// The identity of the resource. /// The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. + /// The endpoint of the Azure AI Search service. /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. + /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. 'stopped': The search service is in a subscription that's disabled. If your service is in the degraded, disabled, or error states, it means the Azure AI Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. /// The details of the search service status. @@ -59,8 +113,10 @@ public static SearchServiceQueryKey SearchServiceQueryKey(string name = null, st /// 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. + /// Indicates whether or not the search service has an upgrade available. + /// The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. /// A new instance for mocking. - public static SearchServiceData SearchServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SearchServiceSkuName? searchSkuName = null, ManagedServiceIdentity identity = null, int? replicaCount = null, int? partitionCount = null, 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, Uri endpoint = null, SearchServiceHostingMode? hostingMode = null, ComputeType? computeType = null, SearchServicePublicInternetAccess? publicInternetAccess = null, SearchServiceStatus? status = null, string statusDetails = null, SearchServiceProvisioningState? provisioningState = null, SearchServiceNetworkRuleSet networkRuleSet = null, IEnumerable disabledDataExfiltrationOptions = null, SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = null, SearchAadAuthDataPlaneAuthOptions authOptions = null, SearchSemanticSearch? semanticSearch = null, IEnumerable privateEndpointConnections = null, IEnumerable sharedPrivateLinkResources = null, ETag? eTag = null, bool? upgradeAvailable = null, DateTimeOffset? serviceUpgradeOn = null) { tags ??= new Dictionary(); disabledDataExfiltrationOptions ??= new List(); @@ -78,7 +134,9 @@ public static SearchServiceData SearchServiceData(ResourceIdentifier id = null, identity, replicaCount, partitionCount, + endpoint, hostingMode, + computeType, publicInternetAccess, status, statusDetails, @@ -92,6 +150,8 @@ public static SearchServiceData SearchServiceData(ResourceIdentifier id = null, privateEndpointConnections?.ToList(), sharedPrivateLinkResources?.ToList(), eTag, + upgradeAvailable, + serviceUpgradeOn, serializedAdditionalRawData: null); } @@ -151,7 +211,9 @@ public static SharedSearchServicePrivateLinkResourceData SharedSearchServicePriv /// Details about the search service identity. A null value indicates that the search service has no identity assigned. /// The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. + /// The endpoint of the Azure AI Search service. /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. + /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. 'stopped': The search service is in a subscription that's disabled. If your service is in the degraded, disabled, or error states, it means the Azure AI Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. /// The details of the search service status. @@ -165,8 +227,10 @@ public static SharedSearchServicePrivateLinkResourceData SharedSearchServicePriv /// 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. + /// Indicates whether or not the search service has an upgrade available. + /// The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. /// A new instance for mocking. - public static SearchServicePatch SearchServicePatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SearchServiceSkuName? searchSkuName = null, ManagedServiceIdentity identity = null, int? replicaCount = null, int? partitionCount = null, 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, Uri endpoint = null, SearchServiceHostingMode? hostingMode = null, ComputeType? computeType = null, SearchServicePublicInternetAccess? publicInternetAccess = null, SearchServiceStatus? status = null, string statusDetails = null, SearchServiceProvisioningState? provisioningState = null, SearchServiceNetworkRuleSet networkRuleSet = null, IEnumerable disabledDataExfiltrationOptions = null, SearchEncryptionWithCmk encryptionWithCmk = null, bool? isLocalAuthDisabled = null, SearchAadAuthDataPlaneAuthOptions authOptions = null, SearchSemanticSearch? semanticSearch = null, IEnumerable privateEndpointConnections = null, IEnumerable sharedPrivateLinkResources = null, ETag? eTag = null, bool? upgradeAvailable = null, DateTimeOffset? serviceUpgradeOn = null) { tags ??= new Dictionary(); disabledDataExfiltrationOptions ??= new List(); @@ -184,7 +248,9 @@ public static SearchServicePatch SearchServicePatch(ResourceIdentifier id = null identity, replicaCount, partitionCount, + endpoint, hostingMode, + computeType, publicInternetAccess, status, statusDetails, @@ -198,6 +264,8 @@ public static SearchServicePatch SearchServicePatch(ResourceIdentifier id = null privateEndpointConnections?.ToList(), sharedPrivateLinkResources?.ToList(), eTag, + upgradeAvailable, + serviceUpgradeOn, serializedAdditionalRawData: null); } 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..4d94d1a7a51d 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-02-01-preview /// /// /// Resource @@ -86,7 +86,7 @@ public virtual async Task> GetSearchServiceAsync /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource 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..cf985e713fee 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-02-01-preview /// /// /// Resource @@ -94,7 +94,7 @@ public virtual AsyncPageable GetSearchServicesAsync(Searc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -125,7 +125,7 @@ public virtual Pageable GetSearchServices(SearchManagemen /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -168,7 +168,7 @@ public virtual async Task> CheckSe /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual Response CheckSearchServiceN /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -239,7 +239,7 @@ public virtual AsyncPageable GetUsagesBySubscriptionAsync(Azur /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -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-02-01-preview /// /// /// @@ -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-02-01-preview /// /// /// diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchTenantResource.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchTenantResource.cs new file mode 100644 index 000000000000..b591f97324ee --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/MockableSearchTenantResource.cs @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Search.Models; + +namespace Azure.ResourceManager.Search.Mocking +{ + /// A class to add extension methods to TenantResource. + public partial class MockableSearchTenantResource : ArmResource + { + private ClientDiagnostics _offeringsClientDiagnostics; + private OfferingsRestOperations _offeringsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableSearchTenantResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableSearchTenantResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics OfferingsClientDiagnostics => _offeringsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Search", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private OfferingsRestOperations OfferingsRestClient => _offeringsRestClient ??= new OfferingsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Lists all of the features and SKUs offered by the Azure AI Search service in each region. + /// + /// + /// Request Path + /// /providers/Microsoft.Search/offerings + /// + /// + /// Operation Id + /// Offerings_List + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetOfferingsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => OfferingsRestClient.CreateListRequest(); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => OfferingsByRegion.DeserializeOfferingsByRegion(e), OfferingsClientDiagnostics, Pipeline, "MockableSearchTenantResource.GetOfferings", "value", null, cancellationToken); + } + + /// + /// Lists all of the features and SKUs offered by the Azure AI Search service in each region. + /// + /// + /// Request Path + /// /providers/Microsoft.Search/offerings + /// + /// + /// Operation Id + /// Offerings_List + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetOfferings(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => OfferingsRestClient.CreateListRequest(); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => OfferingsByRegion.DeserializeOfferingsByRegion(e), OfferingsClientDiagnostics, Pipeline, "MockableSearchTenantResource.GetOfferings", "value", null, cancellationToken); + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs index 7f5237e60a82..a8c295b2c1e1 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Extensions/SearchExtensions.cs @@ -33,6 +33,11 @@ private static MockableSearchSubscriptionResource GetMockableSearchSubscriptionR return resource.GetCachedClient(client => new MockableSearchSubscriptionResource(client, resource.Id)); } + private static MockableSearchTenantResource GetMockableSearchTenantResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSearchTenantResource(client, resource.Id)); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -139,7 +144,7 @@ public static SearchServiceCollection GetSearchServices(this ResourceGroupResour /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -178,7 +183,7 @@ public static async Task> GetSearchServiceAsync( /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -217,7 +222,7 @@ public static Response GetSearchService(this ResourceGrou /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -254,7 +259,7 @@ public static AsyncPageable GetSearchServicesAsync(this S /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -291,7 +296,7 @@ public static Pageable GetSearchServices(this Subscriptio /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -328,7 +333,7 @@ public static async Task> CheckSea /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -365,7 +370,7 @@ public static Response CheckSearchServiceNa /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -399,7 +404,7 @@ public static AsyncPageable GetUsagesBySubscriptionAsync(this /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -421,7 +426,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 +438,7 @@ public static Pageable GetUsagesBySubscription(this Subscripti /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -456,7 +461,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 +473,7 @@ public static async Task> UsageBySubscriptionSkuAsync /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -489,5 +494,69 @@ public static Response UsageBySubscriptionSku(this Subscriptio return GetMockableSearchSubscriptionResource(subscriptionResource).UsageBySubscriptionSku(location, skuName, searchManagementRequestOptions, cancellationToken); } + + /// + /// Lists all of the features and SKUs offered by the Azure AI Search service in each region. + /// + /// + /// Request Path + /// /providers/Microsoft.Search/offerings + /// + /// + /// Operation Id + /// Offerings_List + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetOfferingsAsync(this TenantResource tenantResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return GetMockableSearchTenantResource(tenantResource).GetOfferingsAsync(cancellationToken); + } + + /// + /// Lists all of the features and SKUs offered by the Azure AI Search service in each region. + /// + /// + /// Request Path + /// /providers/Microsoft.Search/offerings + /// + /// + /// Operation Id + /// Offerings_List + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetOfferings(this TenantResource tenantResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return GetMockableSearchTenantResource(tenantResource).GetOfferings(cancellationToken); + } } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ComputeType.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ComputeType.cs new file mode 100644 index 000000000000..ab3ee3398ad5 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/ComputeType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Search.Models +{ + /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. + public readonly partial struct ComputeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ComputeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DefaultValue = "default"; + private const string ConfidentialValue = "confidential"; + + /// Create the service with the default compute. + public static ComputeType Default { get; } = new ComputeType(DefaultValue); + /// Create the service with Azure Confidential Compute. + public static ComputeType Confidential { get; } = new ComputeType(ConfidentialValue); + /// Determines if two values are the same. + public static bool operator ==(ComputeType left, ComputeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ComputeType left, ComputeType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ComputeType(string value) => new ComputeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ComputeType other && Equals(other); + /// + public bool Equals(ComputeType 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/FeatureName.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/FeatureName.cs new file mode 100644 index 000000000000..dc46bc200314 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/FeatureName.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Search.Models +{ + /// The name of the feature offered in this region. + public readonly partial struct FeatureName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FeatureName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GrokValue = "Grok"; + private const string ImageVectorizationValue = "ImageVectorization"; + private const string DocumentIntelligenceValue = "DocumentIntelligence"; + private const string QueryRewriteValue = "QueryRewrite"; + private const string S3Value = "S3"; + private const string StorageOptimizedValue = "StorageOptimized"; + private const string SemanticSearchValue = "SemanticSearch"; + private const string MegaStoreValue = "MegaStore"; + private const string AvailabilityZonesValue = "AvailabilityZones"; + + /// Supports Grok feature. + public static FeatureName Grok { get; } = new FeatureName(GrokValue); + /// Supports Image Vectorization feature. + public static FeatureName ImageVectorization { get; } = new FeatureName(ImageVectorizationValue); + /// Supports Document Intelligence feature. + public static FeatureName DocumentIntelligence { get; } = new FeatureName(DocumentIntelligenceValue); + /// Supports Query Rewrite feature. + public static FeatureName QueryRewrite { get; } = new FeatureName(QueryRewriteValue); + /// Supports S3 feature. + public static FeatureName S3 { get; } = new FeatureName(S3Value); + /// Supports Storage Optimized feature. + public static FeatureName StorageOptimized { get; } = new FeatureName(StorageOptimizedValue); + /// Supports Semantic Search feature. + public static FeatureName SemanticSearch { get; } = new FeatureName(SemanticSearchValue); + /// Supports Mega Store feature. + public static FeatureName MegaStore { get; } = new FeatureName(MegaStoreValue); + /// Supports Availability Zones feature. + public static FeatureName AvailabilityZones { get; } = new FeatureName(AvailabilityZonesValue); + /// Determines if two values are the same. + public static bool operator ==(FeatureName left, FeatureName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FeatureName left, FeatureName right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FeatureName(string value) => new FeatureName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FeatureName other && Equals(other); + /// + public bool Equals(FeatureName 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/FeatureOffering.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/FeatureOffering.Serialization.cs new file mode 100644 index 000000000000..2027bfe9150e --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/FeatureOffering.Serialization.cs @@ -0,0 +1,166 @@ +// 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 FeatureOffering : 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(FeatureOffering)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + FeatureOffering 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(FeatureOffering)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFeatureOffering(document.RootElement, options); + } + + internal static FeatureOffering DeserializeFeatureOffering(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FeatureName? name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new FeatureName(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FeatureOffering(name, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + builder.AppendLine($"'{Name.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FeatureOffering)} does not support writing '{options.Format}' format."); + } + } + + FeatureOffering 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 DeserializeFeatureOffering(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FeatureOffering)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/FeatureOffering.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/FeatureOffering.cs new file mode 100644 index 000000000000..9ee398d18231 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/FeatureOffering.cs @@ -0,0 +1,66 @@ +// 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 FeatureOffering. + public partial class FeatureOffering + { + /// + /// 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 FeatureOffering() + { + } + + /// Initializes a new instance of . + /// The name of the feature offered in this region. + /// Keeps track of any properties unknown to the library. + internal FeatureOffering(FeatureName? name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the feature offered in this region. + [WirePath("name")] + public FeatureName? Name { get; } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsByRegion.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsByRegion.Serialization.cs new file mode 100644 index 000000000000..a6f1f17bdd18 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsByRegion.Serialization.cs @@ -0,0 +1,267 @@ +// 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 OfferingsByRegion : 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(OfferingsByRegion)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RegionName)) + { + writer.WritePropertyName("regionName"u8); + writer.WriteStringValue(RegionName); + } + if (Optional.IsCollectionDefined(Features)) + { + writer.WritePropertyName("features"u8); + writer.WriteStartArray(); + foreach (var item in Features) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Skus)) + { + writer.WritePropertyName("skus"u8); + writer.WriteStartArray(); + foreach (var item in Skus) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OfferingsByRegion 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(OfferingsByRegion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOfferingsByRegion(document.RootElement, options); + } + + internal static OfferingsByRegion DeserializeOfferingsByRegion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string regionName = default; + IReadOnlyList features = default; + IReadOnlyList skus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("regionName"u8)) + { + regionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("features"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(FeatureOffering.DeserializeFeatureOffering(item, options)); + } + features = array; + continue; + } + if (property.NameEquals("skus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SkuOffering.DeserializeSkuOffering(item, options)); + } + skus = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OfferingsByRegion(regionName, features ?? new ChangeTrackingList(), skus ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RegionName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" regionName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RegionName)) + { + builder.Append(" regionName: "); + if (RegionName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{RegionName}'''"); + } + else + { + builder.AppendLine($"'{RegionName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Features), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" features: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Features)) + { + if (Features.Any()) + { + builder.Append(" features: "); + builder.AppendLine("["); + foreach (var item in Features) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " features: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Skus), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" skus: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Skus)) + { + if (Skus.Any()) + { + builder.Append(" skus: "); + builder.AppendLine("["); + foreach (var item in Skus) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " skus: "); + } + builder.AppendLine(" ]"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(OfferingsByRegion)} does not support writing '{options.Format}' format."); + } + } + + OfferingsByRegion 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 DeserializeOfferingsByRegion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OfferingsByRegion)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsByRegion.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsByRegion.cs new file mode 100644 index 000000000000..ffbbfa2446cb --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsByRegion.cs @@ -0,0 +1,78 @@ +// 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 OfferingsByRegion. + public partial class OfferingsByRegion + { + /// + /// 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 OfferingsByRegion() + { + Features = new ChangeTrackingList(); + Skus = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The name of the region. + /// The list of features offered in this region. + /// The list of SKUs offered in this region. + /// Keeps track of any properties unknown to the library. + internal OfferingsByRegion(string regionName, IReadOnlyList features, IReadOnlyList skus, IDictionary serializedAdditionalRawData) + { + RegionName = regionName; + Features = features; + Skus = skus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the region. + [WirePath("regionName")] + public string RegionName { get; } + /// The list of features offered in this region. + [WirePath("features")] + public IReadOnlyList Features { get; } + /// The list of SKUs offered in this region. + [WirePath("skus")] + public IReadOnlyList Skus { get; } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsListResult.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsListResult.Serialization.cs new file mode 100644 index 000000000000..90ac16cea708 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsListResult.Serialization.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Search.Models +{ + internal partial class OfferingsListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OfferingsListResult)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + OfferingsListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OfferingsListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOfferingsListResult(document.RootElement, options); + } + + internal static OfferingsListResult DeserializeOfferingsListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OfferingsByRegion.DeserializeOfferingsByRegion(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OfferingsListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" value: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Value)) + { + if (Value.Any()) + { + builder.Append(" value: "); + builder.AppendLine("["); + foreach (var item in Value) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " value: "); + } + builder.AppendLine(" ]"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + if (NextLink.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{NextLink}'''"); + } + else + { + builder.AppendLine($"'{NextLink}'"); + } + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(OfferingsListResult)} does not support writing '{options.Format}' format."); + } + } + + OfferingsListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeOfferingsListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OfferingsListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsListResult.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsListResult.cs new file mode 100644 index 000000000000..826f959babe8 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/OfferingsListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Search.Models +{ + /// The response containing a list of features and SKUs offered in various regions. + internal partial class OfferingsListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal OfferingsListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of regions with their respective features and SKUs offered. + /// The URL to get the next set of offerings, if any. + /// Keeps track of any properties unknown to the library. + internal OfferingsListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of regions with their respective features and SKUs offered. + public IReadOnlyList Value { get; } + /// The URL to get the next set of offerings, if any. + public string NextLink { get; } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.Serialization.cs index bdab89059ad3..d32aa3556e37 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.Serialization.cs @@ -60,11 +60,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("partitionCount"u8); writer.WriteNumberValue(PartitionCount.Value); } + if (Optional.IsDefined(Endpoint)) + { + writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint.AbsoluteUri); + } if (Optional.IsDefined(HostingMode)) { writer.WritePropertyName("hostingMode"u8); writer.WriteStringValue(HostingMode.Value.ToSerialString()); } + if (Optional.IsDefined(ComputeType)) + { + writer.WritePropertyName("computeType"u8); + writer.WriteStringValue(ComputeType.Value.ToString()); + } if (Optional.IsDefined(PublicInternetAccess)) { writer.WritePropertyName("publicNetworkAccess"u8); @@ -159,6 +169,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(UpgradeAvailable)) + { + writer.WritePropertyName("upgradeAvailable"u8); + writer.WriteBooleanValue(UpgradeAvailable.Value); + } + if (options.Format != "W" && Optional.IsDefined(ServiceUpgradeOn)) + { + writer.WritePropertyName("serviceUpgradeDate"u8); + writer.WriteStringValue(ServiceUpgradeOn.Value, "O"); + } writer.WriteEndObject(); } @@ -192,7 +212,9 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele SystemData systemData = default; int? replicaCount = default; int? partitionCount = default; + Uri endpoint = default; SearchServiceHostingMode? hostingMode = default; + ComputeType? computeType = default; SearchServicePublicInternetAccess? publicNetworkAccess = default; SearchServiceStatus? status = default; string statusDetails = default; @@ -206,6 +228,8 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele IReadOnlyList privateEndpointConnections = default; IReadOnlyList sharedPrivateLinkResources = default; ETag? eTag = default; + bool? upgradeAvailable = default; + DateTimeOffset? serviceUpgradeDate = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -298,6 +322,15 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele partitionCount = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("endpoint"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpoint = new Uri(property0.Value.GetString()); + continue; + } if (property0.NameEquals("hostingMode"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -307,6 +340,15 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele hostingMode = property0.Value.GetString().ToSearchServiceHostingMode(); continue; } + if (property0.NameEquals("computeType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeType = new ComputeType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("publicNetworkAccess"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -437,6 +479,24 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele eTag = new ETag(property0.Value.GetString()); continue; } + if (property0.NameEquals("upgradeAvailable"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradeAvailable = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("serviceUpgradeDate"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceUpgradeDate = property0.Value.GetDateTimeOffset("O"); + continue; + } } continue; } @@ -457,7 +517,9 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele identity, replicaCount, partitionCount, + endpoint, hostingMode, + computeType, publicNetworkAccess, status, statusDetails, @@ -471,6 +533,8 @@ internal static SearchServicePatch DeserializeSearchServicePatch(JsonElement ele privateEndpointConnections ?? new ChangeTrackingList(), sharedPrivateLinkResources ?? new ChangeTrackingList(), eTag, + upgradeAvailable, + serviceUpgradeDate, serializedAdditionalRawData); } @@ -652,6 +716,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Endpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Endpoint)) + { + builder.Append(" endpoint: "); + builder.AppendLine($"'{Endpoint.AbsoluteUri}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HostingMode), out propertyOverride); if (hasPropertyOverride) { @@ -667,6 +746,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComputeType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" computeType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ComputeType)) + { + builder.Append(" computeType: "); + builder.AppendLine($"'{ComputeType.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicInternetAccess), out propertyOverride); if (hasPropertyOverride) { @@ -895,6 +989,38 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradeAvailable), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradeAvailable: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradeAvailable)) + { + builder.Append(" upgradeAvailable: "); + var boolValue = UpgradeAvailable.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceUpgradeOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceUpgradeDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceUpgradeOn)) + { + builder.Append(" serviceUpgradeDate: "); + var formattedDateTimeString = TypeFormatters.ToString(ServiceUpgradeOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + 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..a846587400ef 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SearchServicePatch.cs @@ -67,7 +67,9 @@ public SearchServicePatch(AzureLocation location) : base(location) /// Details about the search service identity. A null value indicates that the search service has no identity assigned. /// The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. + /// The endpoint of the Azure AI Search service. /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. + /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. 'stopped': The search service is in a subscription that's disabled. If your service is in the degraded, disabled, or error states, it means the Azure AI Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. /// The details of the search service status. @@ -81,14 +83,18 @@ public SearchServicePatch(AzureLocation location) : base(location) /// 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. + /// Indicates whether or not the search service has an upgrade available. + /// The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. /// Keeps track of any properties unknown to the library. - internal SearchServicePatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SearchSku searchSku, ManagedServiceIdentity identity, int? replicaCount, int? partitionCount, 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, Uri endpoint, SearchServiceHostingMode? hostingMode, ComputeType? computeType, SearchServicePublicInternetAccess? publicInternetAccess, SearchServiceStatus? status, string statusDetails, SearchServiceProvisioningState? provisioningState, SearchServiceNetworkRuleSet networkRuleSet, IList disabledDataExfiltrationOptions, SearchEncryptionWithCmk encryptionWithCmk, bool? isLocalAuthDisabled, SearchAadAuthDataPlaneAuthOptions authOptions, SearchSemanticSearch? semanticSearch, IReadOnlyList privateEndpointConnections, IReadOnlyList sharedPrivateLinkResources, ETag? eTag, bool? upgradeAvailable, DateTimeOffset? serviceUpgradeOn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { SearchSku = searchSku; Identity = identity; ReplicaCount = replicaCount; PartitionCount = partitionCount; + Endpoint = endpoint; HostingMode = hostingMode; + ComputeType = computeType; PublicInternetAccess = publicInternetAccess; Status = status; StatusDetails = statusDetails; @@ -102,6 +108,8 @@ internal SearchServicePatch(ResourceIdentifier id, string name, ResourceType res PrivateEndpointConnections = privateEndpointConnections; SharedPrivateLinkResources = sharedPrivateLinkResources; ETag = eTag; + UpgradeAvailable = upgradeAvailable; + ServiceUpgradeOn = serviceUpgradeOn; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -134,9 +142,15 @@ public SearchServiceSkuName? SearchSkuName /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. [WirePath("properties.partitionCount")] public int? PartitionCount { get; set; } + /// The endpoint of the Azure AI Search service. + [WirePath("properties.endpoint")] + public Uri Endpoint { get; set; } /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. [WirePath("properties.hostingMode")] public SearchServiceHostingMode? HostingMode { get; set; } + /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. + [WirePath("properties.computeType")] + public ComputeType? ComputeType { get; set; } /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. [WirePath("properties.publicNetworkAccess")] public SearchServicePublicInternetAccess? PublicInternetAccess { get; set; } @@ -176,5 +190,11 @@ public SearchServiceSkuName? SearchSkuName /// A system generated property representing the service's etag that can be for optimistic concurrency control during updates. [WirePath("properties.eTag")] public ETag? ETag { get; } + /// Indicates whether or not the search service has an upgrade available. + [WirePath("properties.upgradeAvailable")] + public bool? UpgradeAvailable { get; } + /// The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. + [WirePath("properties.serviceUpgradeDate")] + public DateTimeOffset? ServiceUpgradeOn { get; } } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SkuOffering.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SkuOffering.Serialization.cs new file mode 100644 index 000000000000..014b4e0ddad7 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SkuOffering.Serialization.cs @@ -0,0 +1,199 @@ +// 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 SkuOffering : 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(SkuOffering)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (Optional.IsDefined(Limits)) + { + writer.WritePropertyName("limits"u8); + writer.WriteObjectValue(Limits, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SkuOffering 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(SkuOffering)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSkuOffering(document.RootElement, options); + } + + internal static SkuOffering DeserializeSkuOffering(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SearchSku sku = default; + SkuOfferingLimits limits = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = SearchSku.DeserializeSearchSku(property.Value, options); + continue; + } + if (property.NameEquals("limits"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + limits = SkuOfferingLimits.DeserializeSkuOfferingLimits(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SkuOffering(sku, limits, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SkuName", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine("{"); + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Limits), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" limits: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Limits)) + { + builder.Append(" limits: "); + BicepSerializationHelpers.AppendChildObject(builder, Limits, options, 2, false, " limits: "); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SkuOffering)} does not support writing '{options.Format}' format."); + } + } + + SkuOffering 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 DeserializeSkuOffering(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SkuOffering)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SkuOffering.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SkuOffering.cs new file mode 100644 index 000000000000..5d44c07025bd --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SkuOffering.cs @@ -0,0 +1,77 @@ +// 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 SkuOffering. + public partial class SkuOffering + { + /// + /// 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 SkuOffering() + { + } + + /// Initializes a new instance of . + /// Defines the SKU of a search service, which determines billing rate and capacity limits. + /// The limits associated with this SKU offered in this region. + /// Keeps track of any properties unknown to the library. + internal SkuOffering(SearchSku sku, SkuOfferingLimits limits, IDictionary serializedAdditionalRawData) + { + Sku = sku; + Limits = limits; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Defines the SKU of a search service, which determines billing rate and capacity limits. + internal SearchSku Sku { get; } + /// The SKU of the search service. Valid values include: 'free': Shared service. 'basic': Dedicated service with up to 3 replicas. 'standard': Dedicated service with up to 12 partitions and 12 replicas. 'standard2': Similar to standard, but with more capacity per search unit. 'standard3': The largest Standard offering with up to 12 partitions and 12 replicas (or up to 3 partitions with more indexes if you also set the hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports 2TB per partition, up to 12 partitions.'. + [WirePath("sku.name")] + public SearchServiceSkuName? SkuName + { + get => Sku?.Name; + } + + /// The limits associated with this SKU offered in this region. + [WirePath("limits")] + public SkuOfferingLimits Limits { get; } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SkuOfferingLimits.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SkuOfferingLimits.Serialization.cs new file mode 100644 index 000000000000..870726032066 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SkuOfferingLimits.Serialization.cs @@ -0,0 +1,354 @@ +// 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 SkuOfferingLimits : 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(SkuOfferingLimits)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Indexes)) + { + writer.WritePropertyName("indexes"u8); + writer.WriteNumberValue(Indexes.Value); + } + if (Optional.IsDefined(Indexers)) + { + writer.WritePropertyName("indexers"u8); + writer.WriteNumberValue(Indexers.Value); + } + if (Optional.IsDefined(PartitionStorageInGigabytes)) + { + writer.WritePropertyName("partitionStorageInGigabytes"u8); + writer.WriteNumberValue(PartitionStorageInGigabytes.Value); + } + if (Optional.IsDefined(PartitionVectorStorageInGigabytes)) + { + writer.WritePropertyName("partitionVectorStorageInGigabytes"u8); + writer.WriteNumberValue(PartitionVectorStorageInGigabytes.Value); + } + if (Optional.IsDefined(SearchUnits)) + { + writer.WritePropertyName("searchUnits"u8); + writer.WriteNumberValue(SearchUnits.Value); + } + if (Optional.IsDefined(Replicas)) + { + writer.WritePropertyName("replicas"u8); + writer.WriteNumberValue(Replicas.Value); + } + if (Optional.IsDefined(Partitions)) + { + writer.WritePropertyName("partitions"u8); + writer.WriteNumberValue(Partitions.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SkuOfferingLimits 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(SkuOfferingLimits)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSkuOfferingLimits(document.RootElement, options); + } + + internal static SkuOfferingLimits DeserializeSkuOfferingLimits(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? indexes = default; + int? indexers = default; + float? partitionStorageInGigabytes = default; + float? partitionVectorStorageInGigabytes = default; + int? searchUnits = default; + int? replicas = default; + int? partitions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("indexes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + indexes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("indexers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + indexers = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("partitionStorageInGigabytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partitionStorageInGigabytes = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("partitionVectorStorageInGigabytes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partitionVectorStorageInGigabytes = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("searchUnits"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + searchUnits = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("replicas"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + replicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("partitions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partitions = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SkuOfferingLimits( + indexes, + indexers, + partitionStorageInGigabytes, + partitionVectorStorageInGigabytes, + searchUnits, + replicas, + partitions, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Indexes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" indexes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Indexes)) + { + builder.Append(" indexes: "); + builder.AppendLine($"{Indexes.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Indexers), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" indexers: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Indexers)) + { + builder.Append(" indexers: "); + builder.AppendLine($"{Indexers.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartitionStorageInGigabytes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" partitionStorageInGigabytes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PartitionStorageInGigabytes)) + { + builder.Append(" partitionStorageInGigabytes: "); + builder.AppendLine($"'{PartitionStorageInGigabytes.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PartitionVectorStorageInGigabytes), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" partitionVectorStorageInGigabytes: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PartitionVectorStorageInGigabytes)) + { + builder.Append(" partitionVectorStorageInGigabytes: "); + builder.AppendLine($"'{PartitionVectorStorageInGigabytes.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SearchUnits), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" searchUnits: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SearchUnits)) + { + builder.Append(" searchUnits: "); + builder.AppendLine($"{SearchUnits.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Replicas), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" replicas: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Replicas)) + { + builder.Append(" replicas: "); + builder.AppendLine($"{Replicas.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Partitions), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" partitions: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Partitions)) + { + builder.Append(" partitions: "); + builder.AppendLine($"{Partitions.Value}"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SkuOfferingLimits)} does not support writing '{options.Format}' format."); + } + } + + SkuOfferingLimits 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 DeserializeSkuOfferingLimits(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SkuOfferingLimits)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SkuOfferingLimits.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SkuOfferingLimits.cs new file mode 100644 index 000000000000..ebab2e2f05c8 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/Models/SkuOfferingLimits.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Search.Models +{ + /// The limits associated with this SKU offered in this region. + public partial class SkuOfferingLimits + { + /// + /// 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 SkuOfferingLimits() + { + } + + /// Initializes a new instance of . + /// The maximum number of indexes available for this SKU. + /// The maximum number of indexers available for this SKU. + /// The maximum storage size in Gigabytes available for this SKU per partition. + /// The maximum vector storage size in Gigabytes available for this SKU per partition. + /// The maximum number of search units available for this SKU. + /// The maximum number of replicas available for this SKU. + /// The maximum number of partitions available for this SKU. + /// Keeps track of any properties unknown to the library. + internal SkuOfferingLimits(int? indexes, int? indexers, float? partitionStorageInGigabytes, float? partitionVectorStorageInGigabytes, int? searchUnits, int? replicas, int? partitions, IDictionary serializedAdditionalRawData) + { + Indexes = indexes; + Indexers = indexers; + PartitionStorageInGigabytes = partitionStorageInGigabytes; + PartitionVectorStorageInGigabytes = partitionVectorStorageInGigabytes; + SearchUnits = searchUnits; + Replicas = replicas; + Partitions = partitions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The maximum number of indexes available for this SKU. + [WirePath("indexes")] + public int? Indexes { get; } + /// The maximum number of indexers available for this SKU. + [WirePath("indexers")] + public int? Indexers { get; } + /// The maximum storage size in Gigabytes available for this SKU per partition. + [WirePath("partitionStorageInGigabytes")] + public float? PartitionStorageInGigabytes { get; } + /// The maximum vector storage size in Gigabytes available for this SKU per partition. + [WirePath("partitionVectorStorageInGigabytes")] + public float? PartitionVectorStorageInGigabytes { get; } + /// The maximum number of search units available for this SKU. + [WirePath("searchUnits")] + public int? SearchUnits { get; } + /// The maximum number of replicas available for this SKU. + [WirePath("replicas")] + public int? Replicas { get; } + /// The maximum number of partitions available for this SKU. + [WirePath("partitions")] + public int? Partitions { get; } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs index 8a93d2af2c41..0d683769bcb3 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(strin /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetA /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Ca /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string nspConfigName, Canc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string nspConfigName, CancellationToken can /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs index c31e2cd7febd..1b03582779ad 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cance /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task ReconcileAsync(WaitUntil waitUntil, Canc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource 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..0bdf2d7342e4 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-02-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs index 6cddfa59e4f0..861f9c6394b1 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityPerimeterConfigurationsRestOperations(HttpPipeline pipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-06-01-preview"; + _apiVersion = apiVersion ?? "2025-02-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/OfferingsRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/OfferingsRestOperations.cs new file mode 100644 index 000000000000..0bceb5932f76 --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/OfferingsRestOperations.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Search.Models; + +namespace Azure.ResourceManager.Search +{ + internal partial class OfferingsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OfferingsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public OfferingsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-02-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri() + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Search/offerings", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Search/offerings", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all of the features and SKUs offered by the Azure AI Search service in each region. + /// The cancellation token to use. + public async Task> ListAsync(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OfferingsListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = OfferingsListResult.DeserializeOfferingsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all of the features and SKUs offered by the Azure AI Search service in each region. + /// The cancellation token to use. + public Response List(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OfferingsListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = OfferingsListResult.DeserializeOfferingsListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index dfacf5e79a64..04644479a928 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-02-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } 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..919f706c3e73 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-02-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } 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..9f642e217d04 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-02-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } 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..533d89b2383c 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-02-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -70,7 +70,7 @@ internal HttpMessage CreateUsageBySubscriptionSkuRequest(string subscriptionId, return message; } - /// Gets the quota usage for a search sku in the given subscription. + /// Gets the quota usage for a search SKU in the given subscription. /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// The unique location name for a Microsoft Azure geographic region. /// The unique SKU name that identifies a billable tier. @@ -99,7 +99,7 @@ public async Task> UsageBySubscriptionSkuAsync(string } } - /// Gets the quota usage for a search sku in the given subscription. + /// Gets the quota usage for a search SKU in the given subscription. /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. /// The unique location name for a Microsoft Azure geographic region. /// The unique SKU name that identifies a billable tier. diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServiceRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServiceRestOperations.cs new file mode 100644 index 000000000000..ff8597fb676c --- /dev/null +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServiceRestOperations.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.Search +{ + internal partial class ServiceRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ServiceRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ServiceRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-02-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateUpgradeRequestUri(string subscriptionId, string resourceGroupName, string searchServiceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Search/searchServices/", false); + uri.AppendPath(searchServiceName, true); + uri.AppendPath("/upgrade", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpgradeRequest(string subscriptionId, string resourceGroupName, string searchServiceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Search/searchServices/", false); + uri.AppendPath(searchServiceName, true); + uri.AppendPath("/upgrade", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Upgrades the Azure AI Search service to the latest version available. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Azure AI Search service associated with the specified resource group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpgradeAsync(string subscriptionId, string resourceGroupName, string searchServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, searchServiceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Upgrades the Azure AI Search service to the latest version available. + /// The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the Azure AI Search service associated with the specified resource group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Upgrade(string subscriptionId, string resourceGroupName, string searchServiceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(searchServiceName, nameof(searchServiceName)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, searchServiceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServicesRestOperations.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/RestOperations/ServicesRestOperations.cs index 82acdc17d3a0..1b582d0f7be8 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-02-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } 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..67b5e4aef420 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-02-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } 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..97ca02542d61 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-02-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionCollection.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionCollection.cs index 81c1e21df4bb..a7ba13c7d54d 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionCollection.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -261,7 +261,7 @@ public virtual Response Get(string priv /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Pageable GetAll(SearchMa /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Searc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -457,7 +457,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionResource.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionResource.cs index 7445dfd703e4..9f81d38faf39 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-02-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(SearchManag /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(Wait /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -323,7 +323,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// 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..76e1ecf46853 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-02-01-preview /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string searc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string searchServiceName, Sea /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(SearchManagement /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(SearchManagementRequestOpt /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string searchServiceName, /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string searchServiceName, SearchManagementR /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource 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..4b2b86585235 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.Serialization.cs @@ -61,11 +61,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("partitionCount"u8); writer.WriteNumberValue(PartitionCount.Value); } + if (Optional.IsDefined(Endpoint)) + { + writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint.AbsoluteUri); + } if (Optional.IsDefined(HostingMode)) { writer.WritePropertyName("hostingMode"u8); writer.WriteStringValue(HostingMode.Value.ToSerialString()); } + if (Optional.IsDefined(ComputeType)) + { + writer.WritePropertyName("computeType"u8); + writer.WriteStringValue(ComputeType.Value.ToString()); + } if (Optional.IsDefined(PublicInternetAccess)) { writer.WritePropertyName("publicNetworkAccess"u8); @@ -160,6 +170,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("eTag"u8); writer.WriteStringValue(ETag.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(UpgradeAvailable)) + { + writer.WritePropertyName("upgradeAvailable"u8); + writer.WriteBooleanValue(UpgradeAvailable.Value); + } + if (options.Format != "W" && Optional.IsDefined(ServiceUpgradeOn)) + { + writer.WritePropertyName("serviceUpgradeDate"u8); + writer.WriteStringValue(ServiceUpgradeOn.Value, "O"); + } writer.WriteEndObject(); } @@ -193,7 +213,9 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme SystemData systemData = default; int? replicaCount = default; int? partitionCount = default; + Uri endpoint = default; SearchServiceHostingMode? hostingMode = default; + ComputeType? computeType = default; SearchServicePublicInternetAccess? publicNetworkAccess = default; SearchServiceStatus? status = default; string statusDetails = default; @@ -207,6 +229,8 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme IReadOnlyList privateEndpointConnections = default; IReadOnlyList sharedPrivateLinkResources = default; ETag? eTag = default; + bool? upgradeAvailable = default; + DateTimeOffset? serviceUpgradeDate = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -299,6 +323,15 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme partitionCount = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("endpoint"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endpoint = new Uri(property0.Value.GetString()); + continue; + } if (property0.NameEquals("hostingMode"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -308,6 +341,15 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme hostingMode = property0.Value.GetString().ToSearchServiceHostingMode(); continue; } + if (property0.NameEquals("computeType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeType = new ComputeType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("publicNetworkAccess"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -438,6 +480,24 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme eTag = new ETag(property0.Value.GetString()); continue; } + if (property0.NameEquals("upgradeAvailable"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgradeAvailable = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("serviceUpgradeDate"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceUpgradeDate = property0.Value.GetDateTimeOffset("O"); + continue; + } } continue; } @@ -458,7 +518,9 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme identity, replicaCount, partitionCount, + endpoint, hostingMode, + computeType, publicNetworkAccess, status, statusDetails, @@ -472,6 +534,8 @@ internal static SearchServiceData DeserializeSearchServiceData(JsonElement eleme privateEndpointConnections ?? new ChangeTrackingList(), sharedPrivateLinkResources ?? new ChangeTrackingList(), eTag, + upgradeAvailable, + serviceUpgradeDate, serializedAdditionalRawData); } @@ -653,6 +717,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Endpoint), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" endpoint: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Endpoint)) + { + builder.Append(" endpoint: "); + builder.AppendLine($"'{Endpoint.AbsoluteUri}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HostingMode), out propertyOverride); if (hasPropertyOverride) { @@ -668,6 +747,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComputeType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" computeType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ComputeType)) + { + builder.Append(" computeType: "); + builder.AppendLine($"'{ComputeType.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PublicInternetAccess), out propertyOverride); if (hasPropertyOverride) { @@ -896,6 +990,38 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradeAvailable), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" upgradeAvailable: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(UpgradeAvailable)) + { + builder.Append(" upgradeAvailable: "); + var boolValue = UpgradeAvailable.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ServiceUpgradeOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" serviceUpgradeDate: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ServiceUpgradeOn)) + { + builder.Append(" serviceUpgradeDate: "); + var formattedDateTimeString = TypeFormatters.ToString(ServiceUpgradeOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + 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..3b559fcd67a5 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceData.cs @@ -71,7 +71,9 @@ public SearchServiceData(AzureLocation location) : base(location) /// The identity of the resource. /// The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. + /// The endpoint of the Azure AI Search service. /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. + /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. /// The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search service is being provisioned or scaled up or down. 'deleting': The search service is being deleted. 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error state. 'stopped': The search service is in a subscription that's disabled. If your service is in the degraded, disabled, or error states, it means the Azure AI Search team is actively investigating the underlying issue. Dedicated services in these states are still chargeable based on the number of search units provisioned. /// The details of the search service status. @@ -85,14 +87,18 @@ public SearchServiceData(AzureLocation location) : base(location) /// 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. + /// Indicates whether or not the search service has an upgrade available. + /// The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. /// Keeps track of any properties unknown to the library. - internal SearchServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SearchSku searchSku, ManagedServiceIdentity identity, int? replicaCount, int? partitionCount, 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, Uri endpoint, SearchServiceHostingMode? hostingMode, ComputeType? computeType, SearchServicePublicInternetAccess? publicInternetAccess, SearchServiceStatus? status, string statusDetails, SearchServiceProvisioningState? provisioningState, SearchServiceNetworkRuleSet networkRuleSet, IList disabledDataExfiltrationOptions, SearchEncryptionWithCmk encryptionWithCmk, bool? isLocalAuthDisabled, SearchAadAuthDataPlaneAuthOptions authOptions, SearchSemanticSearch? semanticSearch, IReadOnlyList privateEndpointConnections, IReadOnlyList sharedPrivateLinkResources, ETag? eTag, bool? upgradeAvailable, DateTimeOffset? serviceUpgradeOn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { SearchSku = searchSku; Identity = identity; ReplicaCount = replicaCount; PartitionCount = partitionCount; + Endpoint = endpoint; HostingMode = hostingMode; + ComputeType = computeType; PublicInternetAccess = publicInternetAccess; Status = status; StatusDetails = statusDetails; @@ -106,6 +112,8 @@ internal SearchServiceData(ResourceIdentifier id, string name, ResourceType reso PrivateEndpointConnections = privateEndpointConnections; SharedPrivateLinkResources = sharedPrivateLinkResources; ETag = eTag; + UpgradeAvailable = upgradeAvailable; + ServiceUpgradeOn = serviceUpgradeOn; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -138,9 +146,15 @@ public SearchServiceSkuName? SearchSkuName /// The number of partitions in the search service; if specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only valid for standard SKUs. For 'standard3' services with hostingMode set to 'highDensity', the allowed values are between 1 and 3. [WirePath("properties.partitionCount")] public int? PartitionCount { get; set; } + /// The endpoint of the Azure AI Search service. + [WirePath("properties.endpoint")] + public Uri Endpoint { get; set; } /// Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed for any other SKU. For the standard3 SKU, the value is either 'default' or 'highDensity'. For all other SKUs, this value must be 'default'. [WirePath("properties.hostingMode")] public SearchServiceHostingMode? HostingMode { get; set; } + /// Configure this property to support the search service using either the default compute or Azure Confidential Compute. + [WirePath("properties.computeType")] + public ComputeType? ComputeType { get; set; } /// This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. [WirePath("properties.publicNetworkAccess")] public SearchServicePublicInternetAccess? PublicInternetAccess { get; set; } @@ -180,5 +194,11 @@ public SearchServiceSkuName? SearchSkuName /// A system generated property representing the service's etag that can be for optimistic concurrency control during updates. [WirePath("properties.eTag")] public ETag? ETag { get; } + /// Indicates whether or not the search service has an upgrade available. + [WirePath("properties.upgradeAvailable")] + public bool? UpgradeAvailable { get; } + /// The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. + [WirePath("properties.serviceUpgradeDate")] + public DateTimeOffset? ServiceUpgradeOn { 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..85e8683dbfc5 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.cs @@ -44,6 +44,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly QueryKeysRestOperations _queryKeysRestClient; private readonly ClientDiagnostics _privateLinkResourcesClientDiagnostics; private readonly PrivateLinkResourcesRestOperations _privateLinkResourcesRestClient; + private readonly ClientDiagnostics _serviceClientDiagnostics; + private readonly ServiceRestOperations _serviceRestClient; private readonly SearchServiceData _data; /// Gets the resource type for the operations. @@ -77,6 +79,8 @@ internal SearchServiceResource(ArmClient client, ResourceIdentifier id) : base(c _queryKeysRestClient = new QueryKeysRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _privateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Search", ProviderConstants.DefaultProviderNamespace, Diagnostics); _privateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _serviceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Search", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _serviceRestClient = new ServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -123,7 +127,7 @@ public virtual SearchPrivateEndpointConnectionCollection GetSearchPrivateEndpoin /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -155,7 +159,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -194,7 +198,7 @@ public virtual SharedSearchServicePrivateLinkResourceCollection GetSharedSearchS /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -226,7 +230,7 @@ public virtual async Task> GetS /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -265,7 +269,7 @@ public virtual NetworkSecurityPerimeterConfigurationCollection GetNetworkSecurit /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -296,7 +300,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -327,7 +331,7 @@ public virtual Response GetNetwor /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -368,7 +372,7 @@ public virtual async Task> GetAsync(SearchManage /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -409,7 +413,7 @@ public virtual Response Get(SearchManagementRequestOption /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -454,7 +458,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, SearchM /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -499,7 +503,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, SearchManagementRequestO /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -542,7 +546,7 @@ public virtual async Task> UpdateAsync(SearchSer /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -585,7 +589,7 @@ public virtual Response Update(SearchServicePatch patch, /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -620,7 +624,7 @@ public virtual async Task> GetAdminKeyAsyn /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -655,7 +659,7 @@ public virtual Response GetAdminKey(SearchManagemen /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -691,7 +695,7 @@ public virtual async Task> RegenerateAdmin /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -727,7 +731,7 @@ public virtual Response RegenerateAdminKey(SearchSe /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -767,7 +771,7 @@ public virtual async Task> CreateQueryKeyAsync(s /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -807,7 +811,7 @@ public virtual Response CreateQueryKey(string name, Searc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -834,7 +838,7 @@ public virtual AsyncPageable GetQueryKeysBySearchServiceA /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -861,7 +865,7 @@ public virtual Pageable GetQueryKeysBySearchService(Searc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -901,7 +905,7 @@ public virtual async Task DeleteQueryKeyAsync(string key, SearchManage /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -941,7 +945,7 @@ public virtual Response DeleteQueryKey(string key, SearchManagementRequestOption /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -967,7 +971,7 @@ public virtual AsyncPageable GetSupportedPrivateLinkR /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// @@ -980,6 +984,82 @@ public virtual Pageable GetSupportedPrivateLinkResour return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => SearchPrivateLinkResource.DeserializeSearchPrivateLinkResource(e), _privateLinkResourcesClientDiagnostics, Pipeline, "SearchServiceResource.GetSupportedPrivateLinkResources", "value", null, cancellationToken); } + /// + /// Upgrades the Azure AI Search service to the latest version available. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/upgrade + /// + /// + /// Operation Id + /// Service_Upgrade + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// + /// 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> UpgradeServiceAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _serviceClientDiagnostics.CreateScope("SearchServiceResource.UpgradeService"); + scope.Start(); + try + { + var response = await _serviceRestClient.UpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SearchArmOperation(new SearchServiceOperationSource(Client), _serviceClientDiagnostics, Pipeline, _serviceRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Upgrades the Azure AI Search service to the latest version available. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/upgrade + /// + /// + /// Operation Id + /// Service_Upgrade + /// + /// + /// Default Api Version + /// 2025-02-01-preview + /// + /// + /// + /// 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 UpgradeService(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _serviceClientDiagnostics.CreateScope("SearchServiceResource.UpgradeService"); + scope.Start(); + try + { + var response = _serviceRestClient.Upgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new SearchArmOperation(new SearchServiceOperationSource(Client), _serviceClientDiagnostics, Pipeline, _serviceRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// @@ -993,7 +1073,7 @@ public virtual Pageable GetSupportedPrivateLinkResour /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -1055,7 +1135,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -1117,7 +1197,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -1174,7 +1254,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -1231,7 +1311,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -1291,7 +1371,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// 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..a45f98017bb4 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-02-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(SearchManage /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, SearchM /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, SearchManagementRequestO /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// 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..e5b53686ff10 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-02-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string share /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(SearchMan /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string sharedPrivateLinkRe /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string sharedPrivateLinkResourceName, Searc /// /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-06-01-preview + /// 2025-02-01-preview /// /// /// Resource diff --git a/sdk/search/Azure.ResourceManager.Search/src/autorest.md b/sdk/search/Azure.ResourceManager.Search/src/autorest.md index 18933445ada5..c9741f57ca02 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/autorest.md +++ b/sdk/search/Azure.ResourceManager.Search/src/autorest.md @@ -8,8 +8,8 @@ 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 -#tag: package-preview-2024-06 +require: https://github.com/Azure/azure-rest-api-specs/blob/222020fcecfb271d2b30f67754e36f9cf6f46ef3/specification/search/resource-manager/readme.md +#tag: package-preview-2025-02 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: