diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/api/Azure.ResourceManager.MachineLearning.netstandard2.0.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/api/Azure.ResourceManager.MachineLearning.netstandard2.0.cs index 9c01b69f4206f..8de9119c35cbb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/api/Azure.ResourceManager.MachineLearning.netstandard2.0.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/api/Azure.ResourceManager.MachineLearning.netstandard2.0.cs @@ -1,71 +1,5 @@ namespace Azure.ResourceManager.MachineLearning { - public partial class EndpointDeploymentResourcePropertiesBasicResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public EndpointDeploymentResourcePropertiesBasicResourceData(Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentResourceProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentResourceProperties Properties { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData 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.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData 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 EndpointResourcePropertiesBasicResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected EndpointResourcePropertiesBasicResource() { } - public virtual Azure.ResourceManager.MachineLearning.EndpointResourcePropertiesBasicResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetKeys(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetModels(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetModelsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetWorkspaceEndpointDeployment(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetWorkspaceEndpointDeploymentAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.WorkspaceEndpointDeploymentCollection GetWorkspaceEndpointDeployments() { throw null; } - public virtual Azure.ResourceManager.MachineLearning.WorkspaceEndpointRaiPolicyCollection GetWorkspaceEndpointRaiPolicies() { throw null; } - public virtual Azure.Response GetWorkspaceEndpointRaiPolicy(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetWorkspaceEndpointRaiPolicyAsync(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RegenerateKeys(Azure.ResourceManager.MachineLearning.Models.RegenerateServiceAccountKeyContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RegenerateKeysAsync(Azure.ResourceManager.MachineLearning.Models.RegenerateServiceAccountKeyContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.MachineLearning.EndpointResourcePropertiesBasicResourceData 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.MachineLearning.EndpointResourcePropertiesBasicResourceData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.EndpointResourcePropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.EndpointResourcePropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class EndpointResourcePropertiesBasicResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected EndpointResourcePropertiesBasicResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.MachineLearning.EndpointResourcePropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.MachineLearning.EndpointResourcePropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(Azure.ResourceManager.MachineLearning.Models.EndpointType? endpointType = default(Azure.ResourceManager.MachineLearning.Models.EndpointType?), bool? includeInferenceEndpoints = default(bool?), string skip = null, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.MachineLearning.Models.EndpointType? endpointType = default(Azure.ResourceManager.MachineLearning.Models.EndpointType?), bool? includeInferenceEndpoints = default(bool?), string skip = null, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class EndpointResourcePropertiesBasicResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public EndpointResourcePropertiesBasicResourceData(Azure.ResourceManager.MachineLearning.Models.EndpointResourceProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.EndpointResourceProperties Properties { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.EndpointResourcePropertiesBasicResourceData 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.MachineLearning.EndpointResourcePropertiesBasicResourceData 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 MachineLearningBatchDeploymentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected MachineLearningBatchDeploymentCollection() { } @@ -424,15 +358,11 @@ protected MachineLearningComputeResource() { } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningUnderlyingResourceAction underlyingResourceAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningUnderlyingResourceAction underlyingResourceAction, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAllowedResizeSizes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllowedResizeSizesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetKeys(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetNodes(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetNodesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Resize(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.ResizeSchema resizeSchema, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ResizeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.ResizeSchema resizeSchema, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Restart(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RestartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -446,12 +376,6 @@ protected MachineLearningComputeResource() { } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateCustomServices(System.Collections.Generic.IEnumerable customServices, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateCustomServicesAsync(System.Collections.Generic.IEnumerable customServices, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateDataMounts(System.Collections.Generic.IEnumerable dataMounts, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateDataMountsAsync(System.Collections.Generic.IEnumerable dataMounts, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateIdleShutdownSetting(Azure.ResourceManager.MachineLearning.Models.IdleShutdownSetting idleShutdownSetting, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateIdleShutdownSettingAsync(Azure.ResourceManager.MachineLearning.Models.IdleShutdownSetting idleShutdownSetting, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MachineLearningDataContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -542,9 +466,7 @@ protected MachineLearningDatastoreResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetSecrets(Azure.ResourceManager.MachineLearning.Models.SecretExpiry body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetSecrets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSecretsAsync(Azure.ResourceManager.MachineLearning.Models.SecretExpiry body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData 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) { } @@ -709,7 +631,6 @@ protected MachineLearningEnvironmentVersionResource() { } } public static partial class MachineLearningExtensions { - public static Azure.ResourceManager.MachineLearning.EndpointResourcePropertiesBasicResource GetEndpointResourcePropertiesBasicResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningBatchDeploymentResource GetMachineLearningBatchDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningBatchEndpointResource GetMachineLearningBatchEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerResource GetMachineLearningCodeContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -760,22 +681,14 @@ public static partial class MachineLearningExtensions public static Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionResource GetMachineLearningWorkspaceConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceResource GetMachineLearningWorkspaceResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceCollection GetMachineLearningWorkspaces(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetMachineLearningWorkspaces(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string kind = null, string skip = null, string aiCapabilities = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Pageable GetMachineLearningWorkspaces(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skip, System.Threading.CancellationToken cancellationToken) { throw null; } - public static Azure.AsyncPageable GetMachineLearningWorkspacesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string kind = null, string skip = null, string aiCapabilities = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.AsyncPageable GetMachineLearningWorkspacesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skip, System.Threading.CancellationToken cancellationToken) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearninRegistryComponentContainerResource GetMachineLearninRegistryComponentContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearninRegistryComponentVersionResource GetMachineLearninRegistryComponentVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MarketplaceSubscriptionResource GetMarketplaceSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.RaiBlocklistItemPropertiesBasicResource GetRaiBlocklistItemPropertiesBasicResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.RaiBlocklistPropertiesBasicResource GetRaiBlocklistPropertiesBasicResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.ServerlessEndpointResource GetServerlessEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.WorkspaceConnectionDeploymentResource GetWorkspaceConnectionDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.WorkspaceConnectionRaiPolicyResource GetWorkspaceConnectionRaiPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.WorkspaceEndpointDeploymentResource GetWorkspaceEndpointDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.WorkspaceEndpointRaiPolicyResource GetWorkspaceEndpointRaiPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable UpdateMachineLearningQuotas(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable UpdateMachineLearningQuotasAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -1361,8 +1274,9 @@ public MachineLearningPrivateEndpointConnectionData(Azure.Core.AzureLocation loc public Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateLinkServiceConnectionState ConnectionState { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpoint PrivateEndpoint { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpointConnectionProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubResourceId { get { throw null; } } Azure.ResourceManager.MachineLearning.MachineLearningPrivateEndpointConnectionData 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.MachineLearning.MachineLearningPrivateEndpointConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1495,7 +1409,6 @@ public MachineLearningRegistryData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string IntellectualPropertyPublisher { get { throw null; } set { } } public string Kind { get { throw null; } set { } } - public System.Collections.Generic.IList ManagedResourceGroupAssignedIdentities { get { throw null; } set { } } public Azure.Core.ResourceIdentifier ManagedResourceId { get { throw null; } set { } } public System.Uri MlFlowRegistryUri { get { throw null; } set { } } public string PublicNetworkAccess { get { throw null; } set { } } @@ -1835,12 +1748,8 @@ protected MachineLearningWorkspaceCollection() { } public virtual Azure.Response Exists(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string kind = null, string skip = null, string aiCapabilities = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.Pageable GetAll(string skip, System.Threading.CancellationToken cancellationToken) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string kind = null, string skip = null, string aiCapabilities = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public virtual Azure.AsyncPageable GetAllAsync(string skip, System.Threading.CancellationToken cancellationToken) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1856,10 +1765,8 @@ protected MachineLearningWorkspaceConnectionCollection() { } public virtual Azure.Response Exists(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string target = null, string category = null, bool? includeAll = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string target, string category, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string target = null, string category = null, bool? includeAll = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string target, string category, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string target = null, string category = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string target = null, string category = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.NullableResponse GetIfExists(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1888,30 +1795,15 @@ protected MachineLearningWorkspaceConnectionResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetModelsConnections(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetModelsConnectionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetRaiBlocklistPropertiesBasicResource(string raiBlocklistName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetRaiBlocklistPropertiesBasicResourceAsync(string raiBlocklistName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.RaiBlocklistPropertiesBasicResourceCollection GetRaiBlocklistPropertiesBasicResources() { throw null; } public virtual Azure.Response GetSecrets(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSecretsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetWorkspaceConnectionDeployment(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetWorkspaceConnectionDeploymentAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.WorkspaceConnectionDeploymentCollection GetWorkspaceConnectionDeployments() { throw null; } - public virtual Azure.ResourceManager.MachineLearning.WorkspaceConnectionRaiPolicyCollection GetWorkspaceConnectionRaiPolicies() { throw null; } - public virtual Azure.Response GetWorkspaceConnectionRaiPolicy(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetWorkspaceConnectionRaiPolicyAsync(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionData 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.MachineLearning.MachineLearningWorkspaceConnectionData 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 virtual Azure.ResourceManager.ArmOperation TestConnection(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionData data = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task TestConnectionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionData data = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Update(Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -1919,31 +1811,23 @@ public partial class MachineLearningWorkspaceData : Azure.ResourceManager.Models { public MachineLearningWorkspaceData(Azure.Core.AzureLocation location) { } public bool? AllowPublicAccessWhenBehindVnet { get { throw null; } set { } } - public bool? AllowRoleAssignmentOnRG { get { throw null; } set { } } public string ApplicationInsights { get { throw null; } set { } } public System.Collections.Generic.IList AssociatedWorkspaces { get { throw null; } } - public System.Collections.Generic.IList ContainerRegistries { get { throw null; } } public string ContainerRegistry { get { throw null; } set { } } public int? CosmosDbCollectionsThroughput { get { throw null; } set { } } public string Description { get { throw null; } set { } } public System.Uri DiscoveryUri { get { throw null; } set { } } public bool? EnableDataIsolation { get { throw null; } set { } } - public bool? EnableServiceSideCMKEncryption { get { throw null; } set { } } - public bool? EnableSimplifiedCmk { get { throw null; } set { } } - public bool? EnableSoftwareBillOfMaterials { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionSetting Encryption { get { throw null; } set { } } - public System.Collections.Generic.IList ExistingWorkspaces { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.FeatureStoreSettings FeatureStoreSettings { get { throw null; } set { } } public string FriendlyName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier HubResourceId { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string ImageBuildCompute { get { throw null; } set { } } - public System.Collections.Generic.IList IPAllowlist { get { throw null; } } public bool? IsHbiWorkspace { get { throw null; } set { } } public bool? IsStorageHnsEnabled { get { throw null; } } public bool? IsV1LegacyMode { get { throw null; } set { } } public string KeyVault { get { throw null; } set { } } - public System.Collections.Generic.IList KeyVaults { get { throw null; } } public string Kind { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ManagedNetworkSettings ManagedNetwork { get { throw null; } set { } } public System.Uri MlFlowTrackingUri { get { throw null; } } @@ -1954,15 +1838,12 @@ public MachineLearningWorkspaceData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? ProvisioningState { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType? PublicNetworkAccessType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess? PublicNetworkAccessType { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ServerlessComputeSettings ServerlessComputeSettings { get { throw null; } set { } } public string ServiceProvisionedResourceGroup { get { throw null; } } public System.Collections.Generic.IList SharedPrivateLinkResources { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } - public int? SoftDeleteRetentionInDays { get { throw null; } set { } } public string StorageAccount { get { throw null; } set { } } - public System.Collections.Generic.IList StorageAccounts { get { throw null; } } - public string SystemDatastoresAuthMode { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.WorkspaceHubConfig WorkspaceHubConfig { get { throw null; } set { } } public string WorkspaceId { get { throw null; } } @@ -1991,11 +1872,6 @@ protected MachineLearningWorkspaceResource() { } public virtual System.Threading.Tasks.Task> DiagnoseAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceDiagnoseContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetEndpointResourcePropertiesBasicResource(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetEndpointResourcePropertiesBasicResourceAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.EndpointResourcePropertiesBasicResourceCollection GetEndpointResourcePropertiesBasicResources() { throw null; } - public virtual Azure.Pageable GetInWorkspaceEndpointDeployments(Azure.ResourceManager.MachineLearning.Models.EndpointType? endpointType = default(Azure.ResourceManager.MachineLearning.Models.EndpointType?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetInWorkspaceEndpointDeploymentsAsync(Azure.ResourceManager.MachineLearning.Models.EndpointType? endpointType = default(Azure.ResourceManager.MachineLearning.Models.EndpointType?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetKeys(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetMachineLearningBatchEndpoint(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -2049,8 +1925,6 @@ protected MachineLearningWorkspaceResource() { } public virtual Azure.Response GetMarketplaceSubscription(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMarketplaceSubscriptionAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MarketplaceSubscriptionCollection GetMarketplaceSubscriptions() { throw null; } - public virtual Azure.Pageable GetModelsConnections(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetModelsConnectionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetNotebookAccessToken(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNotebookAccessTokenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetNotebookKeys(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -2205,115 +2079,6 @@ protected MarketplaceSubscriptionResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MarketplaceSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MarketplaceSubscriptionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class RaiBlocklistItemPropertiesBasicResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected RaiBlocklistItemPropertiesBasicResource() { } - public virtual Azure.ResourceManager.MachineLearning.RaiBlocklistItemPropertiesBasicResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.MachineLearning.RaiBlocklistItemPropertiesBasicResourceData 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.MachineLearning.RaiBlocklistItemPropertiesBasicResourceData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.RaiBlocklistItemPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.RaiBlocklistItemPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class RaiBlocklistItemPropertiesBasicResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected RaiBlocklistItemPropertiesBasicResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string raiBlocklistItemName, Azure.ResourceManager.MachineLearning.RaiBlocklistItemPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string raiBlocklistItemName, Azure.ResourceManager.MachineLearning.RaiBlocklistItemPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string raiBlocklistItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string raiBlocklistItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string raiBlocklistItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string raiBlocklistItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string raiBlocklistItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string raiBlocklistItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class RaiBlocklistItemPropertiesBasicResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RaiBlocklistItemPropertiesBasicResourceData(Azure.ResourceManager.MachineLearning.Models.RaiBlocklistItemProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.RaiBlocklistItemProperties Properties { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.RaiBlocklistItemPropertiesBasicResourceData 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.MachineLearning.RaiBlocklistItemPropertiesBasicResourceData 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 RaiBlocklistPropertiesBasicResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected RaiBlocklistPropertiesBasicResource() { } - public virtual Azure.ResourceManager.MachineLearning.RaiBlocklistPropertiesBasicResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.ResourceManager.ArmOperation> AddBulkConnectionRaiBlocklistItem(Azure.WaitUntil waitUntil, System.Collections.Generic.IEnumerable content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> AddBulkConnectionRaiBlocklistItemAsync(Azure.WaitUntil waitUntil, System.Collections.Generic.IEnumerable content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DeleteBulkConnectionRaiBlocklistItem(Azure.WaitUntil waitUntil, System.BinaryData body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteBulkConnectionRaiBlocklistItemAsync(Azure.WaitUntil waitUntil, System.BinaryData body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetRaiBlocklistItemPropertiesBasicResource(string raiBlocklistItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetRaiBlocklistItemPropertiesBasicResourceAsync(string raiBlocklistItemName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.RaiBlocklistItemPropertiesBasicResourceCollection GetRaiBlocklistItemPropertiesBasicResources() { throw null; } - Azure.ResourceManager.MachineLearning.RaiBlocklistPropertiesBasicResourceData 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.MachineLearning.RaiBlocklistPropertiesBasicResourceData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.RaiBlocklistPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.RaiBlocklistPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class RaiBlocklistPropertiesBasicResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected RaiBlocklistPropertiesBasicResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string raiBlocklistName, Azure.ResourceManager.MachineLearning.RaiBlocklistPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string raiBlocklistName, Azure.ResourceManager.MachineLearning.RaiBlocklistPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string raiBlocklistName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string raiBlocklistName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string raiBlocklistName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string raiBlocklistName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string raiBlocklistName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string raiBlocklistName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class RaiBlocklistPropertiesBasicResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RaiBlocklistPropertiesBasicResourceData(Azure.ResourceManager.MachineLearning.Models.RaiBlocklistProperties properties) { } - public string RaiBlocklistDescription { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.RaiBlocklistPropertiesBasicResourceData 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.MachineLearning.RaiBlocklistPropertiesBasicResourceData 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 RaiPolicyPropertiesBasicResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RaiPolicyPropertiesBasicResourceData(Azure.ResourceManager.MachineLearning.Models.RaiPolicyProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.RaiPolicyProperties Properties { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData 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.MachineLearning.RaiPolicyPropertiesBasicResourceData 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 ServerlessEndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ServerlessEndpointCollection() { } @@ -2373,157 +2138,12 @@ protected ServerlessEndpointResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class WorkspaceConnectionDeploymentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected WorkspaceConnectionDeploymentCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class WorkspaceConnectionDeploymentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected WorkspaceConnectionDeploymentResource() { } - public virtual Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData 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.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class WorkspaceConnectionRaiPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected WorkspaceConnectionRaiPolicyCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string raiPolicyName, Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string raiPolicyName, Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class WorkspaceConnectionRaiPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected WorkspaceConnectionRaiPolicyResource() { } - public virtual Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData 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.MachineLearning.RaiPolicyPropertiesBasicResourceData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class WorkspaceEndpointDeploymentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected WorkspaceEndpointDeploymentCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class WorkspaceEndpointDeploymentResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected WorkspaceEndpointDeploymentResource() { } - public virtual Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData 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.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class WorkspaceEndpointRaiPolicyCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected WorkspaceEndpointRaiPolicyCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string raiPolicyName, Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string raiPolicyName, Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string raiPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class WorkspaceEndpointRaiPolicyResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public static readonly Azure.Core.ResourceType ResourceType; - protected WorkspaceEndpointRaiPolicyResource() { } - public virtual Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData 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.MachineLearning.RaiPolicyPropertiesBasicResourceData 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 virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } } namespace Azure.ResourceManager.MachineLearning.Mocking { public partial class MockableMachineLearningArmClient : Azure.ResourceManager.ArmResource { protected MockableMachineLearningArmClient() { } - public virtual Azure.ResourceManager.MachineLearning.EndpointResourcePropertiesBasicResource GetEndpointResourcePropertiesBasicResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MachineLearningBatchDeploymentResource GetMachineLearningBatchDeploymentResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MachineLearningBatchEndpointResource GetMachineLearningBatchEndpointResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerResource GetMachineLearningCodeContainerResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -2563,13 +2183,7 @@ protected MockableMachineLearningArmClient() { } public virtual Azure.ResourceManager.MachineLearning.MachineLearninRegistryComponentContainerResource GetMachineLearninRegistryComponentContainerResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MachineLearninRegistryComponentVersionResource GetMachineLearninRegistryComponentVersionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MarketplaceSubscriptionResource GetMarketplaceSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.RaiBlocklistItemPropertiesBasicResource GetRaiBlocklistItemPropertiesBasicResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.RaiBlocklistPropertiesBasicResource GetRaiBlocklistPropertiesBasicResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.MachineLearning.ServerlessEndpointResource GetServerlessEndpointResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.WorkspaceConnectionDeploymentResource GetWorkspaceConnectionDeploymentResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.WorkspaceConnectionRaiPolicyResource GetWorkspaceConnectionRaiPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.WorkspaceEndpointDeploymentResource GetWorkspaceEndpointDeploymentResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.WorkspaceEndpointRaiPolicyResource GetWorkspaceEndpointRaiPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableMachineLearningResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -2592,11 +2206,7 @@ protected MockableMachineLearningSubscriptionResource() { } public virtual Azure.AsyncPageable GetMachineLearningUsagesAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetMachineLearningVmSizes(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetMachineLearningVmSizesAsync(Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetMachineLearningWorkspaces(string kind = null, string skip = null, string aiCapabilities = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.Pageable GetMachineLearningWorkspaces(string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetMachineLearningWorkspacesAsync(string kind = null, string skip = null, string aiCapabilities = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public virtual Azure.AsyncPageable GetMachineLearningWorkspacesAsync(string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable UpdateMachineLearningQuotas(Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable UpdateMachineLearningQuotasAsync(Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -2623,17 +2233,6 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties() { } 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 AccountApiKeys : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal AccountApiKeys() { } - public string Key1 { get { throw null; } } - public string Key2 { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.AccountApiKeys 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.MachineLearning.Models.AccountApiKeys 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 AccountKeyAuthTypeWorkspaceConnectionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AccountKeyAuthTypeWorkspaceConnectionProperties() { } @@ -2644,25 +2243,6 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AllowedContentLevel : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AllowedContentLevel(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.AllowedContentLevel High { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.AllowedContentLevel Low { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.AllowedContentLevel Medium { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.AllowedContentLevel 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.MachineLearning.Models.AllowedContentLevel left, Azure.ResourceManager.MachineLearning.Models.AllowedContentLevel right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.AllowedContentLevel (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.AllowedContentLevel left, Azure.ResourceManager.MachineLearning.Models.AllowedContentLevel right) { throw null; } - public override string ToString() { throw null; } - } public partial class AmlCompute : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AmlCompute() { } @@ -2765,59 +2345,42 @@ public ApiKeyAuthWorkspaceConnectionProperties() { } } public static partial class ArmMachineLearningModelFactory { - public static Azure.ResourceManager.MachineLearning.Models.AadAuthTypeWorkspaceConnectionProperties AadAuthTypeWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, string error = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? peRequirement = default(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement?), Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? peStatus = default(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus?), System.Collections.Generic.IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = default(bool?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.AccessKeyAuthTypeWorkspaceConnectionProperties AccessKeyAuthTypeWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, string error = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? peRequirement = default(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement?), Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? peStatus = default(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus?), System.Collections.Generic.IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = default(bool?), Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionAccessKey credentials = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.AccountApiKeys AccountApiKeys(string key1 = null, string key2 = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.AccountKeyAuthTypeWorkspaceConnectionProperties AccountKeyAuthTypeWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, string error = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? peRequirement = default(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement?), Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? peStatus = default(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus?), System.Collections.Generic.IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = default(bool?), string credentialsKey = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.AadAuthTypeWorkspaceConnectionProperties AadAuthTypeWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), string target = null, System.Collections.Generic.IDictionary metadata = null, System.Collections.Generic.IEnumerable sharedUserList = null, string value = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? valueFormat = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.AccessKeyAuthTypeWorkspaceConnectionProperties AccessKeyAuthTypeWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), string target = null, System.Collections.Generic.IDictionary metadata = null, System.Collections.Generic.IEnumerable sharedUserList = null, string value = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? valueFormat = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat?), Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionAccessKey credentials = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.AccountKeyAuthTypeWorkspaceConnectionProperties AccountKeyAuthTypeWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), string target = null, System.Collections.Generic.IDictionary metadata = null, System.Collections.Generic.IEnumerable sharedUserList = null, string value = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? valueFormat = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat?), string credentialsKey = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.AmlCompute AmlCompute(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.AmlComputeProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.AmlComputeNodeInformation AmlComputeNodeInformation(string nodeId = null, System.Net.IPAddress privateIPAddress = null, System.Net.IPAddress publicIPAddress = null, int? port = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState? nodeState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState?), string runId = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.AmlComputeProperties AmlComputeProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType? osType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType?), string vmSize = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriority? vmPriority = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriority?), string virtualMachineImageId = null, bool? isolatedNetwork = default(bool?), Azure.ResourceManager.MachineLearning.Models.AmlComputeScaleSettings scaleSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningUserAccountCredentials userAccountCredentials = null, Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess? remoteLoginPortPublicAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess?), Azure.ResourceManager.MachineLearning.Models.MachineLearningAllocationState? allocationState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningAllocationState?), System.DateTimeOffset? allocationStateTransitionOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, int? currentNodeCount = default(int?), int? targetNodeCount = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeStateCounts nodeStateCounts = null, bool? enableNodePublicIP = default(bool?), System.BinaryData propertyBag = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ApiKeyAuthWorkspaceConnectionProperties ApiKeyAuthWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, string error = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? peRequirement = default(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement?), Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? peStatus = default(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus?), System.Collections.Generic.IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = default(bool?), string credentialsKey = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.AutoMLJob AutoMLJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary outputs = null, Azure.ResourceManager.MachineLearning.Models.JobTier? queueJobTier = default(Azure.ResourceManager.MachineLearning.Models.JobTier?), Azure.ResourceManager.MachineLearning.Models.MachineLearningJobResourceConfiguration resources = null, Azure.ResourceManager.MachineLearning.Models.AutoMLVertical taskDetails = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.BlobReferenceForConsumptionDto BlobReferenceForConsumptionDto(System.Uri blobUri = null, Azure.ResourceManager.MachineLearning.Models.PendingUploadCredentialDto credential = null, Azure.Core.ResourceIdentifier storageAccountArmId = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ContentSafetyEndpointDeploymentResourceProperties ContentSafetyEndpointDeploymentResourceProperties(string failureReason = null, Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState?), Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentModel model = null, string raiPolicyName = null, Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption? versionUpgradeOption = default(Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ContentSafetyEndpointResourceProperties ContentSafetyEndpointResourceProperties(Azure.Core.ResourceIdentifier associatedResourceId = null, System.Collections.Generic.IEnumerable deployments = null, System.Uri endpointUri = null, string failureReason = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string name = null, Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState?), bool? shouldCreateAiServicesEndpoint = default(bool?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.CustomKeysWorkspaceConnectionProperties CustomKeysWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, string error = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? peRequirement = default(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement?), Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? peStatus = default(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus?), System.Collections.Generic.IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = default(bool?), System.Collections.Generic.IDictionary credentialsKeys = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.DockerCredential DockerCredential(string password = null, string userName = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentResourceProperties EndpointDeploymentResourceProperties(string failureReason = null, Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState?), string endpointDeploymentResourcePropertiesType = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.EndpointDeploymentResourcePropertiesBasicResourceData EndpointDeploymentResourcePropertiesBasicResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentResourceProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointKeys EndpointKeys(Azure.ResourceManager.MachineLearning.Models.AccountApiKeys keys = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointModelDeprecationProperties EndpointModelDeprecationProperties(System.DateTimeOffset? fineTune = default(System.DateTimeOffset?), System.DateTimeOffset? inference = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointModelProperties EndpointModelProperties(System.Collections.Generic.IReadOnlyDictionary capabilities = null, Azure.ResourceManager.MachineLearning.Models.EndpointModelDeprecationProperties deprecation = null, System.Collections.Generic.IReadOnlyDictionary finetuneCapabilities = null, string format = null, bool? isDefaultVersion = default(bool?), Azure.ResourceManager.MachineLearning.Models.ModelLifecycleStatus? lifecycleStatus = default(Azure.ResourceManager.MachineLearning.Models.ModelLifecycleStatus?), int? maxCapacity = default(int?), string name = null, System.Collections.Generic.IEnumerable skus = null, Azure.ResourceManager.Models.SystemData systemData = null, string version = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointModelSkuCapacityProperties EndpointModelSkuCapacityProperties(int? @default = default(int?), int? maximum = default(int?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointModelSkuProperties EndpointModelSkuProperties(Azure.ResourceManager.MachineLearning.Models.EndpointModelSkuCapacityProperties capacity = null, System.Collections.Generic.IEnumerable connectionIds = null, System.DateTimeOffset? deprecationOn = default(System.DateTimeOffset?), string name = null, System.Collections.Generic.IEnumerable rateLimits = null, string usageName = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointModelSkuRateLimitProperties EndpointModelSkuRateLimitProperties(float? count = default(float?), float? renewalPeriod = default(float?), System.Collections.Generic.IEnumerable rules = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointModelSkuRateLimitRulePatternProperties EndpointModelSkuRateLimitRulePatternProperties(string method = null, string path = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointModelSkuRateLimitRuleProperties EndpointModelSkuRateLimitRuleProperties(float? count = default(float?), bool? dynamicThrottlingEnabled = default(bool?), string key = null, System.Collections.Generic.IEnumerable matchPatterns = null, float? minCount = default(float?), float? renewalPeriod = default(float?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointResourceProperties EndpointResourceProperties(Azure.Core.ResourceIdentifier associatedResourceId = null, System.Collections.Generic.IEnumerable deployments = null, string endpointType = null, System.Uri endpointUri = null, string failureReason = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string name = null, Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState?), bool? shouldCreateAiServicesEndpoint = default(bool?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.EndpointResourcePropertiesBasicResourceData EndpointResourcePropertiesBasicResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.EndpointResourceProperties properties = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ApiKeyAuthWorkspaceConnectionProperties ApiKeyAuthWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), string target = null, System.Collections.Generic.IDictionary metadata = null, System.Collections.Generic.IEnumerable sharedUserList = null, string value = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? valueFormat = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat?), string credentialsKey = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLJob AutoMLJob(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string displayName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), string experimentName = null, System.Collections.Generic.IDictionary services = null, Azure.Core.ResourceIdentifier computeId = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, Azure.Core.ResourceIdentifier componentId = null, Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobResourceConfiguration resources = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, Azure.ResourceManager.MachineLearning.Models.AutoMLVertical taskDetails = null, System.Collections.Generic.IDictionary outputs = null, Azure.ResourceManager.MachineLearning.Models.JobTier? queueJobTier = default(Azure.ResourceManager.MachineLearning.Models.JobTier?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.BlobReferenceForConsumptionDto BlobReferenceForConsumptionDto(System.Uri blobUri = null, Azure.Core.ResourceIdentifier storageAccountArmId = null, Azure.ResourceManager.MachineLearning.Models.PendingUploadCredentialDto credential = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.CustomKeysWorkspaceConnectionProperties CustomKeysWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), string target = null, System.Collections.Generic.IDictionary metadata = null, System.Collections.Generic.IEnumerable sharedUserList = null, string value = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? valueFormat = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat?), System.Collections.Generic.IDictionary credentialsKeys = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.DockerCredential DockerCredential(string userName = null, string password = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.FeaturesetVersionBackfillResponse FeaturesetVersionBackfillResponse(System.Collections.Generic.IEnumerable jobIds = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.FineTuningJob FineTuningJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), Azure.ResourceManager.MachineLearning.Models.FineTuningVertical fineTuningDetails = null, System.Collections.Generic.IEnumerable resourcesInstanceTypes = null, Azure.ResourceManager.MachineLearning.Models.JobTier? queueJobTier = default(Azure.ResourceManager.MachineLearning.Models.JobTier?), System.Collections.Generic.IDictionary outputs = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.FqdnOutboundRule FqdnOutboundRule(Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory? category = default(Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory?), System.Collections.Generic.IEnumerable parentRuleNames = null, Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus? status = default(Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus?), string destination = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.GetBlobReferenceForConsumptionDto GetBlobReferenceForConsumptionDto(System.Uri blobUri = null, Azure.ResourceManager.MachineLearning.Models.DataReferenceCredential credential = null, string storageAccountArmId = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.GetBlobReferenceForConsumptionDto GetBlobReferenceForConsumptionDto(System.Uri blobUri = null, string storageAccountArmId = null, Azure.ResourceManager.MachineLearning.Models.DataReferenceCredential credential = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.GetBlobReferenceSasResponseDto GetBlobReferenceSasResponseDto(Azure.ResourceManager.MachineLearning.Models.GetBlobReferenceForConsumptionDto blobReferenceForConsumption = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ImageMetadata ImageMetadata(string currentImageVersion = null, string latestImageVersion = null, bool? isLatestOSImageVersion = default(bool?), Azure.ResourceManager.MachineLearning.Models.OSPatchingStatus osPatchingStatus = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ImageMetadata ImageMetadata(string currentImageVersion = null, string latestImageVersion = null, bool? isLatestOSImageVersion = default(bool?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAksCompute MachineLearningAksCompute(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningAksComputeProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAksComputeProperties MachineLearningAksComputeProperties(string clusterFqdn = null, System.Collections.Generic.IEnumerable systemServices = null, int? agentCount = default(int?), string agentVmSize = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose? clusterPurpose = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose?), Azure.ResourceManager.MachineLearning.Models.MachineLearningSslConfiguration sslConfiguration = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningAksNetworkingConfiguration aksNetworkingConfiguration = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningLoadBalancerType? loadBalancerType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningLoadBalancerType?), string loadBalancerSubnet = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAksComputeSecrets MachineLearningAksComputeSecrets(string userKubeConfig = null, string adminKubeConfig = null, string imagePullSecretName = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer MachineLearningAssetContainer(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureBlobDatastore MachineLearningAzureBlobDatastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, bool? isDefault = default(bool?), string accountName = null, string containerName = null, string endpoint = null, string protocol = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?), string resourceGroup = null, string subscriptionId = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureDataLakeGen1Datastore MachineLearningAzureDataLakeGen1Datastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, bool? isDefault = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?), string storeName = null, string resourceGroup = null, string subscriptionId = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureDataLakeGen2Datastore MachineLearningAzureDataLakeGen2Datastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, bool? isDefault = default(bool?), string accountName = null, string endpoint = null, string filesystem = null, string protocol = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?), string resourceGroup = null, string subscriptionId = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureFileDatastore MachineLearningAzureFileDatastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, bool? isDefault = default(bool?), string accountName = null, string endpoint = null, string fileShareName = null, string protocol = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?), string resourceGroup = null, string subscriptionId = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.MachineLearningBatchDeploymentData MachineLearningBatchDeploymentData(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.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchDeploymentProperties properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchDeploymentProperties MachineLearningBatchDeploymentProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary properties = null, string compute = null, Azure.ResourceManager.MachineLearning.Models.BatchDeploymentConfiguration deploymentConfiguration = null, int? errorThreshold = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel? loggingLevel = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel?), int? maxConcurrencyPerInstance = default(int?), long? miniBatchSize = default(long?), Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetReferenceBase model = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction? outputAction = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction?), string outputFileName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentResourceConfiguration resources = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchRetrySettings retrySettings = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.MachineLearningBatchEndpointData MachineLearningBatchEndpointData(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.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchEndpointProperties properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchEndpointProperties MachineLearningBatchEndpointProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode), string description = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthKeys keys = null, System.Collections.Generic.IDictionary properties = null, System.Uri scoringUri = null, System.Uri swaggerUri = null, string defaultsDeploymentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer MachineLearningAssetContainer(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureBlobDatastore MachineLearningAzureBlobDatastore(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isDefault = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, string accountName = null, string containerName = null, string endpoint = null, string protocol = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?), string subscriptionId = null, string resourceGroup = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureDataLakeGen1Datastore MachineLearningAzureDataLakeGen1Datastore(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isDefault = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, string storeName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?), string subscriptionId = null, string resourceGroup = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureDataLakeGen2Datastore MachineLearningAzureDataLakeGen2Datastore(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isDefault = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, string filesystem = null, string accountName = null, string endpoint = null, string protocol = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?), string subscriptionId = null, string resourceGroup = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningAzureFileDatastore MachineLearningAzureFileDatastore(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isDefault = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, string accountName = null, string fileShareName = null, string endpoint = null, string protocol = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?), string subscriptionId = null, string resourceGroup = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningBatchDeploymentData MachineLearningBatchDeploymentData(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.MachineLearning.Models.MachineLearningBatchDeploymentProperties properties = null, string kind = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchDeploymentProperties MachineLearningBatchDeploymentProperties(string description = null, System.Collections.Generic.IDictionary properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, string compute = null, Azure.ResourceManager.MachineLearning.Models.BatchDeploymentConfiguration deploymentConfiguration = null, int? errorThreshold = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchRetrySettings retrySettings = null, long? miniBatchSize = default(long?), Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel? loggingLevel = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel?), Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetReferenceBase model = null, int? maxConcurrencyPerInstance = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction? outputAction = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction?), string outputFileName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentResourceConfiguration resources = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningBatchEndpointData MachineLearningBatchEndpointData(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.MachineLearning.Models.MachineLearningBatchEndpointProperties properties = null, string kind = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchEndpointProperties MachineLearningBatchEndpointProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Uri scoringUri = null, System.Uri swaggerUri = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode), Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthKeys keys = null, string defaultsDeploymentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerData MachineLearningCodeContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeContainerProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeContainerProperties MachineLearningCodeContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeContainerProperties MachineLearningCodeContainerProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionData MachineLearningCodeVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeVersionProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeVersionProperties MachineLearningCodeVersionProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isAnonymous = default(bool?), bool? isArchived = default(bool?), System.Uri codeUri = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCommandJob MachineLearningCommandJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), Azure.Core.ResourceIdentifier codeId = null, string command = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration distribution = null, Azure.Core.ResourceIdentifier environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary inputs = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningCommandJobLimits limits = null, System.Collections.Generic.IDictionary outputs = null, System.BinaryData parameters = null, Azure.ResourceManager.MachineLearning.Models.JobTier? queueJobTier = default(Azure.ResourceManager.MachineLearning.Models.JobTier?), Azure.ResourceManager.MachineLearning.Models.MachineLearningJobResourceConfiguration resources = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeVersionProperties MachineLearningCodeVersionProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), bool? isAnonymous = default(bool?), System.Uri codeUri = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCommandJob MachineLearningCommandJob(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string displayName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), string experimentName = null, System.Collections.Generic.IDictionary services = null, Azure.Core.ResourceIdentifier computeId = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, Azure.Core.ResourceIdentifier componentId = null, Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobResourceConfiguration resources = null, Azure.Core.ResourceIdentifier codeId = null, string command = null, Azure.Core.ResourceIdentifier environmentId = null, System.Collections.Generic.IDictionary inputs = null, System.Collections.Generic.IDictionary outputs = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration distribution = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningCommandJobLimits limits = null, System.Collections.Generic.IDictionary environmentVariables = null, System.BinaryData parameters = null, Azure.ResourceManager.MachineLearning.Models.JobTier? queueJobTier = default(Azure.ResourceManager.MachineLearning.Models.JobTier?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerData MachineLearningComponentContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentContainerProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentContainerProperties MachineLearningComponentContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentContainerProperties MachineLearningComponentContainerProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionData MachineLearningComponentVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentVersionProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentVersionProperties MachineLearningComponentVersionProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isAnonymous = default(bool?), bool? isArchived = default(bool?), System.BinaryData componentSpec = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentVersionProperties MachineLearningComponentVersionProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), bool? isAnonymous = default(bool?), System.BinaryData componentSpec = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningComputeData MachineLearningComputeData(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.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstance MachineLearningComputeInstance(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceApplication MachineLearningComputeInstanceApplication(string displayName = null, System.Uri endpointUri = null) { throw null; } @@ -2825,138 +2388,122 @@ public static partial class ArmMachineLearningModelFactory public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceContainer MachineLearningComputeInstanceContainer(string name = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAutosave? autosave = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAutosave?), string gpu = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningNetwork? network = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningNetwork?), Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceEnvironmentInfo environment = null, System.Collections.Generic.IEnumerable services = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceCreatedBy MachineLearningComputeInstanceCreatedBy(string userName = null, string userOrgId = null, string userId = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceDataDisk MachineLearningComputeInstanceDataDisk(Azure.ResourceManager.MachineLearning.Models.MachineLearningCachingType? caching = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningCachingType?), int? diskSizeGB = default(int?), int? lun = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningStorageAccountType? storageAccountType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningStorageAccountType?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceDataMount MachineLearningComputeInstanceDataMount(string source = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType? sourceType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType?), string mountName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningMountAction? mountAction = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningMountAction?), string createdBy = null, string mountPath = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState? mountState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState?), System.DateTimeOffset? mountedOn = default(System.DateTimeOffset?), string error = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceEnvironmentInfo MachineLearningComputeInstanceEnvironmentInfo(string name = null, string version = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceLastOperation MachineLearningComputeInstanceLastOperation(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName? operationName = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName?), System.DateTimeOffset? operationOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus? operationStatus = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationTrigger? operationTrigger = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationTrigger?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceSshSettings MachineLearningComputeInstanceSshSettings(Azure.ResourceManager.MachineLearning.Models.MachineLearningSshPublicAccess? sshPublicAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningSshPublicAccess?), string adminUserName = null, int? sshPort = default(int?), string adminPublicKey = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties MachineLearningComputeProperties(string computeType = null, string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeStartStopSchedule MachineLearningComputeStartStopSchedule(string id = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus? provisioningStatus = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction? action = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction?), Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType? triggerType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType?), Azure.ResourceManager.MachineLearning.Models.ComputeStartStopRecurrenceSchedule recurrenceSchedule = null, Azure.ResourceManager.MachineLearning.Models.ComputeStartStopCronSchedule cronSchedule = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleBase schedule = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeSystemService MachineLearningComputeSystemService(string systemServiceType = null, string publicIPAddress = null, string version = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerRegistryCredentials MachineLearningContainerRegistryCredentials(Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IEnumerable passwords = null, string username = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerRegistryCredentials MachineLearningContainerRegistryCredentials(Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string username = null, System.Collections.Generic.IEnumerable passwords = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDatabricksCompute MachineLearningDatabricksCompute(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningDatabricksProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDatabricksComputeSecrets MachineLearningDatabricksComputeSecrets(string databricksAccessToken = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningDataContainerData MachineLearningDataContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDataContainerProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDataContainerProperties MachineLearningDataContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType dataType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDataContainerProperties MachineLearningDataContainerProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType dataType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDataFactoryCompute MachineLearningDataFactoryCompute(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDataLakeAnalytics MachineLearningDataLakeAnalytics(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), string dataLakeStoreAccountName = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData MachineLearningDatastoreData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties MachineLearningDatastoreProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, string datastoreType = null, bool? isDefault = default(bool?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties MachineLearningDatastoreProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string datastoreType = null, bool? isDefault = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningDataVersionData MachineLearningDataVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDataVersionProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentLogs MachineLearningDeploymentLogs(string content = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResult MachineLearningDiagnoseResult(string code = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel? level = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel?), string message = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultValue MachineLearningDiagnoseResultValue(System.Collections.Generic.IEnumerable userDefinedRouteResults = null, System.Collections.Generic.IEnumerable networkSecurityRuleResults = null, System.Collections.Generic.IEnumerable resourceLockResults = null, System.Collections.Generic.IEnumerable dnsResolutionResults = null, System.Collections.Generic.IEnumerable storageAccountResults = null, System.Collections.Generic.IEnumerable keyVaultResults = null, System.Collections.Generic.IEnumerable containerRegistryResults = null, System.Collections.Generic.IEnumerable applicationInsightsResults = null, System.Collections.Generic.IEnumerable otherResults = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthToken MachineLearningEndpointAuthToken(string accessToken = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), System.DateTimeOffset? refreshOn = default(System.DateTimeOffset?), string tokenType = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthToken MachineLearningEndpointAuthToken(string accessToken = null, string tokenType = null, System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), System.DateTimeOffset? refreshOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointKeyRegenerateContent MachineLearningEndpointKeyRegenerateContent(Azure.ResourceManager.MachineLearning.Models.MachineLearningKeyType keyType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningKeyType), string keyValue = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProperties MachineLearningEndpointProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode), string description = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthKeys keys = null, System.Collections.Generic.IDictionary properties = null, System.Uri scoringUri = null, System.Uri swaggerUri = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProperties MachineLearningEndpointProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Uri scoringUri = null, System.Uri swaggerUri = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode), Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthKeys keys = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerData MachineLearningEnvironmentContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentContainerProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentContainerProperties MachineLearningEnvironmentContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentContainerProperties MachineLearningEnvironmentContainerProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionData MachineLearningEnvironmentVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentVersionProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentVersionProperties MachineLearningEnvironmentVersionProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isAnonymous = default(bool?), bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.AutoRebuildSetting? autoRebuild = default(Azure.ResourceManager.MachineLearning.Models.AutoRebuildSetting?), Azure.ResourceManager.MachineLearning.Models.MachineLearningBuildContext build = null, string condaFile = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType? environmentType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType?), string image = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningInferenceContainerProperties inferenceConfig = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType? osType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType?), Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?), string stage = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentVersionProperties MachineLearningEnvironmentVersionProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), bool? isAnonymous = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType? environmentType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType?), string image = null, string condaFile = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningBuildContext build = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType? osType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType?), Azure.ResourceManager.MachineLearning.Models.MachineLearningInferenceContainerProperties inferenceConfig = null, Azure.ResourceManager.MachineLearning.Models.AutoRebuildSetting? autoRebuild = default(Azure.ResourceManager.MachineLearning.Models.AutoRebuildSetting?), Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?), string stage = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningError MachineLearningError(Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEstimatedVmPrice MachineLearningEstimatedVmPrice(double retailPrice = 0, Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriceOSType osType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriceOSType), Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier vmTier = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEstimatedVmPrices MachineLearningEstimatedVmPrices(Azure.ResourceManager.MachineLearning.Models.MachineLearningBillingCurrency billingCurrency = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningBillingCurrency), Azure.ResourceManager.MachineLearning.Models.MachineLearningUnitOfMeasure unitOfMeasure = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningUnitOfMeasure), System.Collections.Generic.IEnumerable values = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningFeatureData MachineLearningFeatureData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetContainerData MachineLearningFeatureSetContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetContainerProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetContainerProperties MachineLearningFeatureSetContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetContainerProperties MachineLearningFeatureSetContainerProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningFeatureSetVersionData MachineLearningFeatureSetVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetVersionProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetVersionProperties MachineLearningFeatureSetVersionProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isAnonymous = default(bool?), bool? isArchived = default(bool?), System.Collections.Generic.IEnumerable entities = null, Azure.ResourceManager.MachineLearning.Models.MaterializationSettings materializationSettings = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?), string specificationPath = null, string stage = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureSetVersionProperties MachineLearningFeatureSetVersionProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), bool? isAnonymous = default(bool?), string specificationPath = null, Azure.ResourceManager.MachineLearning.Models.MaterializationSettings materializationSettings = null, string stage = null, System.Collections.Generic.IEnumerable entities = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningFeatureStoreEntityContainerData MachineLearningFeatureStoreEntityContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityContainerProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityContainerProperties MachineLearningFeatureStoreEntityContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityContainerProperties MachineLearningFeatureStoreEntityContainerProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningFeaturestoreEntityVersionData MachineLearningFeaturestoreEntityVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityVersionProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityVersionProperties MachineLearningFeatureStoreEntityVersionProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isAnonymous = default(bool?), bool? isArchived = default(bool?), System.Collections.Generic.IEnumerable indexColumns = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?), string stage = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureStoreEntityVersionProperties MachineLearningFeatureStoreEntityVersionProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), bool? isAnonymous = default(bool?), System.Collections.Generic.IEnumerable indexColumns = null, string stage = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFqdnEndpoint MachineLearningFqdnEndpoint(string domainName = null, System.Collections.Generic.IEnumerable endpointDetails = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFqdnEndpointDetail MachineLearningFqdnEndpointDetail(int? port = default(int?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFqdnEndpoints MachineLearningFqdnEndpoints(Azure.ResourceManager.MachineLearning.Models.MachineLearningFqdnEndpointsProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFqdnEndpointsProperties MachineLearningFqdnEndpointsProperties(string category = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningHDInsightCompute MachineLearningHDInsightCompute(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningHDInsightProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningJobData MachineLearningJobData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties MachineLearningJobProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), string jobType = null, Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobService MachineLearningJobService(string endpoint = null, string errorMessage = null, string jobServiceType = null, Azure.ResourceManager.MachineLearning.Models.JobNodes nodes = null, int? port = default(int?), System.Collections.Generic.IDictionary properties = null, string status = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties MachineLearningJobProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string jobType = null, string displayName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), string experimentName = null, System.Collections.Generic.IDictionary services = null, Azure.Core.ResourceIdentifier computeId = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, Azure.Core.ResourceIdentifier componentId = null, Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobService MachineLearningJobService(string jobServiceType = null, int? port = default(int?), string endpoint = null, string status = null, string errorMessage = null, System.Collections.Generic.IDictionary properties = null, Azure.ResourceManager.MachineLearning.Models.JobNodes nodes = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningKubernetesCompute MachineLearningKubernetesCompute(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningKubernetesProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningKubernetesOnlineDeployment MachineLearningKubernetesOnlineDeployment(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary properties = null, bool? appInsightsEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.DataCollector dataCollector = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType?), string instanceType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings readinessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineRequestSettings requestSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings scaleSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerResourceRequirements containerResourceRequirements = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningManagedIdentityAuthTypeWorkspaceConnection MachineLearningManagedIdentityAuthTypeWorkspaceConnection(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, string error = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? peRequirement = default(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement?), Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? peStatus = default(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus?), System.Collections.Generic.IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionManagedIdentity credentials = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningManagedOnlineDeployment MachineLearningManagedOnlineDeployment(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary properties = null, bool? appInsightsEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.DataCollector dataCollector = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType?), string instanceType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings readinessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineRequestSettings requestSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings scaleSettings = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningKubernetesOnlineDeployment MachineLearningKubernetesOnlineDeployment(string description = null, System.Collections.Generic.IDictionary properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings scaleSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineRequestSettings requestSettings = null, string modelMountPath = null, bool? appInsightsEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings livenessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings readinessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), string instanceType = null, string model = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType?), Azure.ResourceManager.MachineLearning.Models.DataCollector dataCollector = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerResourceRequirements containerResourceRequirements = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningManagedIdentityAuthTypeWorkspaceConnection MachineLearningManagedIdentityAuthTypeWorkspaceConnection(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), string target = null, System.Collections.Generic.IDictionary metadata = null, System.Collections.Generic.IEnumerable sharedUserList = null, string value = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? valueFormat = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat?), Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionManagedIdentity credentials = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningManagedOnlineDeployment MachineLearningManagedOnlineDeployment(string description = null, System.Collections.Generic.IDictionary properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings scaleSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineRequestSettings requestSettings = null, string modelMountPath = null, bool? appInsightsEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings livenessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings readinessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), string instanceType = null, string model = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType?), Azure.ResourceManager.MachineLearning.Models.DataCollector dataCollector = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningModelContainerData MachineLearningModelContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningModelContainerProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningModelContainerProperties MachineLearningModelContainerProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningModelContainerProperties MachineLearningModelContainerProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), string latestVersion = null, string nextVersion = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData MachineLearningModelVersionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningModelVersionProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningModelVersionProperties MachineLearningModelVersionProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, bool? isAnonymous = default(bool?), bool? isArchived = default(bool?), System.Collections.Generic.IDictionary flavors = null, string jobName = null, string modelType = null, System.Uri modelUri = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?), string stage = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningModelVersionProperties MachineLearningModelVersionProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isArchived = default(bool?), bool? isAnonymous = default(bool?), System.Collections.Generic.IDictionary flavors = null, string modelType = null, System.Uri modelUri = null, string jobName = null, Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.RegistryAssetProvisioningState?), string stage = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeStateCounts MachineLearningNodeStateCounts(int? idleNodeCount = default(int?), int? runningNodeCount = default(int?), int? preparingNodeCount = default(int?), int? unusableNodeCount = default(int?), int? leavingNodeCount = default(int?), int? preemptedNodeCount = default(int?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNoneAuthTypeWorkspaceConnection MachineLearningNoneAuthTypeWorkspaceConnection(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, string error = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? peRequirement = default(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement?), Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? peStatus = default(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus?), System.Collections.Generic.IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = default(bool?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNoneAuthTypeWorkspaceConnection MachineLearningNoneAuthTypeWorkspaceConnection(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), string target = null, System.Collections.Generic.IDictionary metadata = null, System.Collections.Generic.IEnumerable sharedUserList = null, string value = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? valueFormat = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookPreparationError MachineLearningNotebookPreparationError(string errorMessage = null, int? statusCode = default(int?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookResourceInfo MachineLearningNotebookResourceInfo(string fqdn = null, bool? isPrivateLinkEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookPreparationError notebookPreparationError = null, string resourceId = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.MachineLearningOnlineDeploymentData MachineLearningOnlineDeploymentData(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.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineDeploymentProperties properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineDeploymentProperties MachineLearningOnlineDeploymentProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IDictionary properties = null, bool? appInsightsEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.DataCollector dataCollector = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType?), string endpointComputeType = null, string instanceType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings readinessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineRequestSettings requestSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings scaleSettings = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.MachineLearningOnlineEndpointData MachineLearningOnlineEndpointData(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.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineEndpointProperties properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineEndpointProperties MachineLearningOnlineEndpointProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode), string description = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthKeys keys = null, System.Collections.Generic.IDictionary properties = null, System.Uri scoringUri = null, System.Uri swaggerUri = null, string compute = null, System.Collections.Generic.IDictionary mirrorTraffic = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType? publicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType?), System.Collections.Generic.IDictionary traffic = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOutboundRule MachineLearningOutboundRule(Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory? category = default(Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory?), System.Collections.Generic.IEnumerable parentRuleNames = null, Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus? status = default(Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus?), string outboundRuleType = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookResourceInfo MachineLearningNotebookResourceInfo(string fqdn = null, string resourceId = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookPreparationError notebookPreparationError = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningOnlineDeploymentData MachineLearningOnlineDeploymentData(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.MachineLearning.Models.MachineLearningOnlineDeploymentProperties properties = null, string kind = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineDeploymentProperties MachineLearningOnlineDeploymentProperties(string description = null, System.Collections.Generic.IDictionary properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration codeConfiguration = null, string environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, string endpointComputeType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings scaleSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineRequestSettings requestSettings = null, string modelMountPath = null, bool? appInsightsEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings livenessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings readinessProbe = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState?), string instanceType = null, string model = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType?), Azure.ResourceManager.MachineLearning.Models.DataCollector dataCollector = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningOnlineEndpointData MachineLearningOnlineEndpointData(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.MachineLearning.Models.MachineLearningOnlineEndpointProperties properties = null, string kind = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineEndpointProperties MachineLearningOnlineEndpointProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Uri scoringUri = null, System.Uri swaggerUri = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode), Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthKeys keys = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState?), string compute = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType? publicNetworkAccess = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType?), System.Collections.Generic.IDictionary traffic = null, System.Collections.Generic.IDictionary mirrorTraffic = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningOutboundRuleBasicData MachineLearningOutboundRuleBasicData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOutboundRule properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPasswordDetail MachineLearningPasswordDetail(string name = null, string value = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPatAuthTypeWorkspaceConnection MachineLearningPatAuthTypeWorkspaceConnection(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, string error = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? peRequirement = default(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement?), Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? peStatus = default(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus?), System.Collections.Generic.IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = default(bool?), string credentialsPat = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPipelineJob MachineLearningPipelineJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), System.Collections.Generic.IDictionary inputs = null, System.Collections.Generic.IDictionary jobs = null, System.Collections.Generic.IDictionary outputs = null, System.BinaryData settings = null, Azure.Core.ResourceIdentifier sourceJobId = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpoint MachineLearningPrivateEndpoint(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier subnetArmId = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.MachineLearningPrivateEndpointConnectionData MachineLearningPrivateEndpointConnectionData(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.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpoint privateEndpoint = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpointConnectionProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPatAuthTypeWorkspaceConnection MachineLearningPatAuthTypeWorkspaceConnection(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), string target = null, System.Collections.Generic.IDictionary metadata = null, System.Collections.Generic.IEnumerable sharedUserList = null, string value = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? valueFormat = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat?), string credentialsPat = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPipelineJob MachineLearningPipelineJob(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string displayName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), string experimentName = null, System.Collections.Generic.IDictionary services = null, Azure.Core.ResourceIdentifier computeId = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, Azure.Core.ResourceIdentifier componentId = null, Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.BinaryData settings = null, System.Collections.Generic.IDictionary jobs = null, System.Collections.Generic.IDictionary inputs = null, System.Collections.Generic.IDictionary outputs = null, Azure.Core.ResourceIdentifier sourceJobId = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningPrivateEndpointConnectionData MachineLearningPrivateEndpointConnectionData(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.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, Azure.Core.ResourceIdentifier subResourceId = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpointConnectionProvisioningState?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateLinkResource MachineLearningPrivateLinkResource(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.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, string groupId = null, System.Collections.Generic.IEnumerable requiredMembers = null, System.Collections.Generic.IEnumerable requiredZoneNames = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.MachineLearningRegistryData MachineLearningRegistryData(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.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, System.Uri discoveryUri = null, string intellectualPropertyPublisher = null, Azure.Core.ResourceIdentifier managedResourceId = null, System.Collections.Generic.IEnumerable managedResourceGroupAssignedIdentities = null, System.Uri mlFlowRegistryUri = null, System.Collections.Generic.IEnumerable registryPrivateEndpointConnections = null, string publicNetworkAccess = null, System.Collections.Generic.IEnumerable regionDetails = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningRegistryData MachineLearningRegistryData(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.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, System.Uri discoveryUri = null, string intellectualPropertyPublisher = null, Azure.Core.ResourceIdentifier managedResourceId = null, System.Uri mlFlowRegistryUri = null, System.Collections.Generic.IEnumerable registryPrivateEndpointConnections = null, string publicNetworkAccess = null, System.Collections.Generic.IEnumerable regionDetails = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceName MachineLearningResourceName(string value = null, string localizedValue = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceQuota MachineLearningResourceQuota(string id = null, string amlWorkspaceLocation = null, string resourceQuotaType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceName name = null, long? limit = default(long?), Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit? unit = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSasAuthTypeWorkspaceConnection MachineLearningSasAuthTypeWorkspaceConnection(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, string error = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? peRequirement = default(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement?), Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? peStatus = default(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus?), System.Collections.Generic.IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = default(bool?), string credentialsSas = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSasAuthTypeWorkspaceConnection MachineLearningSasAuthTypeWorkspaceConnection(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), string target = null, System.Collections.Generic.IDictionary metadata = null, System.Collections.Generic.IEnumerable sharedUserList = null, string value = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? valueFormat = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat?), string credentialsSas = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningScheduleData MachineLearningScheduleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProperties MachineLearningScheduleProperties(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleAction action = null, string displayName = null, bool? isEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerBase trigger = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuCapacity MachineLearningSkuCapacity(int? @default = default(int?), int? maximum = default(int?), int? minimum = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType? scaleType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuDetail MachineLearningSkuDetail(Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuCapacity capacity = null, string resourceType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuSetting sku = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProperties MachineLearningScheduleProperties(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string displayName = null, bool? isEnabled = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerBase trigger = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleAction action = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuCapacity MachineLearningSkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? @default = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType? scaleType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuDetail MachineLearningSkuDetail(string resourceType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuSetting sku = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuCapacity capacity = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuSetting MachineLearningSkuSetting(string name = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuTier? tier = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuTier?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSweepJob MachineLearningSweepJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy earlyTermination = null, System.Collections.Generic.IDictionary inputs = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSweepJobLimits limits = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningObjective objective = null, System.Collections.Generic.IDictionary outputs = null, Azure.ResourceManager.MachineLearning.Models.JobTier? queueJobTier = default(Azure.ResourceManager.MachineLearning.Models.JobTier?), Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm samplingAlgorithm = null, System.BinaryData searchSpace = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTrialComponent trial = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSweepJob MachineLearningSweepJob(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string displayName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), string experimentName = null, System.Collections.Generic.IDictionary services = null, Azure.Core.ResourceIdentifier computeId = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, Azure.Core.ResourceIdentifier componentId = null, Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.BinaryData searchSpace = null, Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm samplingAlgorithm = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSweepJobLimits limits = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy earlyTermination = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningObjective objective = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTrialComponent trial = null, System.Collections.Generic.IDictionary inputs = null, System.Collections.Generic.IDictionary outputs = null, Azure.ResourceManager.MachineLearning.Models.JobTier? queueJobTier = default(Azure.ResourceManager.MachineLearning.Models.JobTier?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSynapseSpark MachineLearningSynapseSpark(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningSynapseSparkProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUsage MachineLearningUsage(string id = null, string amlWorkspaceLocation = null, string usageType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageUnit? unit = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageUnit?), long? currentValue = default(long?), long? limit = default(long?), Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageName name = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageName MachineLearningUsageName(string value = null, string localizedValue = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUserFeature MachineLearningUserFeature(string id = null, string displayName = null, string description = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUsernamePasswordAuthTypeWorkspaceConnection MachineLearningUsernamePasswordAuthTypeWorkspaceConnection(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, string error = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? peRequirement = default(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement?), Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? peStatus = default(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus?), System.Collections.Generic.IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionUsernamePassword credentials = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUsernamePasswordAuthTypeWorkspaceConnection MachineLearningUsernamePasswordAuthTypeWorkspaceConnection(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), string target = null, System.Collections.Generic.IDictionary metadata = null, System.Collections.Generic.IEnumerable sharedUserList = null, string value = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? valueFormat = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat?), Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionUsernamePassword credentials = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningVirtualMachineCompute MachineLearningVirtualMachineCompute(string computeLocation = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), string description = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier resourceId = null, System.Collections.Generic.IEnumerable provisioningErrors = null, bool? isAttachedCompute = default(bool?), bool? disableLocalAuth = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningVirtualMachineProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningVirtualMachineSecrets MachineLearningVirtualMachineSecrets(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmSshCredentials administratorAccount = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningVmSize MachineLearningVmSize(string name = null, string family = null, int? vCpus = default(int?), int? gpus = default(int?), int? osVhdSizeMB = default(int?), int? maxResourceVolumeMB = default(int?), double? memoryGB = default(double?), bool? lowPriorityCapable = default(bool?), bool? isPremiumIOSupported = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEstimatedVmPrices estimatedVmPrices = null, System.Collections.Generic.IEnumerable supportedComputeTypes = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionData MachineLearningWorkspaceConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties MachineLearningWorkspaceConnectionProperties(string authType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, string error = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? peRequirement = default(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement?), Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? peStatus = default(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus?), System.Collections.Generic.IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = default(bool?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceData MachineLearningWorkspaceData(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.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, bool? allowPublicAccessWhenBehindVnet = default(bool?), bool? allowRoleAssignmentOnRG = default(bool?), string applicationInsights = null, System.Collections.Generic.IEnumerable associatedWorkspaces = null, System.Collections.Generic.IEnumerable containerRegistries = null, string containerRegistry = null, string description = null, System.Uri discoveryUri = null, bool? enableDataIsolation = default(bool?), bool? enableServiceSideCMKEncryption = default(bool?), bool? enableSimplifiedCmk = default(bool?), bool? enableSoftwareBillOfMaterials = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionSetting encryption = null, System.Collections.Generic.IEnumerable existingWorkspaces = null, Azure.ResourceManager.MachineLearning.Models.FeatureStoreSettings featureStoreSettings = null, string friendlyName = null, bool? isHbiWorkspace = default(bool?), Azure.Core.ResourceIdentifier hubResourceId = null, string imageBuildCompute = null, System.Collections.Generic.IEnumerable ipAllowlist = null, string keyVault = null, System.Collections.Generic.IEnumerable keyVaults = null, Azure.ResourceManager.MachineLearning.Models.ManagedNetworkSettings managedNetwork = null, System.Uri mlFlowTrackingUri = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookResourceInfo notebookInfo = null, string primaryUserAssignedIdentity = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, int? privateLinkCount = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType? publicNetworkAccessType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType?), Azure.ResourceManager.MachineLearning.Models.ServerlessComputeSettings serverlessComputeSettings = null, int? cosmosDbCollectionsThroughput = default(int?), string serviceProvisionedResourceGroup = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, int? softDeleteRetentionInDays = default(int?), string storageAccount = null, System.Collections.Generic.IEnumerable storageAccounts = null, bool? isStorageHnsEnabled = default(bool?), string systemDatastoresAuthMode = null, System.Guid? tenantId = default(System.Guid?), bool? isV1LegacyMode = default(bool?), Azure.ResourceManager.MachineLearning.Models.WorkspaceHubConfig workspaceHubConfig = null, string workspaceId = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties MachineLearningWorkspaceConnectionProperties(string authType = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), string target = null, System.Collections.Generic.IDictionary metadata = null, System.Collections.Generic.IEnumerable sharedUserList = null, string value = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? valueFormat = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceData MachineLearningWorkspaceData(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.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null, string workspaceId = null, string description = null, string friendlyName = null, string keyVault = null, string applicationInsights = null, string containerRegistry = null, string storageAccount = null, System.Uri discoveryUri = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionSetting encryption = null, bool? isHbiWorkspace = default(bool?), string serviceProvisionedResourceGroup = null, int? privateLinkCount = default(int?), string imageBuildCompute = null, bool? allowPublicAccessWhenBehindVnet = default(bool?), Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess? publicNetworkAccessType = default(Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess?), System.Collections.Generic.IEnumerable privateEndpointConnections = null, Azure.ResourceManager.MachineLearning.Models.ServerlessComputeSettings serverlessComputeSettings = null, System.Collections.Generic.IEnumerable sharedPrivateLinkResources = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookResourceInfo notebookInfo = null, int? cosmosDbCollectionsThroughput = default(int?), string primaryUserAssignedIdentity = null, System.Guid? tenantId = default(System.Guid?), bool? isStorageHnsEnabled = default(bool?), System.Uri mlFlowTrackingUri = null, bool? isV1LegacyMode = default(bool?), Azure.ResourceManager.MachineLearning.Models.ManagedNetworkSettings managedNetwork = null, Azure.ResourceManager.MachineLearning.Models.FeatureStoreSettings featureStoreSettings = null, System.Collections.Generic.IEnumerable associatedWorkspaces = null, bool? enableDataIsolation = default(bool?), Azure.Core.ResourceIdentifier hubResourceId = null, Azure.ResourceManager.MachineLearning.Models.WorkspaceHubConfig workspaceHubConfig = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceDiagnoseResult MachineLearningWorkspaceDiagnoseResult(Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultValue value = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceGetKeysResult MachineLearningWorkspaceGetKeysResult(string appInsightsInstrumentationKey = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerRegistryCredentials containerRegistryCredentials = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys = null, string userStorageResourceId = null, string userStorageKey = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceGetKeysResult MachineLearningWorkspaceGetKeysResult(string userStorageKey = null, string userStorageResourceId = null, string appInsightsInstrumentationKey = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerRegistryCredentials containerRegistryCredentials = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceGetNotebookKeysResult MachineLearningWorkspaceGetNotebookKeysResult(string primaryAccessKey = null, string secondaryAccessKey = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceGetStorageAccountKeysResult MachineLearningWorkspaceGetStorageAccountKeysResult(string userStorageKey = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceNotebookAccessTokenResult MachineLearningWorkspaceNotebookAccessTokenResult(string accessToken = null, int? expiresIn = default(int?), string hostName = null, string notebookResourceId = null, string publicDns = null, string refreshToken = null, string scope = null, string tokenType = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceNotebookAccessTokenResult MachineLearningWorkspaceNotebookAccessTokenResult(string notebookResourceId = null, string hostName = null, string publicDns = null, string accessToken = null, string tokenType = null, int? expiresIn = default(int?), string refreshToken = null, string scope = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaUpdate MachineLearningWorkspaceQuotaUpdate(string id = null, string updateWorkspaceQuotasType = null, long? limit = default(long?), Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit? unit = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit?), Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ManagedIdentityCredential ManagedIdentityCredential(string managedIdentityType = null, string userManagedIdentityClientId = null, string userManagedIdentityPrincipalId = null, string userManagedIdentityResourceId = null, string userManagedIdentityTenantId = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ManagedNetworkSettings ManagedNetworkSettings(Azure.ResourceManager.MachineLearning.Models.IsolationMode? isolationMode = default(Azure.ResourceManager.MachineLearning.Models.IsolationMode?), string networkId = null, System.Collections.Generic.IDictionary outboundRules = null, Azure.ResourceManager.MachineLearning.Models.ManagedNetworkProvisionStatus status = null, System.Collections.Generic.IEnumerable changeableIsolationModes = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ManagedOnlineEndpointDeploymentResourceProperties ManagedOnlineEndpointDeploymentResourceProperties(string failureReason = null, Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType? endpointComputeType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType?), string model = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ManagedOnlineEndpointResourceProperties ManagedOnlineEndpointResourceProperties(Azure.Core.ResourceIdentifier associatedResourceId = null, System.Collections.Generic.IEnumerable deployments = null, System.Uri endpointUri = null, string failureReason = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string name = null, Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState?), bool? shouldCreateAiServicesEndpoint = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode? authMode = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode?), string compute = null, string description = null, System.Collections.Generic.IDictionary mirrorTraffic = null, System.Uri scoringUri = null, System.Collections.Generic.IDictionary traffic = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ManagedResourceGroupAssignedIdentities ManagedResourceGroupAssignedIdentities(System.Guid? principalId = default(System.Guid?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MarketplacePlan MarketplacePlan(string offerId = null, string planId = null, string publisherId = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ManagedIdentityCredential ManagedIdentityCredential(string managedIdentityType = null, string userManagedIdentityResourceId = null, string userManagedIdentityClientId = null, string userManagedIdentityPrincipalId = null, string userManagedIdentityTenantId = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ManagedNetworkSettings ManagedNetworkSettings(Azure.ResourceManager.MachineLearning.Models.IsolationMode? isolationMode = default(Azure.ResourceManager.MachineLearning.Models.IsolationMode?), string networkId = null, System.Collections.Generic.IDictionary outboundRules = null, Azure.ResourceManager.MachineLearning.Models.ManagedNetworkProvisionStatus status = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MarketplacePlan MarketplacePlan(string publisherId = null, string offerId = null, string planId = null) { throw null; } public static Azure.ResourceManager.MachineLearning.MarketplaceSubscriptionData MarketplaceSubscriptionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.MarketplaceSubscriptionProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MarketplaceSubscriptionProperties MarketplaceSubscriptionProperties(Azure.ResourceManager.MachineLearning.Models.MarketplacePlan marketplacePlan = null, Azure.ResourceManager.MachineLearning.Models.MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.MachineLearning.Models.MarketplaceSubscriptionStatus?), string modelId = null, Azure.ResourceManager.MachineLearning.Models.MarketplaceSubscriptionProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MarketplaceSubscriptionProvisioningState?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.OAuth2AuthTypeWorkspaceConnectionProperties OAuth2AuthTypeWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, string error = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? peRequirement = default(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement?), Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? peStatus = default(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus?), System.Collections.Generic.IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = default(bool?), Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionOAuth2 credentials = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.OneLakeDatastore OneLakeDatastore(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, bool? isDefault = default(bool?), Azure.ResourceManager.MachineLearning.Models.OneLakeArtifact artifact = null, string endpoint = null, string oneLakeWorkspaceName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.OpenAIEndpointDeploymentResourceProperties OpenAIEndpointDeploymentResourceProperties(string failureReason = null, Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState?), Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentModel model = null, string raiPolicyName = null, Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption? versionUpgradeOption = default(Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.OpenAIEndpointResourceProperties OpenAIEndpointResourceProperties(Azure.Core.ResourceIdentifier associatedResourceId = null, System.Collections.Generic.IEnumerable deployments = null, System.Uri endpointUri = null, string failureReason = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string name = null, Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState?), bool? shouldCreateAiServicesEndpoint = default(bool?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.OSPatchingStatus OSPatchingStatus(Azure.ResourceManager.MachineLearning.Models.PatchStatus? patchStatus = default(Azure.ResourceManager.MachineLearning.Models.PatchStatus?), System.DateTimeOffset? latestPatchOn = default(System.DateTimeOffset?), bool? rebootPending = default(bool?), System.DateTimeOffset? scheduledRebootOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable osPatchingErrors = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MarketplaceSubscriptionProperties MarketplaceSubscriptionProperties(string modelId = null, Azure.ResourceManager.MachineLearning.Models.MarketplacePlan marketplacePlan = null, Azure.ResourceManager.MachineLearning.Models.MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.MachineLearning.Models.MarketplaceSubscriptionStatus?), Azure.ResourceManager.MachineLearning.Models.MarketplaceSubscriptionProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MarketplaceSubscriptionProvisioningState?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.OAuth2AuthTypeWorkspaceConnectionProperties OAuth2AuthTypeWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), string target = null, System.Collections.Generic.IDictionary metadata = null, System.Collections.Generic.IEnumerable sharedUserList = null, string value = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? valueFormat = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat?), Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionOAuth2 credentials = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.OneLakeDatastore OneLakeDatastore(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, bool? isDefault = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials = null, Azure.ResourceManager.MachineLearning.Models.OneLakeArtifact artifact = null, string oneLakeWorkspaceName = null, string endpoint = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.PendingUploadResponseDto PendingUploadResponseDto(Azure.ResourceManager.MachineLearning.Models.BlobReferenceForConsumptionDto blobReferenceForConsumption = null, string pendingUploadId = null, Azure.ResourceManager.MachineLearning.Models.PendingUploadType? pendingUploadType = default(Azure.ResourceManager.MachineLearning.Models.PendingUploadType?)) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.PrivateEndpointBase PrivateEndpointBase(Azure.Core.ResourceIdentifier id = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.PrivateEndpointOutboundRule PrivateEndpointOutboundRule(Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory? category = default(Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory?), System.Collections.Generic.IEnumerable parentRuleNames = null, Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus? status = default(Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus?), Azure.ResourceManager.MachineLearning.Models.PrivateEndpointDestination destination = null, System.Collections.Generic.IEnumerable fqdns = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.RaiBlocklistItemPropertiesBasicResourceData RaiBlocklistItemPropertiesBasicResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.RaiBlocklistItemProperties properties = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.RaiBlocklistPropertiesBasicResourceData RaiBlocklistPropertiesBasicResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string raiBlocklistDescription = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.RaiPolicyPropertiesBasicResourceData RaiPolicyPropertiesBasicResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.MachineLearning.Models.RaiPolicyProperties properties = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.RegistryPrivateEndpoint RegistryPrivateEndpoint(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier subnetArmId = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.SasCredential SasCredential(System.Uri sasUri = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.SasCredentialDto SasCredentialDto(System.Uri sasUri = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.ServerlessEndpointData ServerlessEndpointData(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.Models.ManagedServiceIdentity identity = null, string kind = null, Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointProperties properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointInferenceEndpoint ServerlessEndpointInferenceEndpoint(System.Collections.Generic.IReadOnlyDictionary headers = null, System.Uri uri = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointProperties ServerlessEndpointProperties(Azure.ResourceManager.MachineLearning.Models.ServerlessInferenceEndpointAuthMode authMode = default(Azure.ResourceManager.MachineLearning.Models.ServerlessInferenceEndpointAuthMode), Azure.ResourceManager.MachineLearning.Models.ContentSafetyStatus? contentSafetyStatus = default(Azure.ResourceManager.MachineLearning.Models.ContentSafetyStatus?), Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointState? endpointState = default(Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointState?), Azure.ResourceManager.MachineLearning.Models.ServerlessInferenceEndpoint inferenceEndpoint = null, string marketplaceSubscriptionId = null, string modelId = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointResourceProperties ServerlessEndpointResourceProperties(Azure.Core.ResourceIdentifier associatedResourceId = null, System.Collections.Generic.IEnumerable deployments = null, System.Uri endpointUri = null, string failureReason = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string name = null, Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState?), bool? shouldCreateAiServicesEndpoint = default(bool?), Azure.ResourceManager.MachineLearning.Models.ServerlessInferenceEndpointAuthMode? authMode = default(Azure.ResourceManager.MachineLearning.Models.ServerlessInferenceEndpointAuthMode?), Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointCapacityReservation capacityReservation = null, Azure.ResourceManager.MachineLearning.Models.ContentSafetyStatus? contentSafetyStatus = default(Azure.ResourceManager.MachineLearning.Models.ContentSafetyStatus?), Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointState? endpointState = default(Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointState?), Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointInferenceEndpoint inferenceEndpoint = null, string marketplaceSubscriptionId = null, System.BinaryData metadata = null, string modelId = null, Azure.ResourceManager.MachineLearning.Models.ServerlessOffer offer = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ServerlessInferenceEndpoint ServerlessInferenceEndpoint(System.Collections.Generic.IReadOnlyDictionary headers = null, System.Uri uri = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ServicePrincipalAuthTypeWorkspaceConnectionProperties ServicePrincipalAuthTypeWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, string error = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? peRequirement = default(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement?), Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? peStatus = default(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus?), System.Collections.Generic.IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = default(bool?), Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionServicePrincipal credentials = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.ServerlessEndpointData ServerlessEndpointData(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.MachineLearning.Models.ServerlessEndpointProperties properties = null, string kind = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningSku sku = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointProperties ServerlessEndpointProperties(string modelId = null, Azure.ResourceManager.MachineLearning.Models.ServerlessInferenceEndpointAuthMode authMode = default(Azure.ResourceManager.MachineLearning.Models.ServerlessInferenceEndpointAuthMode), Azure.ResourceManager.MachineLearning.Models.ServerlessInferenceEndpoint inferenceEndpoint = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState?), Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointState? endpointState = default(Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointState?), string marketplaceSubscriptionId = null, Azure.ResourceManager.MachineLearning.Models.ContentSafetyStatus? contentSafetyStatus = default(Azure.ResourceManager.MachineLearning.Models.ContentSafetyStatus?)) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ServerlessInferenceEndpoint ServerlessInferenceEndpoint(System.Uri uri = null, System.Collections.Generic.IReadOnlyDictionary headers = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ServicePrincipalAuthTypeWorkspaceConnectionProperties ServicePrincipalAuthTypeWorkspaceConnectionProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? category = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory?), Azure.Core.ResourceIdentifier createdByWorkspaceArmId = null, System.DateTimeOffset? expiryOn = default(System.DateTimeOffset?), Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? group = default(Azure.ResourceManager.MachineLearning.Models.ConnectionGroup?), bool? isSharedToAll = default(bool?), string target = null, System.Collections.Generic.IDictionary metadata = null, System.Collections.Generic.IEnumerable sharedUserList = null, string value = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? valueFormat = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat?), Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionServicePrincipal credentials = null) { throw null; } public static Azure.ResourceManager.MachineLearning.Models.ServiceTagDestination ServiceTagDestination(Azure.ResourceManager.MachineLearning.Models.NetworkingRuleAction? action = default(Azure.ResourceManager.MachineLearning.Models.NetworkingRuleAction?), System.Collections.Generic.IEnumerable addressPrefixes = null, string portRanges = null, string protocol = null, string serviceTag = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ServiceTagOutboundRule ServiceTagOutboundRule(Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory? category = default(Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory?), System.Collections.Generic.IEnumerable parentRuleNames = null, Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus? status = default(Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus?), Azure.ResourceManager.MachineLearning.Models.ServiceTagDestination destination = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.SparkJob SparkJob(string description = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.ResourceIdentifier componentId = null, Azure.Core.ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, System.Collections.Generic.IDictionary services = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), System.Collections.Generic.IEnumerable archives = null, string args = null, Azure.Core.ResourceIdentifier codeId = null, System.Collections.Generic.IDictionary conf = null, Azure.ResourceManager.MachineLearning.Models.SparkJobEntry entry = null, Azure.Core.ResourceIdentifier environmentId = null, System.Collections.Generic.IDictionary environmentVariables = null, System.Collections.Generic.IEnumerable files = null, System.Collections.Generic.IDictionary inputs = null, System.Collections.Generic.IEnumerable jars = null, System.Collections.Generic.IDictionary outputs = null, System.Collections.Generic.IEnumerable pyFiles = null, Azure.ResourceManager.MachineLearning.Models.JobTier? queueJobTier = default(Azure.ResourceManager.MachineLearning.Models.JobTier?), Azure.ResourceManager.MachineLearning.Models.SparkResourceConfiguration resources = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.SpeechEndpointDeploymentResourceProperties SpeechEndpointDeploymentResourceProperties(string failureReason = null, Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState?), Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentModel model = null, string raiPolicyName = null, Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption? versionUpgradeOption = default(Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.SpeechEndpointResourceProperties SpeechEndpointResourceProperties(Azure.Core.ResourceIdentifier associatedResourceId = null, System.Collections.Generic.IEnumerable deployments = null, System.Uri endpointUri = null, string failureReason = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string name = null, Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState? provisioningState = default(Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState?), bool? shouldCreateAiServicesEndpoint = default(bool?)) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.TextClassificationMultilabel TextClassificationMultilabel(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity? logVerbosity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity?), string targetColumnName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData = null, Azure.ResourceManager.MachineLearning.Models.ClassificationMultilabelPrimaryMetric? primaryMetric = default(Azure.ResourceManager.MachineLearning.Models.ClassificationMultilabelPrimaryMetric?), string featurizationDatasetLanguage = null, Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings limitSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput validationData = null) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.TextNer TextNer(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity? logVerbosity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity?), string targetColumnName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData = null, Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric? primaryMetric = default(Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric?), string featurizationDatasetLanguage = null, Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings limitSettings = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput validationData = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.SparkJob SparkJob(string description = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string displayName = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? status = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus?), string experimentName = null, System.Collections.Generic.IDictionary services = null, Azure.Core.ResourceIdentifier computeId = null, bool? isArchived = default(bool?), Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration identity = null, Azure.Core.ResourceIdentifier componentId = null, Azure.ResourceManager.MachineLearning.Models.NotificationSetting notificationSetting = null, Azure.ResourceManager.MachineLearning.Models.SparkResourceConfiguration resources = null, string args = null, Azure.Core.ResourceIdentifier codeId = null, Azure.ResourceManager.MachineLearning.Models.SparkJobEntry entry = null, Azure.Core.ResourceIdentifier environmentId = null, System.Collections.Generic.IDictionary inputs = null, System.Collections.Generic.IDictionary outputs = null, System.Collections.Generic.IEnumerable pyFiles = null, System.Collections.Generic.IEnumerable jars = null, System.Collections.Generic.IEnumerable files = null, System.Collections.Generic.IEnumerable archives = null, System.Collections.Generic.IDictionary conf = null, Azure.ResourceManager.MachineLearning.Models.JobTier? queueJobTier = default(Azure.ResourceManager.MachineLearning.Models.JobTier?), System.Collections.Generic.IDictionary environmentVariables = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.TextClassificationMultilabel TextClassificationMultilabel(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity? logVerbosity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity?), Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData = null, string targetColumnName = null, Azure.ResourceManager.MachineLearning.Models.ClassificationMultilabelPrimaryMetric? primaryMetric = default(Azure.ResourceManager.MachineLearning.Models.ClassificationMultilabelPrimaryMetric?), Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings limitSettings = null, string featurizationDatasetLanguage = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput validationData = null) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.TextNer TextNer(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity? logVerbosity = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity?), Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData = null, string targetColumnName = null, Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric? primaryMetric = default(Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric?), Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings limitSettings = null, string featurizationDatasetLanguage = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput validationData = null) { throw null; } } public partial class AutoForecastHorizon : Azure.ResourceManager.MachineLearning.Models.ForecastHorizon, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -3123,28 +2670,6 @@ public AzureDevOpsWebhook() { } 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 AzureOpenAiFineTuning : Azure.ResourceManager.MachineLearning.Models.FineTuningVertical, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AzureOpenAiFineTuning(Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType taskType, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput trainingData, Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowModelJobInput model) : base (default(Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType), default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput), default(Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowModelJobInput)) { } - public Azure.ResourceManager.MachineLearning.Models.AzureOpenAiHyperParameters HyperParameters { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.AzureOpenAiFineTuning 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.MachineLearning.Models.AzureOpenAiFineTuning 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 AzureOpenAiHyperParameters : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AzureOpenAiHyperParameters() { } - public int? BatchSize { get { throw null; } set { } } - public double? LearningRateMultiplier { get { throw null; } set { } } - public int? NEpochs { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.AzureOpenAiHyperParameters 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.MachineLearning.Models.AzureOpenAiHyperParameters 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 BanditPolicy : Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BanditPolicy() { } @@ -3566,27 +3091,6 @@ public ContainerEndpoint() { } 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 ContentSafetyEndpointDeploymentResourceProperties : Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentResourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContentSafetyEndpointDeploymentResourceProperties(Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentModel model) { } - public Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentModel Model { get { throw null; } set { } } - public string RaiPolicyName { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption? VersionUpgradeOption { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.ContentSafetyEndpointDeploymentResourceProperties 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.MachineLearning.Models.ContentSafetyEndpointDeploymentResourceProperties 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 ContentSafetyEndpointResourceProperties : Azure.ResourceManager.MachineLearning.Models.EndpointResourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ContentSafetyEndpointResourceProperties() { } - Azure.ResourceManager.MachineLearning.Models.ContentSafetyEndpointResourceProperties 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.MachineLearning.Models.ContentSafetyEndpointResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ContentSafetyStatus : System.IEquatable { @@ -3656,16 +3160,6 @@ public CustomMetricThreshold(string metric) { } 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 CustomModelFineTuning : Azure.ResourceManager.MachineLearning.Models.FineTuningVertical, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomModelFineTuning(Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType taskType, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput trainingData, Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowModelJobInput model) : base (default(Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType), default(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput), default(Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowModelJobInput)) { } - public System.Collections.Generic.IDictionary HyperParameters { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.CustomModelFineTuning 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.MachineLearning.Models.CustomModelFineTuning 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 CustomMonitoringSignal : Azure.ResourceManager.MachineLearning.Models.MonitoringSignalBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomMonitoringSignal(string componentId, System.Collections.Generic.IEnumerable metricThresholds) { } @@ -3707,7 +3201,6 @@ public CustomService() { } public System.Collections.Generic.IList Endpoints { get { throw null; } } public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.ImageSetting Image { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.JupyterKernelConfig Kernel { get { throw null; } set { } } public string Name { get { throw null; } set { } } public System.Collections.Generic.IList Volumes { get { throw null; } } Azure.ResourceManager.MachineLearning.Models.CustomService System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3858,51 +3351,6 @@ protected DataReferenceCredential() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DefaultResourceProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DefaultResourceProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState Accepted { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState Disabled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState NotStarted { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState Scaling { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState 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.MachineLearning.Models.DefaultResourceProvisioningState left, Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState left, Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DeploymentModelVersionUpgradeOption : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DeploymentModelVersionUpgradeOption(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption NoAutoUpgrade { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption OnceCurrentVersionExpired { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption OnceNewDefaultVersionAvailable { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption 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.MachineLearning.Models.DeploymentModelVersionUpgradeOption left, Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption left, Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption right) { throw null; } - public override string ToString() { throw null; } - } public partial class DestinationAsset : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DestinationAsset() { } @@ -3977,172 +3425,24 @@ public EncryptionUpdateProperties(string keyIdentifier) { } 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 EndpointDeploymentModel : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public EndpointDeploymentModel() { } - public string Format { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public string Source { get { throw null; } set { } } - public string Version { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentModel 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.MachineLearning.Models.EndpointDeploymentModel 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 abstract partial class EndpointDeploymentResourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected EndpointDeploymentResourceProperties() { } - public string FailureReason { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState? ProvisioningState { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentResourceProperties 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.MachineLearning.Models.EndpointDeploymentResourceProperties 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 EndpointKeys : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal EndpointKeys() { } - public Azure.ResourceManager.MachineLearning.Models.AccountApiKeys Keys { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.EndpointKeys 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.MachineLearning.Models.EndpointKeys 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 EndpointModelDeprecationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal EndpointModelDeprecationProperties() { } - public System.DateTimeOffset? FineTune { get { throw null; } } - public System.DateTimeOffset? Inference { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.EndpointModelDeprecationProperties 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.MachineLearning.Models.EndpointModelDeprecationProperties 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 EndpointModelProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal EndpointModelProperties() { } - public System.Collections.Generic.IReadOnlyDictionary Capabilities { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.EndpointModelDeprecationProperties Deprecation { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary FinetuneCapabilities { get { throw null; } } - public string Format { get { throw null; } } - public bool? IsDefaultVersion { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ModelLifecycleStatus? LifecycleStatus { get { throw null; } } - public int? MaxCapacity { get { throw null; } } - public string Name { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Skus { get { throw null; } } - public Azure.ResourceManager.Models.SystemData SystemData { get { throw null; } } - public string Version { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.EndpointModelProperties 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.MachineLearning.Models.EndpointModelProperties 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 EndpointModelSkuCapacityProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal EndpointModelSkuCapacityProperties() { } - public int? Default { get { throw null; } } - public int? Maximum { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.EndpointModelSkuCapacityProperties 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.MachineLearning.Models.EndpointModelSkuCapacityProperties 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 EndpointModelSkuProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal EndpointModelSkuProperties() { } - public Azure.ResourceManager.MachineLearning.Models.EndpointModelSkuCapacityProperties Capacity { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ConnectionIds { get { throw null; } } - public System.DateTimeOffset? DeprecationOn { get { throw null; } } - public string Name { get { throw null; } } - public System.Collections.Generic.IReadOnlyList RateLimits { get { throw null; } } - public string UsageName { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.EndpointModelSkuProperties 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.MachineLearning.Models.EndpointModelSkuProperties 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 EndpointModelSkuRateLimitProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal EndpointModelSkuRateLimitProperties() { } - public float? Count { get { throw null; } } - public float? RenewalPeriod { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Rules { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.EndpointModelSkuRateLimitProperties 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.MachineLearning.Models.EndpointModelSkuRateLimitProperties 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 EndpointModelSkuRateLimitRulePatternProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal EndpointModelSkuRateLimitRulePatternProperties() { } - public string Method { get { throw null; } } - public string Path { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.EndpointModelSkuRateLimitRulePatternProperties 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.MachineLearning.Models.EndpointModelSkuRateLimitRulePatternProperties 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 EndpointModelSkuRateLimitRuleProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal EndpointModelSkuRateLimitRuleProperties() { } - public float? Count { get { throw null; } } - public bool? DynamicThrottlingEnabled { get { throw null; } } - public string Key { get { throw null; } } - public System.Collections.Generic.IReadOnlyList MatchPatterns { get { throw null; } } - public float? MinCount { get { throw null; } } - public float? RenewalPeriod { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.EndpointModelSkuRateLimitRuleProperties 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.MachineLearning.Models.EndpointModelSkuRateLimitRuleProperties 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 abstract partial class EndpointResourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected EndpointResourceProperties() { } - public Azure.Core.ResourceIdentifier AssociatedResourceId { get { throw null; } set { } } - public System.Collections.Generic.IList Deployments { get { throw null; } } - public System.Uri EndpointUri { get { throw null; } set { } } - public string FailureReason { get { throw null; } set { } } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.DefaultResourceProvisioningState? ProvisioningState { get { throw null; } } - public bool? ShouldCreateAiServicesEndpoint { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.EndpointResourceProperties 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.MachineLearning.Models.EndpointResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct EndpointType : System.IEquatable + public readonly partial struct EndpointServiceConnectionStatus : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EndpointType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointType AzureContentSafety { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointType AzureLlama { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointType AzureOpenAI { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointType AzureSpeech { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointType ManagedOnlineEndpoint { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointType ServerlessEndpoint { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.EndpointType other) { throw null; } + public EndpointServiceConnectionStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.EndpointServiceConnectionStatus Approved { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.EndpointServiceConnectionStatus Disconnected { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.EndpointServiceConnectionStatus Pending { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.EndpointServiceConnectionStatus Rejected { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.EndpointServiceConnectionStatus 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.MachineLearning.Models.EndpointType left, Azure.ResourceManager.MachineLearning.Models.EndpointType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.EndpointType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.EndpointType left, Azure.ResourceManager.MachineLearning.Models.EndpointType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.EndpointServiceConnectionStatus left, Azure.ResourceManager.MachineLearning.Models.EndpointServiceConnectionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.EndpointServiceConnectionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.EndpointServiceConnectionStatus left, Azure.ResourceManager.MachineLearning.Models.EndpointServiceConnectionStatus right) { throw null; } public override string ToString() { throw null; } } public partial class EnvironmentVariable : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -4176,7 +3476,7 @@ public EnvironmentVariable() { } } public partial class FeatureAttributionDriftMonitoringSignal : Azure.ResourceManager.MachineLearning.Models.MonitoringSignalBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FeatureAttributionDriftMonitoringSignal(Azure.ResourceManager.MachineLearning.Models.FeatureImportanceSettings featureImportanceSettings, Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetricThreshold metricThreshold, System.Collections.Generic.IEnumerable productionData, Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase referenceData) { } + public FeatureAttributionDriftMonitoringSignal(Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetricThreshold metricThreshold, Azure.ResourceManager.MachineLearning.Models.FeatureImportanceSettings featureImportanceSettings, System.Collections.Generic.IEnumerable productionData, Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase referenceData) { } public System.Collections.Generic.IDictionary FeatureDataTypeOverride { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.FeatureImportanceSettings FeatureImportanceSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.FeatureAttributionMetricThreshold MetricThreshold { get { throw null; } set { } } @@ -4330,59 +3630,6 @@ public FeatureWindow() { } 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 FineTuningJob : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public FineTuningJob(Azure.ResourceManager.MachineLearning.Models.FineTuningVertical fineTuningDetails, System.Collections.Generic.IDictionary outputs) { } - public Azure.ResourceManager.MachineLearning.Models.FineTuningVertical FineTuningDetails { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Outputs { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.JobTier? QueueJobTier { get { throw null; } set { } } - public System.Collections.Generic.IList ResourcesInstanceTypes { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.FineTuningJob 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.MachineLearning.Models.FineTuningJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct FineTuningTaskType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public FineTuningTaskType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType ChatCompletion { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType ImageClassification { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType ImageInstanceSegmentation { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType ImageObjectDetection { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType QuestionAnswering { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType TextClassification { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType TextCompletion { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType TextSummarization { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType TextTranslation { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType TokenClassification { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType VideoMultiObjectTracking { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType 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.MachineLearning.Models.FineTuningTaskType left, Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType left, Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType right) { throw null; } - public override string ToString() { throw null; } - } - public abstract partial class FineTuningVertical : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected FineTuningVertical(Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType taskType, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput trainingData, Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowModelJobInput model) { } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowModelJobInput Model { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.FineTuningTaskType TaskType { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput TrainingData { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput ValidationData { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.FineTuningVertical 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.MachineLearning.Models.FineTuningVertical 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 FixedInputData : Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FixedInputData(Azure.ResourceManager.MachineLearning.Models.JobInputType jobInputType, System.Uri uri) : base (default(Azure.ResourceManager.MachineLearning.Models.JobInputType), default(System.Uri)) { } @@ -4550,16 +3797,6 @@ public GridSamplingAlgorithm() { } 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 IdleShutdownSetting : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public IdleShutdownSetting() { } - public string IdleTimeBeforeShutdown { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.IdleShutdownSetting 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.MachineLearning.Models.IdleShutdownSetting 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 ImageClassification : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ImageClassification(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData, Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings limitSettings) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } @@ -4626,7 +3863,6 @@ internal ImageMetadata() { } public string CurrentImageVersion { get { throw null; } } public bool? IsLatestOSImageVersion { get { throw null; } } public string LatestImageVersion { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.OSPatchingStatus OSPatchingStatus { get { throw null; } } Azure.ResourceManager.MachineLearning.Models.ImageMetadata 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.MachineLearning.Models.ImageMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4803,7 +4039,6 @@ public ImageSetting() { } public System.Collections.Generic.IDictionary AdditionalProperties { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.ImageType? ImageType { get { throw null; } set { } } public string Reference { get { throw null; } set { } } - public string Version { get { throw null; } set { } } Azure.ResourceManager.MachineLearning.Models.ImageSetting 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.MachineLearning.Models.ImageSetting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4948,18 +4183,6 @@ protected JobNodes() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.JobTier left, Azure.ResourceManager.MachineLearning.Models.JobTier right) { throw null; } public override string ToString() { throw null; } } - public partial class JupyterKernelConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public JupyterKernelConfig() { } - public System.Collections.Generic.IList Argv { get { throw null; } } - public string DisplayName { get { throw null; } set { } } - public string Language { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.JupyterKernelConfig 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.MachineLearning.Models.JupyterKernelConfig 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 LakeHouseArtifact : Azure.ResourceManager.MachineLearning.Models.OneLakeArtifact, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LakeHouseArtifact(string artifactName) : base (default(string)) { } @@ -5192,7 +4415,7 @@ public MachineLearningAzureDataLakeGen1Datastore(Azure.ResourceManager.MachineLe } public partial class MachineLearningAzureDataLakeGen2Datastore : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public MachineLearningAzureDataLakeGen2Datastore(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials, string accountName, string filesystem) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials)) { } + public MachineLearningAzureDataLakeGen2Datastore(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials, string filesystem, string accountName) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials)) { } public string AccountName { get { throw null; } set { } } public string Endpoint { get { throw null; } set { } } public string Filesystem { get { throw null; } set { } } @@ -5363,6 +4586,7 @@ public MachineLearningBuildContext(System.Uri contextUri) { } public partial class MachineLearningCertificateDatastoreCredentials : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MachineLearningCertificateDatastoreCredentials(System.Guid clientId, Azure.ResourceManager.MachineLearning.Models.MachineLearningCertificateDatastoreSecrets secrets, System.Guid tenantId, string thumbprint) { } + public MachineLearningCertificateDatastoreCredentials(System.Guid tenantId, System.Guid clientId, string thumbprint, Azure.ResourceManager.MachineLearning.Models.MachineLearningCertificateDatastoreSecrets secrets) { } public System.Uri AuthorityUri { get { throw null; } set { } } public System.Guid ClientId { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } @@ -5607,17 +4831,16 @@ internal MachineLearningComputeInstanceDataDisk() { } } public partial class MachineLearningComputeInstanceDataMount : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public MachineLearningComputeInstanceDataMount() { } - public string CreatedBy { get { throw null; } set { } } - public string Error { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningMountAction? MountAction { get { throw null; } set { } } - public System.DateTimeOffset? MountedOn { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MountMode? MountMode { get { throw null; } set { } } - public string MountName { get { throw null; } set { } } - public string MountPath { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState? MountState { get { throw null; } set { } } - public string Source { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType? SourceType { get { throw null; } set { } } + internal MachineLearningComputeInstanceDataMount() { } + public string CreatedBy { get { throw null; } } + public string Error { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningMountAction? MountAction { get { throw null; } } + public System.DateTimeOffset? MountedOn { get { throw null; } } + public string MountName { get { throw null; } } + public string MountPath { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState? MountState { get { throw null; } } + public string Source { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType? SourceType { get { throw null; } } Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceDataMount 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.MachineLearning.Models.MachineLearningComputeInstanceDataMount System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5661,16 +4884,10 @@ public MachineLearningComputeInstanceProperties() { } public System.Collections.Generic.IReadOnlyList DataDisks { get { throw null; } } public System.Collections.Generic.IReadOnlyList DataMounts { get { throw null; } } public bool? EnableNodePublicIP { get { throw null; } set { } } - public bool? EnableOSPatching { get { throw null; } set { } } - public bool? EnableRootAccess { get { throw null; } set { } } - public bool? EnableSso { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string IdleTimeBeforeShutdown { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceLastOperation LastOperation { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger? MlflowAutologger { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ImageMetadata OSImageMetadata { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAssignedUser PersonalComputeInstanceAssignedUser { get { throw null; } set { } } - public bool? ReleaseQuotaOnStop { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList SchedulesComputeStartStop { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningScriptsToExecute Scripts { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceSshSettings SshSettings { get { throw null; } set { } } @@ -5707,7 +4924,6 @@ public MachineLearningComputeInstanceSshSettings() { } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState Creating { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState Deleting { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState JobRunning { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState Resizing { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState Restarting { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState Running { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState SettingUp { get { throw null; } } @@ -6343,9 +5559,7 @@ protected MachineLearningEarlyTerminationPolicy() { } } public partial class MachineLearningEncryptionKeyVaultProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public MachineLearningEncryptionKeyVaultProperties(Azure.Core.ResourceIdentifier keyVaultArmId, string keyIdentifier) { } - public MachineLearningEncryptionKeyVaultProperties(string keyIdentifier, Azure.Core.ResourceIdentifier keyVaultArmId) { } public string IdentityClientId { get { throw null; } set { } } public string KeyIdentifier { get { throw null; } set { } } public Azure.Core.ResourceIdentifier KeyVaultArmId { get { throw null; } set { } } @@ -6357,14 +5571,10 @@ public MachineLearningEncryptionKeyVaultProperties(string keyIdentifier, Azure.C } public partial class MachineLearningEncryptionSetting : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public MachineLearningEncryptionSetting(Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionKeyVaultProperties keyVaultProperties, Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus status) { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public MachineLearningEncryptionSetting(Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus status, Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionKeyVaultProperties keyVaultProperties) { } - public Azure.Core.ResourceIdentifier CosmosDBResourceId { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionKeyVaultProperties KeyVaultProperties { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier SearchAccountResourceId { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus Status { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier StorageAccountResourceId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionSetting 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) { } @@ -6776,24 +5986,6 @@ public MachineLearningFlavorData() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MachineLearningFlowAutoLogger : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MachineLearningFlowAutoLogger(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger Disabled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger 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.MachineLearning.Models.MachineLearningFlowAutoLogger left, Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger left, Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowAutoLogger right) { throw null; } - public override string ToString() { throw null; } - } public partial class MachineLearningFlowModelJobInput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MachineLearningFlowModelJobInput(System.Uri uri) { } @@ -7463,7 +6655,6 @@ public partial class MachineLearningNotebookResourceInfo : System.ClientModel.Pr { internal MachineLearningNotebookResourceInfo() { } public string Fqdn { get { throw null; } } - public bool? IsPrivateLinkEnabled { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookPreparationError NotebookPreparationError { get { throw null; } } public string ResourceId { get { throw null; } } Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookResourceInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7475,6 +6666,7 @@ internal MachineLearningNotebookResourceInfo() { } public partial class MachineLearningObjective : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MachineLearningObjective(Azure.ResourceManager.MachineLearning.Models.MachineLearningGoal goal, string primaryMetric) { } + public MachineLearningObjective(string primaryMetric, Azure.ResourceManager.MachineLearning.Models.MachineLearningGoal goal) { } public Azure.ResourceManager.MachineLearning.Models.MachineLearningGoal Goal { get { throw null; } set { } } public string PrimaryMetric { get { throw null; } set { } } Azure.ResourceManager.MachineLearning.Models.MachineLearningObjective System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7586,7 +6778,6 @@ protected MachineLearningOnlineScaleSettings() { } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName Create { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName Delete { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName Reimage { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName Resize { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName Restart { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName Start { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName Stop { get { throw null; } } @@ -7610,7 +6801,6 @@ protected MachineLearningOnlineScaleSettings() { } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus DeleteFailed { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus InProgress { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus ReimageFailed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus ResizeFailed { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus RestartFailed { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus StartFailed { get { throw null; } } public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus StopFailed { get { throw null; } } @@ -7686,7 +6876,6 @@ public abstract partial class MachineLearningOutboundRule : System.ClientModel.P { protected MachineLearningOutboundRule() { } public Azure.ResourceManager.MachineLearning.Models.OutboundRuleCategory? Category { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList ParentRuleNames { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus? Status { get { throw null; } set { } } Azure.ResourceManager.MachineLearning.Models.MachineLearningOutboundRule 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) { } @@ -8194,6 +7383,7 @@ public MachineLearningScheduleBase() { } public partial class MachineLearningScheduleProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MachineLearningScheduleProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleAction action, Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerBase trigger) { } + public MachineLearningScheduleProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerBase trigger, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleAction action) { } public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleAction Action { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } @@ -8310,6 +7500,7 @@ public MachineLearningScriptsToExecute() { } public partial class MachineLearningServicePrincipalDatastoreCredentials : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MachineLearningServicePrincipalDatastoreCredentials(System.Guid clientId, Azure.ResourceManager.MachineLearning.Models.MachineLearningServicePrincipalDatastoreSecrets secrets, System.Guid tenantId) { } + public MachineLearningServicePrincipalDatastoreCredentials(System.Guid tenantId, System.Guid clientId, Azure.ResourceManager.MachineLearning.Models.MachineLearningServicePrincipalDatastoreSecrets secrets) { } public System.Uri AuthorityUri { get { throw null; } set { } } public System.Guid ClientId { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } @@ -8583,6 +7774,7 @@ public MachineLearningStackEnsembleSettings() { } public partial class MachineLearningSweepJob : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MachineLearningSweepJob(Azure.ResourceManager.MachineLearning.Models.MachineLearningObjective objective, Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm samplingAlgorithm, System.BinaryData searchSpace, Azure.ResourceManager.MachineLearning.Models.MachineLearningTrialComponent trial) { } + public MachineLearningSweepJob(System.BinaryData searchSpace, Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm samplingAlgorithm, Azure.ResourceManager.MachineLearning.Models.MachineLearningObjective objective, Azure.ResourceManager.MachineLearning.Models.MachineLearningTrialComponent trial) { } public Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy EarlyTermination { get { throw null; } set { } } public System.Collections.Generic.IDictionary Inputs { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningSweepJobLimits Limits { get { throw null; } set { } } @@ -9132,31 +8324,17 @@ public MachineLearningWorkspaceConnectionManagedIdentity() { } 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 MachineLearningWorkspaceConnectionPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MachineLearningWorkspaceConnectionPatch() { } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties Properties { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionPatch 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.MachineLearning.Models.MachineLearningWorkspaceConnectionPatch 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 abstract partial class MachineLearningWorkspaceConnectionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected MachineLearningWorkspaceConnectionProperties() { } public Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? Category { get { throw null; } set { } } public Azure.Core.ResourceIdentifier CreatedByWorkspaceArmId { get { throw null; } } - public string Error { get { throw null; } set { } } public System.DateTimeOffset? ExpiryOn { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ConnectionGroup? Group { get { throw null; } } public bool? IsSharedToAll { get { throw null; } set { } } public System.Collections.Generic.IDictionary Metadata { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement? PeRequirement { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus? PeStatus { get { throw null; } set { } } public System.Collections.Generic.IList SharedUserList { get { throw null; } } public string Target { get { throw null; } set { } } - public bool? UseWorkspaceManagedIdentity { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string Value { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -9198,7 +8376,6 @@ public MachineLearningWorkspaceDiagnoseProperties() { } public System.Collections.Generic.IDictionary KeyVault { get { throw null; } } public System.Collections.Generic.IDictionary Nsg { get { throw null; } } public System.Collections.Generic.IDictionary Others { get { throw null; } } - public System.Collections.Generic.IDictionary RequiredResourceProviders { get { throw null; } } public System.Collections.Generic.IDictionary ResourceLock { get { throw null; } } public System.Collections.Generic.IDictionary StorageAccount { get { throw null; } } public System.Collections.Generic.IDictionary Udr { get { throw null; } } @@ -9273,27 +8450,23 @@ internal MachineLearningWorkspaceNotebookAccessTokenResult() { } public partial class MachineLearningWorkspacePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MachineLearningWorkspacePatch() { } - public bool? AllowRoleAssignmentOnRG { get { throw null; } set { } } public string ApplicationInsights { get { throw null; } set { } } public string ContainerRegistry { get { throw null; } set { } } public int? CosmosDbCollectionsThroughput { get { throw null; } set { } } public string Description { get { throw null; } set { } } public bool? EnableDataIsolation { get { throw null; } set { } } - public bool? EnableSoftwareBillOfMaterials { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.FeatureStoreSettings FeatureStoreSettings { get { throw null; } set { } } public string FriendlyName { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string ImageBuildCompute { get { throw null; } set { } } - public System.Collections.Generic.IList IPAllowlist { get { throw null; } } public string KeyIdentifier { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ManagedNetworkSettings ManagedNetwork { get { throw null; } set { } } public string PrimaryUserAssignedIdentity { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType? PublicNetworkAccessType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess? PublicNetworkAccessType { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ServerlessComputeSettings ServerlessComputeSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } - public int? SoftDeleteRetentionInDays { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public bool? V1LegacyMode { get { throw null; } set { } } Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspacePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -9388,7 +8561,6 @@ public ManagedNetworkProvisionStatus() { } public partial class ManagedNetworkSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManagedNetworkSettings() { } - public System.Collections.Generic.IReadOnlyList ChangeableIsolationModes { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.IsolationMode? IsolationMode { get { throw null; } set { } } public string NetworkId { get { throw null; } } public System.Collections.Generic.IDictionary OutboundRules { get { throw null; } set { } } @@ -9417,80 +8589,6 @@ public ManagedNetworkSettings() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ManagedNetworkStatus left, Azure.ResourceManager.MachineLearning.Models.ManagedNetworkStatus right) { throw null; } public override string ToString() { throw null; } } - public partial class ManagedOnlineEndpointDeploymentResourceProperties : Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentResourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ManagedOnlineEndpointDeploymentResourceProperties() { } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType? EndpointComputeType { get { throw null; } set { } } - public string Model { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.ManagedOnlineEndpointDeploymentResourceProperties 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.MachineLearning.Models.ManagedOnlineEndpointDeploymentResourceProperties 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 ManagedOnlineEndpointResourceProperties : Azure.ResourceManager.MachineLearning.Models.EndpointResourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ManagedOnlineEndpointResourceProperties() { } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode? AuthMode { get { throw null; } set { } } - public string Compute { get { throw null; } set { } } - public string Description { get { throw null; } set { } } - public System.Collections.Generic.IDictionary MirrorTraffic { get { throw null; } } - public System.Uri ScoringUri { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Traffic { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.ManagedOnlineEndpointResourceProperties 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.MachineLearning.Models.ManagedOnlineEndpointResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ManagedPERequirement : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ManagedPERequirement(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement NotApplicable { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement NotRequired { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement Required { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement 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.MachineLearning.Models.ManagedPERequirement left, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement left, Azure.ResourceManager.MachineLearning.Models.ManagedPERequirement right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ManagedPEStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ManagedPEStatus(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus Active { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus Inactive { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus NotApplicable { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus 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.MachineLearning.Models.ManagedPEStatus left, Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus left, Azure.ResourceManager.MachineLearning.Models.ManagedPEStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class ManagedResourceGroupAssignedIdentities : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ManagedResourceGroupAssignedIdentities() { } - public System.Guid? PrincipalId { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.ManagedResourceGroupAssignedIdentities 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.MachineLearning.Models.ManagedResourceGroupAssignedIdentities 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 MarketplacePlan : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MarketplacePlan() { } @@ -9601,24 +8699,6 @@ public MedianStoppingPolicy() { } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ModelLifecycleStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ModelLifecycleStatus(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ModelLifecycleStatus GenerallyAvailable { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ModelLifecycleStatus Preview { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ModelLifecycleStatus 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.MachineLearning.Models.ModelLifecycleStatus left, Azure.ResourceManager.MachineLearning.Models.ModelLifecycleStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ModelLifecycleStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ModelLifecycleStatus left, Azure.ResourceManager.MachineLearning.Models.ModelLifecycleStatus right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ModelTaskType : System.IEquatable { private readonly object _dummy; @@ -9656,7 +8736,7 @@ protected MonitorComputeIdentityBase() { } } public partial class MonitorDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public MonitorDefinition(Azure.ResourceManager.MachineLearning.Models.MonitorComputeConfigurationBase computeConfiguration, System.Collections.Generic.IDictionary signals) { } + public MonitorDefinition(System.Collections.Generic.IDictionary signals, Azure.ResourceManager.MachineLearning.Models.MonitorComputeConfigurationBase computeConfiguration) { } public Azure.ResourceManager.MachineLearning.Models.MonitorComputeConfigurationBase ComputeConfiguration { get { throw null; } set { } } public System.Collections.Generic.IList Emails { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MonitoringTarget MonitoringTarget { get { throw null; } set { } } @@ -9771,24 +8851,6 @@ public MountBindOptions() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MountMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MountMode(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MountMode ReadOnly { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.MountMode ReadWrite { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.MountMode 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.MachineLearning.Models.MountMode left, Azure.ResourceManager.MachineLearning.Models.MountMode right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.MountMode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MountMode left, Azure.ResourceManager.MachineLearning.Models.MountMode right) { throw null; } - public override string ToString() { throw null; } - } public partial class MpiDistributionConfiguration : Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MpiDistributionConfiguration() { } @@ -9989,41 +9051,6 @@ public OneLakeDatastore(Azure.ResourceManager.MachineLearning.Models.MachineLear 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 OpenAIEndpointDeploymentResourceProperties : Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentResourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenAIEndpointDeploymentResourceProperties(Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentModel model) { } - public Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentModel Model { get { throw null; } set { } } - public string RaiPolicyName { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption? VersionUpgradeOption { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.OpenAIEndpointDeploymentResourceProperties 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.MachineLearning.Models.OpenAIEndpointDeploymentResourceProperties 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 OpenAIEndpointResourceProperties : Azure.ResourceManager.MachineLearning.Models.EndpointResourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenAIEndpointResourceProperties() { } - Azure.ResourceManager.MachineLearning.Models.OpenAIEndpointResourceProperties 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.MachineLearning.Models.OpenAIEndpointResourceProperties 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 OSPatchingStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal OSPatchingStatus() { } - public System.DateTimeOffset? LatestPatchOn { get { throw null; } } - public System.Collections.Generic.IReadOnlyList OSPatchingErrors { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.PatchStatus? PatchStatus { get { throw null; } } - public bool? RebootPending { get { throw null; } } - public System.DateTimeOffset? ScheduledRebootOn { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.OSPatchingStatus 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.MachineLearning.Models.OSPatchingStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct OutboundRuleCategory : System.IEquatable { @@ -10062,27 +9089,6 @@ internal OSPatchingStatus() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus left, Azure.ResourceManager.MachineLearning.Models.OutboundRuleStatus right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PatchStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public PatchStatus(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.PatchStatus CompletedWithWarnings { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.PatchStatus Failed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.PatchStatus InProgress { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.PatchStatus Succeeded { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.PatchStatus Unknown { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.PatchStatus 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.MachineLearning.Models.PatchStatus left, Azure.ResourceManager.MachineLearning.Models.PatchStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.PatchStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.PatchStatus left, Azure.ResourceManager.MachineLearning.Models.PatchStatus right) { throw null; } - public override string ToString() { throw null; } - } public abstract partial class PendingUploadCredentialDto : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected PendingUploadCredentialDto() { } @@ -10183,149 +9189,39 @@ public partial class PrivateEndpointOutboundRule : Azure.ResourceManager.Machine { public PrivateEndpointOutboundRule() { } public Azure.ResourceManager.MachineLearning.Models.PrivateEndpointDestination Destination { get { throw null; } set { } } - public System.Collections.Generic.IList Fqdns { get { throw null; } } Azure.ResourceManager.MachineLearning.Models.PrivateEndpointOutboundRule 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.MachineLearning.Models.PrivateEndpointOutboundRule 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 PyTorchDistributionConfiguration : Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public PyTorchDistributionConfiguration() { } - public int? ProcessCountPerInstance { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.PyTorchDistributionConfiguration 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.MachineLearning.Models.PyTorchDistributionConfiguration 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 RaiBlocklistConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RaiBlocklistConfig() { } - public bool? Blocking { get { throw null; } set { } } - public string BlocklistName { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.RaiBlocklistConfig 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.MachineLearning.Models.RaiBlocklistConfig 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 RaiBlocklistItemBulkRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RaiBlocklistItemBulkRequest() { } - public string Name { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.RaiBlocklistItemProperties Properties { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.RaiBlocklistItemBulkRequest 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.MachineLearning.Models.RaiBlocklistItemBulkRequest 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 RaiBlocklistItemProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RaiBlocklistItemProperties() { } - public bool? IsRegex { get { throw null; } set { } } - public string Pattern { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.RaiBlocklistItemProperties 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.MachineLearning.Models.RaiBlocklistItemProperties 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 RaiBlocklistProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RaiBlocklistProperties() { } - public string Description { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.RaiBlocklistProperties 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.MachineLearning.Models.RaiBlocklistProperties 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 RaiPolicyContentFilter : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RaiPolicyContentFilter() { } - public Azure.ResourceManager.MachineLearning.Models.AllowedContentLevel? AllowedContentLevel { get { throw null; } set { } } - public bool? Blocking { get { throw null; } set { } } - public bool? Enabled { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.RaiPolicyContentSource? Source { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.RaiPolicyContentFilter 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.MachineLearning.Models.RaiPolicyContentFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RaiPolicyContentSource : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RaiPolicyContentSource(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.RaiPolicyContentSource Completion { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RaiPolicyContentSource Prompt { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.RaiPolicyContentSource 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.MachineLearning.Models.RaiPolicyContentSource left, Azure.ResourceManager.MachineLearning.Models.RaiPolicyContentSource right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.RaiPolicyContentSource (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.RaiPolicyContentSource left, Azure.ResourceManager.MachineLearning.Models.RaiPolicyContentSource right) { throw null; } - public override string ToString() { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RaiPolicyMode : System.IEquatable + public readonly partial struct PublicNetworkAccess : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public RaiPolicyMode(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.RaiPolicyMode Blocking { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RaiPolicyMode Default { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RaiPolicyMode Deferred { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.RaiPolicyMode other) { throw null; } + public PublicNetworkAccess(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess 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.MachineLearning.Models.RaiPolicyMode left, Azure.ResourceManager.MachineLearning.Models.RaiPolicyMode right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.RaiPolicyMode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.RaiPolicyMode left, Azure.ResourceManager.MachineLearning.Models.RaiPolicyMode right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess left, Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess left, Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess right) { throw null; } public override string ToString() { throw null; } } - public partial class RaiPolicyProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RaiPolicyProperties() { } - public string BasePolicyName { get { throw null; } set { } } - public System.Collections.Generic.IList CompletionBlocklists { get { throw null; } } - public System.Collections.Generic.IList ContentFilters { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.RaiPolicyMode? Mode { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.RaiPolicyType? PolicyType { get { throw null; } set { } } - public System.Collections.Generic.IList PromptBlocklists { get { throw null; } } - Azure.ResourceManager.MachineLearning.Models.RaiPolicyProperties 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.MachineLearning.Models.RaiPolicyProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RaiPolicyType : System.IEquatable + public partial class PyTorchDistributionConfiguration : Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RaiPolicyType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.RaiPolicyType SystemManaged { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RaiPolicyType UserManaged { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.RaiPolicyType 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.MachineLearning.Models.RaiPolicyType left, Azure.ResourceManager.MachineLearning.Models.RaiPolicyType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.RaiPolicyType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.RaiPolicyType left, Azure.ResourceManager.MachineLearning.Models.RaiPolicyType right) { throw null; } - public override string ToString() { throw null; } + public PyTorchDistributionConfiguration() { } + public int? ProcessCountPerInstance { get { throw null; } set { } } + Azure.ResourceManager.MachineLearning.Models.PyTorchDistributionConfiguration 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.MachineLearning.Models.PyTorchDistributionConfiguration 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 RandomSamplingAlgorithm : Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -10356,16 +9252,6 @@ public RandomSamplingAlgorithm() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule left, Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule right) { throw null; } public override string ToString() { throw null; } } - public partial class RegenerateServiceAccountKeyContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RegenerateServiceAccountKeyContent() { } - public Azure.ResourceManager.MachineLearning.Models.ServiceAccountKeyName? KeyName { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.RegenerateServiceAccountKeyContent 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.MachineLearning.Models.RegenerateServiceAccountKeyContent 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 RegistryAcrDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public RegistryAcrDetails() { } @@ -10429,7 +9315,7 @@ public partial class RegistryPrivateLinkServiceConnectionState : System.ClientMo public RegistryPrivateLinkServiceConnectionState() { } public string ActionsRequired { get { throw null; } set { } } public string Description { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.EndpointServiceConnectionStatus? Status { get { throw null; } set { } } Azure.ResourceManager.MachineLearning.Models.RegistryPrivateLinkServiceConnectionState 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.MachineLearning.Models.RegistryPrivateLinkServiceConnectionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -10459,16 +9345,6 @@ public RegressionTrainingSettings() { } 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 ResizeSchema : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ResizeSchema() { } - public string TargetVmSize { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.ResizeSchema 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.MachineLearning.Models.ResizeSchema 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 RollingInputData : Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public RollingInputData(Azure.ResourceManager.MachineLearning.Models.JobInputType jobInputType, System.Uri uri, System.TimeSpan windowOffset, System.TimeSpan windowSize) : base (default(Azure.ResourceManager.MachineLearning.Models.JobInputType), default(System.Uri)) { } @@ -10550,17 +9426,6 @@ internal SasCredentialDto() { } 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 SecretExpiry : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SecretExpiry() { } - public bool? ExpirableSecret { get { throw null; } set { } } - public int? ExpireAfterHours { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.SecretExpiry 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.MachineLearning.Models.SecretExpiry 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 ServerlessComputeSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ServerlessComputeSettings() { } @@ -10572,28 +9437,6 @@ public ServerlessComputeSettings() { } 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 ServerlessEndpointCapacityReservation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ServerlessEndpointCapacityReservation(string capacityReservationGroupId) { } - public string CapacityReservationGroupId { get { throw null; } set { } } - public int? EndpointReservedCapacity { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointCapacityReservation 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.MachineLearning.Models.ServerlessEndpointCapacityReservation 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 ServerlessEndpointInferenceEndpoint : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ServerlessEndpointInferenceEndpoint(System.Uri uri) { } - public System.Collections.Generic.IReadOnlyDictionary Headers { get { throw null; } } - public System.Uri Uri { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointInferenceEndpoint 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.MachineLearning.Models.ServerlessEndpointInferenceEndpoint 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 ServerlessEndpointPatch : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourcePatch, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ServerlessEndpointPatch() { } @@ -10621,24 +9464,6 @@ public ServerlessEndpointProperties(Azure.ResourceManager.MachineLearning.Models 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 ServerlessEndpointResourceProperties : Azure.ResourceManager.MachineLearning.Models.EndpointResourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ServerlessEndpointResourceProperties() { } - public Azure.ResourceManager.MachineLearning.Models.ServerlessInferenceEndpointAuthMode? AuthMode { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointCapacityReservation CapacityReservation { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ContentSafetyStatus? ContentSafetyStatus { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointState? EndpointState { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointInferenceEndpoint InferenceEndpoint { get { throw null; } set { } } - public string MarketplaceSubscriptionId { get { throw null; } set { } } - public System.BinaryData Metadata { get { throw null; } set { } } - public string ModelId { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ServerlessOffer Offer { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.ServerlessEndpointResourceProperties 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.MachineLearning.Models.ServerlessEndpointResourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ServerlessEndpointState : System.IEquatable { @@ -10692,35 +9517,6 @@ internal ServerlessInferenceEndpoint() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ServerlessInferenceEndpointAuthMode left, Azure.ResourceManager.MachineLearning.Models.ServerlessInferenceEndpointAuthMode right) { throw null; } public override string ToString() { throw null; } } - public partial class ServerlessOffer : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ServerlessOffer(string offerName, string publisher) { } - public string OfferName { get { throw null; } set { } } - public string Publisher { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.ServerlessOffer 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.MachineLearning.Models.ServerlessOffer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ServiceAccountKeyName : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ServiceAccountKeyName(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ServiceAccountKeyName Key1 { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ServiceAccountKeyName Key2 { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ServiceAccountKeyName 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.MachineLearning.Models.ServiceAccountKeyName left, Azure.ResourceManager.MachineLearning.Models.ServiceAccountKeyName right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ServiceAccountKeyName (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ServiceAccountKeyName left, Azure.ResourceManager.MachineLearning.Models.ServiceAccountKeyName right) { throw null; } - public override string ToString() { throw null; } - } public partial class ServicePrincipalAuthTypeWorkspaceConnectionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ServicePrincipalAuthTypeWorkspaceConnectionProperties() { } @@ -10818,30 +9614,9 @@ public SparkResourceConfiguration() { } 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 SpeechEndpointDeploymentResourceProperties : Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentResourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SpeechEndpointDeploymentResourceProperties(Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentModel model) { } - public Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentModel Model { get { throw null; } set { } } - public string RaiPolicyName { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.DeploymentModelVersionUpgradeOption? VersionUpgradeOption { get { throw null; } set { } } - Azure.ResourceManager.MachineLearning.Models.SpeechEndpointDeploymentResourceProperties 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.MachineLearning.Models.SpeechEndpointDeploymentResourceProperties 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 SpeechEndpointResourceProperties : Azure.ResourceManager.MachineLearning.Models.EndpointResourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SpeechEndpointResourceProperties() { } - Azure.ResourceManager.MachineLearning.Models.SpeechEndpointResourceProperties 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.MachineLearning.Models.SpeechEndpointResourceProperties 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 StaticInputData : Azure.ResourceManager.MachineLearning.Models.MonitoringInputDataBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public StaticInputData(Azure.ResourceManager.MachineLearning.Models.JobInputType jobInputType, System.Uri uri, System.DateTimeOffset windowEnd, System.DateTimeOffset windowStart) : base (default(Azure.ResourceManager.MachineLearning.Models.JobInputType), default(System.Uri)) { } + public StaticInputData(Azure.ResourceManager.MachineLearning.Models.JobInputType jobInputType, System.Uri uri, System.DateTimeOffset windowStart, System.DateTimeOffset windowEnd) : base (default(Azure.ResourceManager.MachineLearning.Models.JobInputType), default(System.Uri)) { } public string PreprocessingComponentId { get { throw null; } set { } } public System.DateTimeOffset WindowEnd { get { throw null; } set { } } public System.DateTimeOffset WindowStart { get { throw null; } set { } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_EndpointResourcePropertiesBasicResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_EndpointResourcePropertiesBasicResource.cs deleted file mode 100644 index b85a2edf37c27..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_EndpointResourcePropertiesBasicResource.cs +++ /dev/null @@ -1,179 +0,0 @@ -// 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.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_EndpointResourcePropertiesBasicResource - { - // Get Endpoint - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetEndpoint() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/get.json - // this example is just showing the usage of "Endpoint_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // invoke the operation - EndpointResourcePropertiesBasicResource result = await endpointResourcePropertiesBasicResource.GetAsync(); - - // 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 - EndpointResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create Endpoint - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateEndpoint() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/create.json - // this example is just showing the usage of "Endpoint_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // invoke the operation - EndpointResourcePropertiesBasicResourceData data = new EndpointResourcePropertiesBasicResourceData(new OpenAIEndpointResourceProperties() - { - AssociatedResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.CognitiveService/account/account-1"), - Name = "Azure.OpenAI", - }); - ArmOperation lro = await endpointResourcePropertiesBasicResource.UpdateAsync(WaitUntil.Completed, data); - EndpointResourcePropertiesBasicResource 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 - EndpointResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // List Endpoint Keys - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetKeys_ListEndpointKeys() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/listKeys.json - // this example is just showing the usage of "Endpoint_ListKeys" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // invoke the operation - EndpointKeys result = await endpointResourcePropertiesBasicResource.GetKeysAsync(); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get Endpoint Models - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetModels_GetEndpointModels() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/getModels.json - // this example is just showing the usage of "Endpoint_GetModels" 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 EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // invoke the operation and iterate over the result - await foreach (EndpointModelProperties item in endpointResourcePropertiesBasicResource.GetModelsAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine($"Succeeded"); - } - - // Regenerate Endpoint Keys - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task RegenerateKeys_RegenerateEndpointKeys() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/regenerateKey.json - // this example is just showing the usage of "Endpoint_RegenerateKeys" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // invoke the operation - RegenerateServiceAccountKeyContent content = new RegenerateServiceAccountKeyContent() - { - KeyName = ServiceAccountKeyName.Key1, - }; - AccountApiKeys result = await endpointResourcePropertiesBasicResource.RegenerateKeysAsync(content); - - Console.WriteLine($"Succeeded: {result}"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_EndpointResourcePropertiesBasicResourceCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_EndpointResourcePropertiesBasicResourceCollection.cs deleted file mode 100644 index c87bb000906f4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_EndpointResourcePropertiesBasicResourceCollection.cs +++ /dev/null @@ -1,207 +0,0 @@ -// 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.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_EndpointResourcePropertiesBasicResourceCollection - { - // List Endpoint - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListEndpoint() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/list.json - // this example is just showing the usage of "Endpoint_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); - - // this example assumes you already have this MachineLearningWorkspaceResource created on azure - // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); - MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - - // get the collection of this EndpointResourcePropertiesBasicResource - EndpointResourcePropertiesBasicResourceCollection collection = machineLearningWorkspace.GetEndpointResourcePropertiesBasicResources(); - - // invoke the operation and iterate over the result - EndpointType? endpointType = EndpointType.AzureOpenAI; - string skip = "skip_string"; - await foreach (EndpointResourcePropertiesBasicResource item in collection.GetAllAsync(endpointType: endpointType, skip: skip)) - { - // the variable item 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 - EndpointResourcePropertiesBasicResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // Get Endpoint - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetEndpoint() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/get.json - // this example is just showing the usage of "Endpoint_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceResource created on azure - // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); - MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - - // get the collection of this EndpointResourcePropertiesBasicResource - EndpointResourcePropertiesBasicResourceCollection collection = machineLearningWorkspace.GetEndpointResourcePropertiesBasicResources(); - - // invoke the operation - string endpointName = "Azure.OpenAI"; - EndpointResourcePropertiesBasicResource result = await collection.GetAsync(endpointName); - - // 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 - EndpointResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get Endpoint - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetEndpoint() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/get.json - // this example is just showing the usage of "Endpoint_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceResource created on azure - // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); - MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - - // get the collection of this EndpointResourcePropertiesBasicResource - EndpointResourcePropertiesBasicResourceCollection collection = machineLearningWorkspace.GetEndpointResourcePropertiesBasicResources(); - - // invoke the operation - string endpointName = "Azure.OpenAI"; - bool result = await collection.ExistsAsync(endpointName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get Endpoint - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetEndpoint() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/get.json - // this example is just showing the usage of "Endpoint_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceResource created on azure - // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); - MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - - // get the collection of this EndpointResourcePropertiesBasicResource - EndpointResourcePropertiesBasicResourceCollection collection = machineLearningWorkspace.GetEndpointResourcePropertiesBasicResources(); - - // invoke the operation - string endpointName = "Azure.OpenAI"; - NullableResponse response = await collection.GetIfExistsAsync(endpointName); - EndpointResourcePropertiesBasicResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // 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 - EndpointResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // Create Endpoint - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateEndpoint() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/create.json - // this example is just showing the usage of "Endpoint_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceResource created on azure - // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); - MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - - // get the collection of this EndpointResourcePropertiesBasicResource - EndpointResourcePropertiesBasicResourceCollection collection = machineLearningWorkspace.GetEndpointResourcePropertiesBasicResources(); - - // invoke the operation - string endpointName = "Azure.OpenAI"; - EndpointResourcePropertiesBasicResourceData data = new EndpointResourcePropertiesBasicResourceData(new OpenAIEndpointResourceProperties() - { - AssociatedResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.CognitiveService/account/account-1"), - Name = "Azure.OpenAI", - }); - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, endpointName, data); - EndpointResourcePropertiesBasicResource 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 - EndpointResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerCollection.cs index b037335159a1d..fc43481eced3f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearninRegistryComponentContainerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRegistryComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentContainer/list.json // this example is just showing the usage of "RegistryComponentContainers_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 @@ -57,7 +57,7 @@ public async Task GetAll_ListRegistryComponentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentContainer/get.json // this example is just showing the usage of "RegistryComponentContainers_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 @@ -92,7 +92,7 @@ public async Task Get_GetRegistryComponentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRegistryComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentContainer/get.json // this example is just showing the usage of "RegistryComponentContainers_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 @@ -123,7 +123,7 @@ public async Task Exists_GetRegistryComponentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRegistryComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentContainer/get.json // this example is just showing the usage of "RegistryComponentContainers_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 GetIfExists_GetRegistryComponentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRegistryComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentContainer/createOrUpdate.json // this example is just showing the usage of "RegistryComponentContainers_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 @@ -190,11 +190,11 @@ public async Task CreateOrUpdate_CreateOrUpdateRegistryComponentContainer() MachineLearningComponentContainerData data = new MachineLearningComponentContainerData(new MachineLearningComponentContainerProperties() { Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerResource.cs index 31468d1db6a45..6700ed192cdd7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentContainerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearninRegistryComponentContainerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteRegistryComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentContainer/delete.json // this example is just showing the usage of "RegistryComponentContainers_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteRegistryComponentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentContainer/get.json // this example is just showing the usage of "RegistryComponentContainers_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 @@ -80,7 +80,7 @@ public async Task Get_GetRegistryComponentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateRegistryComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentContainer/createOrUpdate.json // this example is just showing the usage of "RegistryComponentContainers_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 @@ -101,11 +101,11 @@ public async Task Update_CreateOrUpdateRegistryComponentContainer() MachineLearningComponentContainerData data = new MachineLearningComponentContainerData(new MachineLearningComponentContainerProperties() { Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionCollection.cs index a1abf8574e176..6a3241b7b0323 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_MachineLearninRegistryComponentVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRegistryComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentVersion/list.json // this example is just showing the usage of "RegistryComponentVersions_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 @@ -61,7 +61,7 @@ public async Task GetAll_ListRegistryComponentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentVersion/get.json // this example is just showing the usage of "RegistryComponentVersions_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 @@ -97,7 +97,7 @@ public async Task Get_GetRegistryComponentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRegistryComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentVersion/get.json // this example is just showing the usage of "RegistryComponentVersions_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 @@ -129,7 +129,7 @@ public async Task Exists_GetRegistryComponentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRegistryComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentVersion/get.json // this example is just showing the usage of "RegistryComponentVersions_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 @@ -173,7 +173,7 @@ public async Task GetIfExists_GetRegistryComponentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRegistryComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentVersion/createOrUpdate.json // this example is just showing the usage of "RegistryComponentVersions_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 @@ -203,11 +203,11 @@ public async Task CreateOrUpdate_CreateOrUpdateRegistryComponentVersion() }), IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionResource.cs index 13c4cf31e577e..3358e3c84feb0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearninRegistryComponentVersionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_MachineLearninRegistryComponentVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteRegistryComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentVersion/delete.json // this example is just showing the usage of "RegistryComponentVersions_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 @@ -50,7 +50,7 @@ public async Task Delete_DeleteRegistryComponentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentVersion/get.json // this example is just showing the usage of "RegistryComponentVersions_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 @@ -83,7 +83,7 @@ public async Task Get_GetRegistryComponentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateRegistryComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ComponentVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ComponentVersion/createOrUpdate.json // this example is just showing the usage of "RegistryComponentVersions_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 @@ -110,11 +110,11 @@ public async Task Update_CreateOrUpdateRegistryComponentVersion() }), IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentCollection.cs index a410a3bd78b90..30e3ca78d4c48 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_MachineLearningBatchDeploymentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchDeployment/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchDeployment/list.json // this example is just showing the usage of "BatchDeployments_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 @@ -63,7 +63,7 @@ public async Task GetAll_ListWorkspaceBatchDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchDeployment/get.json // this example is just showing the usage of "BatchDeployments_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_GetWorkspaceBatchDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchDeployment/get.json // this example is just showing the usage of "BatchDeployments_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 @@ -131,7 +131,7 @@ public async Task Exists_GetWorkspaceBatchDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchDeployment/get.json // this example is just showing the usage of "BatchDeployments_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 @@ -175,7 +175,7 @@ public async Task GetIfExists_GetWorkspaceBatchDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchDeployment/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchDeployment/createOrUpdate.json // this example is just showing the usage of "BatchDeployments_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 @@ -201,10 +201,15 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceBatchDeployment() { Compute = "string", ErrorThreshold = 1, - LoggingLevel = MachineLearningBatchLoggingLevel.Info, - MaxConcurrencyPerInstance = 1, + RetrySettings = new MachineLearningBatchRetrySettings() + { + MaxRetries = 1, + Timeout = XmlConvert.ToTimeSpan("PT5M"), + }, MiniBatchSize = 1, + LoggingLevel = MachineLearningBatchLoggingLevel.Info, Model = new MachineLearningIdAssetReference(new ResourceIdentifier("string")), + MaxConcurrencyPerInstance = 1, OutputAction = MachineLearningBatchOutputAction.SummaryOnly, OutputFileName = "string", Resources = new MachineLearningDeploymentResourceConfiguration() @@ -218,27 +223,23 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceBatchDeployment() ["cd3c37dc-2876-4ca4-8a54-21bd7619724a"] = null}), }, }, - RetrySettings = new MachineLearningBatchRetrySettings() - { - MaxRetries = 1, - Timeout = XmlConvert.ToTimeSpan("PT5M"), - }, + Description = "string", + Properties = +{ +["string"] = "string", +}, CodeConfiguration = new MachineLearningCodeConfiguration("string") { CodeId = new ResourceIdentifier("string"), }, - Description = "string", EnvironmentId = "string", EnvironmentVariables = { ["string"] = "string", -}, - Properties = -{ -["string"] = "string", }, }) { + Kind = "string", Identity = new ManagedServiceIdentity("SystemAssigned") { UserAssignedIdentities = @@ -246,7 +247,6 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceBatchDeployment() [new ResourceIdentifier("string")] = new UserAssignedIdentity(), }, }, - Kind = "string", Sku = new MachineLearningSku("string") { Tier = MachineLearningSkuTier.Free, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentResource.cs index 120915ad21fe4..a47a0a18ba606 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchDeploymentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningBatchDeploymentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchDeployment/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchDeployment/delete.json // this example is just showing the usage of "BatchDeployments_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteWorkspaceBatchDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchDeployment/get.json // this example is just showing the usage of "BatchDeployments_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 @@ -82,7 +82,7 @@ public async Task Get_GetWorkspaceBatchDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateWorkspaceBatchDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchDeployment/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchDeployment/update.json // this example is just showing the usage of "BatchDeployments_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointCollection.cs index 2a562c959df9e..5432d00ab2b62 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_MachineLearningBatchEndpointCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchEndpoint/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchEndpoint/list.json // this example is just showing the usage of "BatchEndpoints_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 @@ -59,7 +59,7 @@ public async Task GetAll_ListWorkspaceBatchEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchEndpoint/get.json // this example is just showing the usage of "BatchEndpoints_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 @@ -94,7 +94,7 @@ public async Task Get_GetWorkspaceBatchEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchEndpoint/get.json // this example is just showing the usage of "BatchEndpoints_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 @@ -125,7 +125,7 @@ public async Task Exists_GetWorkspaceBatchEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchEndpoint/get.json // this example is just showing the usage of "BatchEndpoints_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 @@ -168,7 +168,7 @@ public async Task GetIfExists_GetWorkspaceBatchEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchEndpoint/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchEndpoint/createOrUpdate.json // this example is just showing the usage of "BatchEndpoints_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 @@ -199,6 +199,7 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceBatchEndpoint() }, }) { + Kind = "string", Identity = new ManagedServiceIdentity("SystemAssigned") { UserAssignedIdentities = @@ -206,7 +207,6 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceBatchEndpoint() [new ResourceIdentifier("string")] = new UserAssignedIdentity(), }, }, - Kind = "string", Sku = new MachineLearningSku("string") { Tier = MachineLearningSkuTier.Free, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointResource.cs index 426ea064a7c90..6962f39920d61 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningBatchEndpointResource.cs @@ -21,7 +21,7 @@ public partial class Sample_MachineLearningBatchEndpointResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchEndpoint/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchEndpoint/delete.json // this example is just showing the usage of "BatchEndpoints_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteWorkspaceBatchEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchEndpoint/get.json // this example is just showing the usage of "BatchEndpoints_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 @@ -81,7 +81,7 @@ public async Task Get_GetWorkspaceBatchEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchEndpoint/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchEndpoint/update.json // this example is just showing the usage of "BatchEndpoints_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 @@ -130,7 +130,7 @@ public async Task Update_UpdateWorkspaceBatchEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKeys_ListKeysWorkspaceBatchEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/BatchEndpoint/listKeys.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/BatchEndpoint/listKeys.json // this example is just showing the usage of "BatchEndpoints_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerCollection.cs index fbc05457edd07..c84280ef13a21 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningCodeContainerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeContainer/list.json // this example is just showing the usage of "CodeContainers_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 @@ -57,7 +57,7 @@ public async Task GetAll_ListWorkspaceCodeContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeContainer/get.json // this example is just showing the usage of "CodeContainers_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 @@ -92,7 +92,7 @@ public async Task Get_GetWorkspaceCodeContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeContainer/get.json // this example is just showing the usage of "CodeContainers_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 @@ -123,7 +123,7 @@ public async Task Exists_GetWorkspaceCodeContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeContainer/get.json // this example is just showing the usage of "CodeContainers_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 GetIfExists_GetWorkspaceCodeContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeContainer/createOrUpdate.json // this example is just showing the usage of "CodeContainers_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerResource.cs index e8f668094ce90..b22a5de355ecf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeContainerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningCodeContainerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeContainer/delete.json // this example is just showing the usage of "CodeContainers_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteWorkspaceCodeContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeContainer/get.json // this example is just showing the usage of "CodeContainers_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 @@ -80,7 +80,7 @@ public async Task Get_GetWorkspaceCodeContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeContainer/createOrUpdate.json // this example is just showing the usage of "CodeContainers_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionCollection.cs index 58eca4e07e99d..71e13cca69744 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningCodeVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeVersion/list.json // this example is just showing the usage of "CodeVersions_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 @@ -60,7 +60,7 @@ public async Task GetAll_ListWorkspaceCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeVersion/get.json // this example is just showing the usage of "CodeVersions_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 @@ -96,7 +96,7 @@ public async Task Get_GetWorkspaceCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeVersion/get.json // this example is just showing the usage of "CodeVersions_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 @@ -128,7 +128,7 @@ public async Task Exists_GetWorkspaceCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeVersion/get.json // this example is just showing the usage of "CodeVersions_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 @@ -172,7 +172,7 @@ public async Task GetIfExists_GetWorkspaceCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeVersion/createOrUpdate.json // this example is just showing the usage of "CodeVersions_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 @@ -199,11 +199,11 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceCodeVersion() CodeUri = new Uri("https://blobStorage/folderName"), IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionResource.cs index 9c6db8418b8de..f3aafedc45b80 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningCodeVersionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningCodeVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeVersion/delete.json // this example is just showing the usage of "CodeVersions_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteWorkspaceCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeVersion/get.json // this example is just showing the usage of "CodeVersions_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 @@ -82,7 +82,7 @@ public async Task Get_GetWorkspaceCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeVersion/createOrUpdate.json // this example is just showing the usage of "CodeVersions_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 @@ -106,11 +106,11 @@ public async Task Update_CreateOrUpdateWorkspaceCodeVersion() CodeUri = new Uri("https://blobStorage/folderName"), IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, @@ -130,7 +130,7 @@ public async Task Update_CreateOrUpdateWorkspaceCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Publish_PublishWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeVersion/publish.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeVersion/publish.json // this example is just showing the usage of "CodeVersions_Publish" 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 @@ -151,9 +151,9 @@ public async Task Publish_PublishWorkspaceCodeVersion() // invoke the operation DestinationAsset body = new DestinationAsset() { + RegistryName = "string", DestinationName = "string", DestinationVersion = "string", - RegistryName = "string", }; await machineLearningCodeVersion.PublishAsync(WaitUntil.Completed, body); @@ -165,7 +165,7 @@ public async Task Publish_PublishWorkspaceCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrGetStartPendingUpload_CreateOrGetStartPendingUploadWorkspaceCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/CodeVersion/createOrGetStartPendingUpload.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/CodeVersion/createOrGetStartPendingUpload.json // this example is just showing the usage of "CodeVersions_CreateOrGetStartPendingUpload" 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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerCollection.cs index 1f34c30936247..80dde1d0e7976 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningComponentContainerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentContainer/list.json // this example is just showing the usage of "ComponentContainers_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 @@ -57,7 +57,7 @@ public async Task GetAll_ListWorkspaceComponentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentContainer/get.json // this example is just showing the usage of "ComponentContainers_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 @@ -92,7 +92,7 @@ public async Task Get_GetWorkspaceComponentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentContainer/get.json // this example is just showing the usage of "ComponentContainers_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 @@ -123,7 +123,7 @@ public async Task Exists_GetWorkspaceComponentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentContainer/get.json // this example is just showing the usage of "ComponentContainers_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 GetIfExists_GetWorkspaceComponentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentContainer/createOrUpdate.json // this example is just showing the usage of "ComponentContainers_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 @@ -190,11 +190,11 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceComponentContainer() MachineLearningComponentContainerData data = new MachineLearningComponentContainerData(new MachineLearningComponentContainerProperties() { Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerResource.cs index d292981d4f427..fa281ce7cedfa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentContainerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningComponentContainerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentContainer/delete.json // this example is just showing the usage of "ComponentContainers_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteWorkspaceComponentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentContainer/get.json // this example is just showing the usage of "ComponentContainers_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 @@ -80,7 +80,7 @@ public async Task Get_GetWorkspaceComponentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceComponentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentContainer/createOrUpdate.json // this example is just showing the usage of "ComponentContainers_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 @@ -101,11 +101,11 @@ public async Task Update_CreateOrUpdateWorkspaceComponentContainer() MachineLearningComponentContainerData data = new MachineLearningComponentContainerData(new MachineLearningComponentContainerProperties() { Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionCollection.cs index 0e269451ac340..781e3dd95ea82 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_MachineLearningComponentVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentVersion/list.json // this example is just showing the usage of "ComponentVersions_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 @@ -61,7 +61,7 @@ public async Task GetAll_ListWorkspaceComponentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentVersion/get.json // this example is just showing the usage of "ComponentVersions_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 @@ -97,7 +97,7 @@ public async Task Get_GetWorkspaceComponentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentVersion/get.json // this example is just showing the usage of "ComponentVersions_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 @@ -129,7 +129,7 @@ public async Task Exists_GetWorkspaceComponentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentVersion/get.json // this example is just showing the usage of "ComponentVersions_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 @@ -173,7 +173,7 @@ public async Task GetIfExists_GetWorkspaceComponentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentVersion/createOrUpdate.json // this example is just showing the usage of "ComponentVersions_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 @@ -203,11 +203,11 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceComponentVersion() }), IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionResource.cs index 957b44d9bcaeb..b6a4ed3bb09bf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComponentVersionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_MachineLearningComponentVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentVersion/delete.json // this example is just showing the usage of "ComponentVersions_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 @@ -50,7 +50,7 @@ public async Task Delete_DeleteWorkspaceComponentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentVersion/get.json // this example is just showing the usage of "ComponentVersions_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 @@ -83,7 +83,7 @@ public async Task Get_GetWorkspaceComponentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentVersion/createOrUpdate.json // this example is just showing the usage of "ComponentVersions_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 @@ -110,11 +110,11 @@ public async Task Update_CreateOrUpdateWorkspaceComponentVersion() }), IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, @@ -134,7 +134,7 @@ public async Task Update_CreateOrUpdateWorkspaceComponentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Publish_PublishWorkspaceComponentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ComponentVersion/publish.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ComponentVersion/publish.json // this example is just showing the usage of "ComponentVersions_Publish" 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 @@ -155,9 +155,9 @@ public async Task Publish_PublishWorkspaceComponentVersion() // invoke the operation DestinationAsset body = new DestinationAsset() { + RegistryName = "string", DestinationName = "string", DestinationVersion = "string", - RegistryName = "string", }; await machineLearningComponentVersion.PublishAsync(WaitUntil.Completed, body); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeCollection.cs index 941b234767a73..6a461a382312a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_MachineLearningComputeCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetComputes() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/list.json // this example is just showing the usage of "Compute_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 @@ -58,7 +58,7 @@ public async Task GetAll_GetComputes() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAAKSCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/AKSCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/AKSCompute.json // this example is just showing the usage of "Compute_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 @@ -93,7 +93,7 @@ public async Task Get_GetAAKSCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAAKSCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/AKSCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/AKSCompute.json // this example is just showing the usage of "Compute_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 @@ -124,7 +124,7 @@ public async Task Exists_GetAAKSCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAAKSCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/AKSCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/AKSCompute.json // this example is just showing the usage of "Compute_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 @@ -167,7 +167,7 @@ public async Task GetIfExists_GetAAKSCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAAMLCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/AmlCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/AmlCompute.json // this example is just showing the usage of "Compute_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 @@ -202,7 +202,7 @@ public async Task Get_GetAAMLCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAAMLCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/AmlCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/AmlCompute.json // this example is just showing the usage of "Compute_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 @@ -233,7 +233,7 @@ public async Task Exists_GetAAMLCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAAMLCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/AmlCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/AmlCompute.json // this example is just showing the usage of "Compute_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 @@ -276,7 +276,7 @@ public async Task GetIfExists_GetAAMLCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAKubernetesCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/KubernetesCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/KubernetesCompute.json // this example is just showing the usage of "Compute_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 @@ -311,7 +311,7 @@ public async Task Get_GetAKubernetesCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAKubernetesCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/KubernetesCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/KubernetesCompute.json // this example is just showing the usage of "Compute_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 @@ -342,7 +342,7 @@ public async Task Exists_GetAKubernetesCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAKubernetesCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/KubernetesCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/KubernetesCompute.json // this example is just showing the usage of "Compute_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 @@ -385,7 +385,7 @@ public async Task GetIfExists_GetAKubernetesCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAnComputeInstance() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/ComputeInstance.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/ComputeInstance.json // this example is just showing the usage of "Compute_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 @@ -420,7 +420,7 @@ public async Task Get_GetAnComputeInstance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAnComputeInstance() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/ComputeInstance.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/ComputeInstance.json // this example is just showing the usage of "Compute_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 @@ -451,7 +451,7 @@ public async Task Exists_GetAnComputeInstance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAnComputeInstance() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/ComputeInstance.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/ComputeInstance.json // this example is just showing the usage of "Compute_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 @@ -494,7 +494,7 @@ public async Task GetIfExists_GetAnComputeInstance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AttachAKubernetesCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/createOrUpdate/KubernetesCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/createOrUpdate/KubernetesCompute.json // this example is just showing the usage of "Compute_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 @@ -567,7 +567,7 @@ public async Task CreateOrUpdate_AttachAKubernetesCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAAMLCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/createOrUpdate/BasicAmlCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/createOrUpdate/BasicAmlCompute.json // this example is just showing the usage of "Compute_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 @@ -624,7 +624,7 @@ public async Task CreateOrUpdate_CreateAAMLCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateADataFactoryCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json // this example is just showing the usage of "Compute_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 @@ -664,7 +664,7 @@ public async Task CreateOrUpdate_CreateADataFactoryCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAnAKSCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/createOrUpdate/BasicAKSCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/createOrUpdate/BasicAKSCompute.json // this example is just showing the usage of "Compute_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 @@ -704,7 +704,7 @@ public async Task CreateOrUpdate_CreateAnAKSCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAnComputeInstanceCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/createOrUpdate/ComputeInstance.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/createOrUpdate/ComputeInstance.json // this example is just showing the usage of "Compute_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 @@ -734,7 +734,6 @@ public async Task CreateOrUpdate_CreateAnComputeInstanceCompute() VmSize = "STANDARD_NC6", SubnetId = new ResourceIdentifier("test-subnet-resource-id"), ApplicationSharingPolicy = MachineLearningApplicationSharingPolicy.Personal, - MlflowAutologger = MachineLearningFlowAutoLogger.Enabled, SshSettings = new MachineLearningComputeInstanceSshSettings() { SshPublicAccess = MachineLearningSshPublicAccess.Disabled, @@ -743,18 +742,18 @@ public async Task CreateOrUpdate_CreateAnComputeInstanceCompute() { new CustomService() { -Name = "rstudio-workbench", +Name = "rstudio", Image = new ImageSetting() { ImageType = ImageType.Docker, -Reference = "ghcr.io/azure/rstudio-workbench:latest", +Reference = "ghcr.io/azure/rocker-rstudio-ml-verse:latest", }, EnvironmentVariables = { -["RSP_LICENSE"] = new EnvironmentVariable() +["test_variable"] = new EnvironmentVariable() { VariableType = EnvironmentVariableType.Local, -Value = "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX", +Value = "test_value", }, }, Docker = new DockerSetting() @@ -768,8 +767,7 @@ public async Task CreateOrUpdate_CreateAnComputeInstanceCompute() Protocol = ContainerCommunicationProtocol.Http, Name = "connect", Target = 8787, -Published = 4444, -HostIP = null, +Published = 8787, } }, Volumes = @@ -777,27 +775,14 @@ public async Task CreateOrUpdate_CreateAnComputeInstanceCompute() new VolumeDefinition() { DefinitionType = VolumeDefinitionType.Bind, -ReadOnly = true, -Source = "/mnt/azureuser/", -Target = "/home/testuser/", +ReadOnly = false, +Source = "/home/azureuser/cloudfiles", +Target = "/home/azureuser/cloudfiles", } }, -Kernel = new JupyterKernelConfig() -{ -Argv = -{ -"option1","option2","option3" -}, -DisplayName = "TestKernel", -Language = "python", -}, } }, ComputeInstanceAuthorizationType = MachineLearningComputeInstanceAuthorizationType.Personal, - EnableOSPatching = true, - EnableRootAccess = true, - EnableSso = true, - ReleaseQuotaOnStop = true, PersonalComputeInstanceAssignedUser = new MachineLearningComputeInstanceAssignedUser("00000000-0000-0000-0000-000000000000", Guid.Parse("00000000-0000-0000-0000-000000000000")), }, }, @@ -817,7 +802,7 @@ public async Task CreateOrUpdate_CreateAnComputeInstanceCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json // this example is just showing the usage of "Compute_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 @@ -870,7 +855,7 @@ public async Task CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json // this example is just showing the usage of "Compute_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 @@ -916,7 +901,7 @@ public async Task CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateAAMLCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/createOrUpdate/AmlCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/createOrUpdate/AmlCompute.json // this example is just showing the usage of "Compute_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 @@ -967,7 +952,7 @@ public async Task CreateOrUpdate_UpdateAAMLCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_UpdateAnAKSCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/createOrUpdate/AKSCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/createOrUpdate/AKSCompute.json // this example is just showing the usage of "Compute_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeResource.cs index 31e2e2a57a790..975442a2926a1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningComputeResource.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Threading.Tasks; using System.Xml; using Azure.Core; @@ -22,7 +21,7 @@ public partial class Sample_MachineLearningComputeResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAAKSCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/AKSCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/AKSCompute.json // this example is just showing the usage of "Compute_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 @@ -54,7 +53,7 @@ public async Task Get_GetAAKSCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAAMLCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/AmlCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/AmlCompute.json // this example is just showing the usage of "Compute_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 @@ -86,7 +85,7 @@ public async Task Get_GetAAMLCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAKubernetesCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/KubernetesCompute.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/KubernetesCompute.json // this example is just showing the usage of "Compute_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 @@ -118,7 +117,7 @@ public async Task Get_GetAKubernetesCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAnComputeInstance() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/get/ComputeInstance.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/get/ComputeInstance.json // this example is just showing the usage of "Compute_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 @@ -150,7 +149,7 @@ public async Task Get_GetAnComputeInstance() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAAmlComputeCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/patch.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/patch.json // this example is just showing the usage of "Compute_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 @@ -191,7 +190,7 @@ public async Task Update_UpdateAAmlComputeCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/delete.json // this example is just showing the usage of "Compute_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 @@ -215,85 +214,12 @@ public async Task Delete_DeleteCompute() Console.WriteLine($"Succeeded"); } - // Update Custom Services - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateCustomServices_UpdateCustomServices() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/updateCustomServices.json - // this example is just showing the usage of "Compute_UpdateCustomServices" 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 MachineLearningComputeResource created on azure - // for more information of creating MachineLearningComputeResource, please refer to the document of MachineLearningComputeResource - string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - string resourceGroupName = "testrg123"; - string workspaceName = "workspaces123"; - string computeName = "compute123"; - ResourceIdentifier machineLearningComputeResourceId = MachineLearningComputeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, computeName); - MachineLearningComputeResource machineLearningCompute = client.GetMachineLearningComputeResource(machineLearningComputeResourceId); - - // invoke the operation - IEnumerable customServices = new CustomService[] - { -new CustomService() -{ -Name = "rstudio-workbench", -Image = new ImageSetting() -{ -ImageType = ImageType.Docker, -Reference = "ghcr.io/azure/rstudio-workbench:latest", -}, -EnvironmentVariables = -{ -["RSP_LICENSE"] = new EnvironmentVariable() -{ -VariableType = EnvironmentVariableType.Local, -Value = "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX", -}, -}, -Docker = new DockerSetting() -{ -Privileged = true, -}, -Endpoints = -{ -new ContainerEndpoint() -{ -Protocol = ContainerCommunicationProtocol.Http, -Name = "connect", -Target = 8787, -Published = 4444, -HostIP = null, -} -}, -Volumes = -{ -new VolumeDefinition() -{ -DefinitionType = VolumeDefinitionType.Bind, -ReadOnly = true, -Source = "/mnt/azureuser/", -Target = "/home/testuser/", -} -}, -} - }; - await machineLearningCompute.UpdateCustomServicesAsync(customServices); - - Console.WriteLine($"Succeeded"); - } - // Get compute nodes information for a compute [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetNodes_GetComputeNodesInformationForACompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/listNodes.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/listNodes.json // this example is just showing the usage of "Compute_ListNodes" 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 @@ -324,7 +250,7 @@ public async Task GetNodes_GetComputeNodesInformationForACompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKeys_ListAKSComputeKeys() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/listKeys.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/listKeys.json // this example is just showing the usage of "Compute_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -347,52 +273,12 @@ public async Task GetKeys_ListAKSComputeKeys() Console.WriteLine($"Succeeded: {result}"); } - // Update Data Mounts - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateDataMounts_UpdateDataMounts() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/updateDataMounts.json - // this example is just showing the usage of "Compute_UpdateDataMounts" 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 MachineLearningComputeResource created on azure - // for more information of creating MachineLearningComputeResource, please refer to the document of MachineLearningComputeResource - string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - string resourceGroupName = "testrg123"; - string workspaceName = "workspaces123"; - string computeName = "compute123"; - ResourceIdentifier machineLearningComputeResourceId = MachineLearningComputeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, computeName); - MachineLearningComputeResource machineLearningCompute = client.GetMachineLearningComputeResource(machineLearningComputeResourceId); - - // invoke the operation - IEnumerable dataMounts = new MachineLearningComputeInstanceDataMount[] - { -new MachineLearningComputeInstanceDataMount() -{ -Source = "azureml://subscriptions/some-sub/resourcegroups/some-rg/workspaces/some-ws/data/some-data-asset-name/versions/some-data-asset-version", -SourceType = MachineLearningSourceType.Uri, -MountName = "hello", -MountAction = MachineLearningMountAction.Mount, -MountMode = MountMode.ReadOnly, -MountPath = "/some/random/path/on/host", -} - }; - await machineLearningCompute.UpdateDataMountsAsync(dataMounts); - - Console.WriteLine($"Succeeded"); - } - // Start ComputeInstance Compute [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Start_StartComputeInstanceCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/start.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/start.json // this example is just showing the usage of "Compute_Start" 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 @@ -420,7 +306,7 @@ public async Task Start_StartComputeInstanceCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Stop_StopComputeInstanceCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/stop.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/stop.json // this example is just showing the usage of "Compute_Stop" 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 @@ -448,7 +334,7 @@ public async Task Stop_StopComputeInstanceCompute() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Restart_RestartComputeInstanceCompute() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/restart.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Compute/restart.json // this example is just showing the usage of "Compute_Restart" 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 @@ -470,100 +356,5 @@ public async Task Restart_RestartComputeInstanceCompute() Console.WriteLine($"Succeeded"); } - - // Update idle shutdown setting of ComputeInstance - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task UpdateIdleShutdownSetting_UpdateIdleShutdownSettingOfComputeInstance() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/updateIdleShutdownSetting.json - // this example is just showing the usage of "Compute_UpdateIdleShutdownSetting" 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 MachineLearningComputeResource created on azure - // for more information of creating MachineLearningComputeResource, please refer to the document of MachineLearningComputeResource - string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - string resourceGroupName = "testrg123"; - string workspaceName = "workspaces123"; - string computeName = "compute123"; - ResourceIdentifier machineLearningComputeResourceId = MachineLearningComputeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, computeName); - MachineLearningComputeResource machineLearningCompute = client.GetMachineLearningComputeResource(machineLearningComputeResourceId); - - // invoke the operation - IdleShutdownSetting idleShutdownSetting = new IdleShutdownSetting() - { - IdleTimeBeforeShutdown = "PT120M", - }; - await machineLearningCompute.UpdateIdleShutdownSettingAsync(idleShutdownSetting); - - Console.WriteLine($"Succeeded"); - } - - // List VM Sizes - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAllowedResizeSizes_ListVMSizes() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/getAllowedVMSizesForResize.json - // this example is just showing the usage of "Compute_GetAllowedResizeSizes" 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 MachineLearningComputeResource created on azure - // for more information of creating MachineLearningComputeResource, please refer to the document of MachineLearningComputeResource - string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - string resourceGroupName = "testrg123"; - string workspaceName = "workspaces123"; - string computeName = "compute123"; - ResourceIdentifier machineLearningComputeResourceId = MachineLearningComputeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, computeName); - MachineLearningComputeResource machineLearningCompute = client.GetMachineLearningComputeResource(machineLearningComputeResourceId); - - // invoke the operation and iterate over the result - await foreach (MachineLearningVmSize item in machineLearningCompute.GetAllowedResizeSizesAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine($"Succeeded"); - } - - // List VM Sizes - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Resize_ListVMSizes() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Compute/resize.json - // this example is just showing the usage of "Compute_Resize" 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 MachineLearningComputeResource created on azure - // for more information of creating MachineLearningComputeResource, please refer to the document of MachineLearningComputeResource - string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - string resourceGroupName = "testrg123"; - string workspaceName = "workspaces123"; - string computeName = "compute123"; - ResourceIdentifier machineLearningComputeResourceId = MachineLearningComputeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, computeName); - MachineLearningComputeResource machineLearningCompute = client.GetMachineLearningComputeResource(machineLearningComputeResourceId); - - // invoke the operation - ResizeSchema resizeSchema = new ResizeSchema() - { - TargetVmSize = "Standard_DS11_v2", - }; - await machineLearningCompute.ResizeAsync(WaitUntil.Completed, resizeSchema); - - Console.WriteLine($"Succeeded"); - } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerCollection.cs index 3937c29f1adbf..6f9601b08da15 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningDataContainerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataContainer/list.json // this example is just showing the usage of "DataContainers_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 @@ -57,7 +57,7 @@ public async Task GetAll_ListWorkspaceDataContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataContainer/get.json // this example is just showing the usage of "DataContainers_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 @@ -92,7 +92,7 @@ public async Task Get_GetWorkspaceDataContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataContainer/get.json // this example is just showing the usage of "DataContainers_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 @@ -123,7 +123,7 @@ public async Task Exists_GetWorkspaceDataContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataContainer/get.json // this example is just showing the usage of "DataContainers_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 GetIfExists_GetWorkspaceDataContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataContainer/createOrUpdate.json // this example is just showing the usage of "DataContainers_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 @@ -190,15 +190,15 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceDataContainer() MachineLearningDataContainerData data = new MachineLearningDataContainerData(new MachineLearningDataContainerProperties(new MachineLearningDataType("UriFile")) { Description = "string", - Properties = -{ -["properties1"] = "value1", -["properties2"] = "value2", -}, Tags = { ["tag1"] = "value1", ["tag2"] = "value2", +}, + Properties = +{ +["properties1"] = "value1", +["properties2"] = "value2", }, }); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerResource.cs index 492a2a6af754b..3ec589db26044 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataContainerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningDataContainerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataContainer/delete.json // this example is just showing the usage of "DataContainers_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteWorkspaceDataContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataContainer/get.json // this example is just showing the usage of "DataContainers_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 @@ -80,7 +80,7 @@ public async Task Get_GetWorkspaceDataContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataContainer/createOrUpdate.json // this example is just showing the usage of "DataContainers_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 @@ -101,15 +101,15 @@ public async Task Update_CreateOrUpdateWorkspaceDataContainer() MachineLearningDataContainerData data = new MachineLearningDataContainerData(new MachineLearningDataContainerProperties(new MachineLearningDataType("UriFile")) { Description = "string", - Properties = -{ -["properties1"] = "value1", -["properties2"] = "value2", -}, Tags = { ["tag1"] = "value1", ["tag2"] = "value2", +}, + Properties = +{ +["properties1"] = "value1", +["properties2"] = "value2", }, }); ArmOperation lro = await machineLearningDataContainer.UpdateAsync(WaitUntil.Completed, data); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionCollection.cs index c3539c21473c0..9322c2bc5e5f1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningDataVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataVersionBase/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataVersionBase/list.json // this example is just showing the usage of "DataVersions_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 @@ -61,7 +61,7 @@ public async Task GetAll_ListWorkspaceDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataVersionBase/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataVersionBase/get.json // this example is just showing the usage of "DataVersions_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 @@ -97,7 +97,7 @@ public async Task Get_GetWorkspaceDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataVersionBase/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataVersionBase/get.json // this example is just showing the usage of "DataVersions_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 @@ -129,7 +129,7 @@ public async Task Exists_GetWorkspaceDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataVersionBase/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataVersionBase/get.json // this example is just showing the usage of "DataVersions_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 @@ -173,7 +173,7 @@ public async Task GetIfExists_GetWorkspaceDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataVersionBase/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataVersionBase/createOrUpdate.json // this example is just showing the usage of "DataVersions_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 @@ -199,11 +199,11 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceDataVersionBase() { IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionResource.cs index b7d2f6e815957..1abf5d6886837 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDataVersionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningDataVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataVersionBase/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataVersionBase/delete.json // this example is just showing the usage of "DataVersions_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteWorkspaceDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataVersionBase/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataVersionBase/get.json // this example is just showing the usage of "DataVersions_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 @@ -82,7 +82,7 @@ public async Task Get_GetWorkspaceDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataVersionBase/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataVersionBase/createOrUpdate.json // this example is just showing the usage of "DataVersions_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 @@ -105,11 +105,11 @@ public async Task Update_CreateOrUpdateWorkspaceDataVersionBase() { IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, @@ -129,7 +129,7 @@ public async Task Update_CreateOrUpdateWorkspaceDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Publish_PublishWorkspaceDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/DataVersionBase/publish.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/DataVersionBase/publish.json // this example is just showing the usage of "DataVersions_Publish" 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 @@ -150,9 +150,9 @@ public async Task Publish_PublishWorkspaceDataVersionBase() // invoke the operation DestinationAsset body = new DestinationAsset() { + RegistryName = "string", DestinationName = "string", DestinationVersion = "string", - RegistryName = "string", }; await machineLearningDataVersion.PublishAsync(WaitUntil.Completed, body); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreCollection.cs index 7af753635dc01..867501bd85754 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningDatastoreCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDatastore() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/get.json // this example is just showing the usage of "Datastores_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 @@ -55,7 +55,7 @@ public async Task Get_GetDatastore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDatastore() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/get.json // this example is just showing the usage of "Datastores_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 @@ -86,7 +86,7 @@ public async Task Exists_GetDatastore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDatastore() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/get.json // this example is just showing the usage of "Datastores_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 @@ -129,7 +129,7 @@ public async Task GetIfExists_GetDatastore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json // this example is just showing the usage of "Datastores_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 @@ -150,22 +150,22 @@ public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServic // invoke the operation string name = "string"; - MachineLearningDatastoreData data = new MachineLearningDatastoreData(new MachineLearningAzureDataLakeGen1Datastore(new MachineLearningServicePrincipalDatastoreCredentials(Guid.Parse("00000000-1111-2222-3333-444444444444"), new MachineLearningServicePrincipalDatastoreSecrets() + MachineLearningDatastoreData data = new MachineLearningDatastoreData(new MachineLearningAzureDataLakeGen1Datastore(new MachineLearningServicePrincipalDatastoreCredentials(Guid.Parse("00000000-1111-2222-3333-444444444444"), Guid.Parse("00000000-1111-2222-3333-444444444444"), new MachineLearningServicePrincipalDatastoreSecrets() { ClientSecret = "string", - }, Guid.Parse("00000000-1111-2222-3333-444444444444")) + }) { AuthorityUri = new Uri("string"), ResourceUri = new Uri("string"), }, "string") { Description = "string", - Properties = -{ -}, Tags = { ["string"] = "string", +}, + Properties = +{ }, }); bool? skipValidation = false; @@ -184,7 +184,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServic [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json // this example is just showing the usage of "Datastores_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 @@ -205,10 +205,10 @@ public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServic // invoke the operation string name = "string"; - MachineLearningDatastoreData data = new MachineLearningDatastoreData(new MachineLearningAzureDataLakeGen2Datastore(new MachineLearningServicePrincipalDatastoreCredentials(Guid.Parse("00000000-1111-2222-3333-444444444444"), new MachineLearningServicePrincipalDatastoreSecrets() + MachineLearningDatastoreData data = new MachineLearningDatastoreData(new MachineLearningAzureDataLakeGen2Datastore(new MachineLearningServicePrincipalDatastoreCredentials(Guid.Parse("00000000-1111-2222-3333-444444444444"), Guid.Parse("00000000-1111-2222-3333-444444444444"), new MachineLearningServicePrincipalDatastoreSecrets() { ClientSecret = "string", - }, Guid.Parse("00000000-1111-2222-3333-444444444444")) + }) { AuthorityUri = new Uri("string"), ResourceUri = new Uri("string"), @@ -217,12 +217,12 @@ public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServic Endpoint = "string", Protocol = "string", Description = "string", - Properties = -{ -}, Tags = { ["string"] = "string", +}, + Properties = +{ }, }); bool? skipValidation = false; @@ -241,7 +241,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServic [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKey() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json // this example is just showing the usage of "Datastores_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 @@ -270,12 +270,12 @@ public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKe Endpoint = "string", Protocol = "string", Description = "string", - Properties = -{ -}, Tags = { ["string"] = "string", +}, + Properties = +{ }, }); bool? skipValidation = false; @@ -294,7 +294,7 @@ public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json // this example is just showing the usage of "Datastores_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 @@ -325,12 +325,12 @@ public async Task CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey() Endpoint = "core.windows.net", Protocol = "https", Description = "string", - Properties = -{ -}, Tags = { ["string"] = "string", +}, + Properties = +{ }, }); bool? skipValidation = false; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreResource.cs index fdd397e1bbb22..aa8054b021d8f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningDatastoreResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningDatastoreResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteDatastore() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/delete.json // this example is just showing the usage of "Datastores_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteDatastore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDatastore() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/get.json // this example is just showing the usage of "Datastores_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 @@ -80,7 +80,7 @@ public async Task Get_GetDatastore() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json // this example is just showing the usage of "Datastores_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,22 +98,22 @@ public async Task Update_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincip MachineLearningDatastoreResource machineLearningDatastore = client.GetMachineLearningDatastoreResource(machineLearningDatastoreResourceId); // invoke the operation - MachineLearningDatastoreData data = new MachineLearningDatastoreData(new MachineLearningAzureDataLakeGen1Datastore(new MachineLearningServicePrincipalDatastoreCredentials(Guid.Parse("00000000-1111-2222-3333-444444444444"), new MachineLearningServicePrincipalDatastoreSecrets() + MachineLearningDatastoreData data = new MachineLearningDatastoreData(new MachineLearningAzureDataLakeGen1Datastore(new MachineLearningServicePrincipalDatastoreCredentials(Guid.Parse("00000000-1111-2222-3333-444444444444"), Guid.Parse("00000000-1111-2222-3333-444444444444"), new MachineLearningServicePrincipalDatastoreSecrets() { ClientSecret = "string", - }, Guid.Parse("00000000-1111-2222-3333-444444444444")) + }) { AuthorityUri = new Uri("string"), ResourceUri = new Uri("string"), }, "string") { Description = "string", - Properties = -{ -}, Tags = { ["string"] = "string", +}, + Properties = +{ }, }); bool? skipValidation = false; @@ -132,7 +132,7 @@ public async Task Update_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincip [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json // this example is just showing the usage of "Datastores_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 @@ -150,10 +150,10 @@ public async Task Update_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincip MachineLearningDatastoreResource machineLearningDatastore = client.GetMachineLearningDatastoreResource(machineLearningDatastoreResourceId); // invoke the operation - MachineLearningDatastoreData data = new MachineLearningDatastoreData(new MachineLearningAzureDataLakeGen2Datastore(new MachineLearningServicePrincipalDatastoreCredentials(Guid.Parse("00000000-1111-2222-3333-444444444444"), new MachineLearningServicePrincipalDatastoreSecrets() + MachineLearningDatastoreData data = new MachineLearningDatastoreData(new MachineLearningAzureDataLakeGen2Datastore(new MachineLearningServicePrincipalDatastoreCredentials(Guid.Parse("00000000-1111-2222-3333-444444444444"), Guid.Parse("00000000-1111-2222-3333-444444444444"), new MachineLearningServicePrincipalDatastoreSecrets() { ClientSecret = "string", - }, Guid.Parse("00000000-1111-2222-3333-444444444444")) + }) { AuthorityUri = new Uri("string"), ResourceUri = new Uri("string"), @@ -162,12 +162,12 @@ public async Task Update_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincip Endpoint = "string", Protocol = "string", Description = "string", - Properties = -{ -}, Tags = { ["string"] = "string", +}, + Properties = +{ }, }); bool? skipValidation = false; @@ -186,7 +186,7 @@ public async Task Update_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincip [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateDatastoreAzureFileStoreWAccountKey() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json // this example is just showing the usage of "Datastores_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 @@ -212,12 +212,12 @@ public async Task Update_CreateOrUpdateDatastoreAzureFileStoreWAccountKey() Endpoint = "string", Protocol = "string", Description = "string", - Properties = -{ -}, Tags = { ["string"] = "string", +}, + Properties = +{ }, }); bool? skipValidation = false; @@ -236,7 +236,7 @@ public async Task Update_CreateOrUpdateDatastoreAzureFileStoreWAccountKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateDatastoreAzureBlobWAccountKey() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json // this example is just showing the usage of "Datastores_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 @@ -264,12 +264,12 @@ public async Task Update_CreateOrUpdateDatastoreAzureBlobWAccountKey() Endpoint = "core.windows.net", Protocol = "https", Description = "string", - Properties = -{ -}, Tags = { ["string"] = "string", +}, + Properties = +{ }, }); bool? skipValidation = false; @@ -288,7 +288,7 @@ public async Task Update_CreateOrUpdateDatastoreAzureBlobWAccountKey() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_GetDatastoreSecrets() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Datastore/listSecrets.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Datastore/listSecrets.json // this example is just showing the usage of "Datastores_ListSecrets" 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 @@ -306,12 +306,7 @@ public async Task GetSecrets_GetDatastoreSecrets() MachineLearningDatastoreResource machineLearningDatastore = client.GetMachineLearningDatastoreResource(machineLearningDatastoreResourceId); // invoke the operation - SecretExpiry body = new SecretExpiry() - { - ExpirableSecret = false, - ExpireAfterHours = 1, - }; - MachineLearningDatastoreSecrets result = await machineLearningDatastore.GetSecretsAsync(body: body); + MachineLearningDatastoreSecrets result = await machineLearningDatastore.GetSecretsAsync(); Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerCollection.cs index 210023b977225..f9b942a862b6f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningEnvironmentContainerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentContainer/list.json // this example is just showing the usage of "EnvironmentContainers_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 @@ -57,7 +57,7 @@ public async Task GetAll_ListWorkspaceEnvironmentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentContainer/get.json // this example is just showing the usage of "EnvironmentContainers_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 @@ -92,7 +92,7 @@ public async Task Get_GetWorkspaceEnvironmentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentContainer/get.json // this example is just showing the usage of "EnvironmentContainers_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 @@ -123,7 +123,7 @@ public async Task Exists_GetWorkspaceEnvironmentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentContainer/get.json // this example is just showing the usage of "EnvironmentContainers_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 GetIfExists_GetWorkspaceEnvironmentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentContainer/createOrUpdate.json // this example is just showing the usage of "EnvironmentContainers_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 @@ -190,13 +190,13 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceEnvironmentContainer() MachineLearningEnvironmentContainerData data = new MachineLearningEnvironmentContainerData(new MachineLearningEnvironmentContainerProperties() { Description = "string", - Properties = + Tags = { ["additionalProp1"] = "string", ["additionalProp2"] = "string", ["additionalProp3"] = "string", }, - Tags = + Properties = { ["additionalProp1"] = "string", ["additionalProp2"] = "string", diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerResource.cs index 3b19437c84b96..8012a5d4768a1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentContainerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningEnvironmentContainerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentContainer/delete.json // this example is just showing the usage of "EnvironmentContainers_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteWorkspaceEnvironmentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentContainer/get.json // this example is just showing the usage of "EnvironmentContainers_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 @@ -80,7 +80,7 @@ public async Task Get_GetWorkspaceEnvironmentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentContainer/createOrUpdate.json // this example is just showing the usage of "EnvironmentContainers_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 @@ -101,13 +101,13 @@ public async Task Update_CreateOrUpdateWorkspaceEnvironmentContainer() MachineLearningEnvironmentContainerData data = new MachineLearningEnvironmentContainerData(new MachineLearningEnvironmentContainerProperties() { Description = "string", - Properties = + Tags = { ["additionalProp1"] = "string", ["additionalProp2"] = "string", ["additionalProp3"] = "string", }, - Tags = + Properties = { ["additionalProp1"] = "string", ["additionalProp2"] = "string", diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionCollection.cs index 240f5fc7f67fa..69cf08303cea7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningEnvironmentVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentVersion/list.json // this example is just showing the usage of "EnvironmentVersions_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 @@ -60,7 +60,7 @@ public async Task GetAll_ListWorkspaceEnvironmentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentVersion/get.json // this example is just showing the usage of "EnvironmentVersions_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 @@ -96,7 +96,7 @@ public async Task Get_GetWorkspaceEnvironmentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentVersion/get.json // this example is just showing the usage of "EnvironmentVersions_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 @@ -128,7 +128,7 @@ public async Task Exists_GetWorkspaceEnvironmentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentVersion/get.json // this example is just showing the usage of "EnvironmentVersions_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 @@ -172,7 +172,7 @@ public async Task GetIfExists_GetWorkspaceEnvironmentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentVersion/createOrUpdate.json // this example is just showing the usage of "EnvironmentVersions_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 @@ -196,12 +196,12 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceEnvironmentVersion() string version = "string"; MachineLearningEnvironmentVersionData data = new MachineLearningEnvironmentVersionData(new MachineLearningEnvironmentVersionProperties() { + Image = "docker.io/tensorflow/serving:latest", + CondaFile = "string", Build = new MachineLearningBuildContext(new Uri("https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/")) { DockerfilePath = "prod/Dockerfile", }, - CondaFile = "string", - Image = "docker.io/tensorflow/serving:latest", InferenceConfig = new MachineLearningInferenceContainerProperties() { LivenessRoute = new MachineLearningInferenceContainerRoute("string", 1), @@ -210,11 +210,11 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceEnvironmentVersion() }, IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionResource.cs index e27a0544fdb0a..05d3c003acf27 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningEnvironmentVersionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningEnvironmentVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentVersion/delete.json // this example is just showing the usage of "EnvironmentVersions_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteWorkspaceEnvironmentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentVersion/get.json // this example is just showing the usage of "EnvironmentVersions_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 @@ -82,7 +82,7 @@ public async Task Get_GetWorkspaceEnvironmentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentVersion/createOrUpdate.json // this example is just showing the usage of "EnvironmentVersions_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 @@ -103,12 +103,12 @@ public async Task Update_CreateOrUpdateWorkspaceEnvironmentVersion() // invoke the operation MachineLearningEnvironmentVersionData data = new MachineLearningEnvironmentVersionData(new MachineLearningEnvironmentVersionProperties() { + Image = "docker.io/tensorflow/serving:latest", + CondaFile = "string", Build = new MachineLearningBuildContext(new Uri("https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/")) { DockerfilePath = "prod/Dockerfile", }, - CondaFile = "string", - Image = "docker.io/tensorflow/serving:latest", InferenceConfig = new MachineLearningInferenceContainerProperties() { LivenessRoute = new MachineLearningInferenceContainerRoute("string", 1), @@ -117,11 +117,11 @@ public async Task Update_CreateOrUpdateWorkspaceEnvironmentVersion() }, IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, @@ -141,7 +141,7 @@ public async Task Update_CreateOrUpdateWorkspaceEnvironmentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Publish_PublishWorkspaceEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/EnvironmentVersion/publish.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/EnvironmentVersion/publish.json // this example is just showing the usage of "EnvironmentVersions_Publish" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,9 +162,9 @@ public async Task Publish_PublishWorkspaceEnvironmentVersion() // invoke the operation DestinationAsset body = new DestinationAsset() { + RegistryName = "string", DestinationName = "string", DestinationVersion = "string", - RegistryName = "string", }; await machineLearningEnvironmentVersion.PublishAsync(WaitUntil.Completed, body); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureCollection.cs index cb63f4b174632..f608cb7267154 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningFeatureCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListFeature() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Feature/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Feature/list.json // this example is just showing the usage of "Features_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 @@ -60,7 +60,7 @@ public async Task GetAll_ListFeature() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFeature() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Feature/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Feature/get.json // this example is just showing the usage of "Features_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 @@ -97,7 +97,7 @@ public async Task Get_GetFeature() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetFeature() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Feature/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Feature/get.json // this example is just showing the usage of "Features_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 @@ -130,7 +130,7 @@ public async Task Exists_GetFeature() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetFeature() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Feature/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Feature/get.json // this example is just showing the usage of "Features_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureResource.cs index 345ad94183b7b..cda6032613d62 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureResource.cs @@ -19,7 +19,7 @@ public partial class Sample_MachineLearningFeatureResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetFeature() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Feature/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Feature/get.json // this example is just showing the usage of "Features_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerCollection.cs index 4910280ac2ab7..5fee07b04ef7d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningFeatureSetContainerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceFeaturesetContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetContainer/list.json // this example is just showing the usage of "FeaturesetContainers_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 @@ -58,7 +58,7 @@ public async Task GetAll_ListWorkspaceFeaturesetContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetEntityWorkspaceFeaturesetContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetContainer/getEntity.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetContainer/getEntity.json // this example is just showing the usage of "FeaturesetContainers_GetEntity" 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,7 +93,7 @@ public async Task Get_GetEntityWorkspaceFeaturesetContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetEntityWorkspaceFeaturesetContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetContainer/getEntity.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetContainer/getEntity.json // this example is just showing the usage of "FeaturesetContainers_GetEntity" 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 @@ -124,7 +124,7 @@ public async Task Exists_GetEntityWorkspaceFeaturesetContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetEntityWorkspaceFeaturesetContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetContainer/getEntity.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetContainer/getEntity.json // this example is just showing the usage of "FeaturesetContainers_GetEntity" 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 @@ -167,7 +167,7 @@ public async Task GetIfExists_GetEntityWorkspaceFeaturesetContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceFeaturesetContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetContainer/createOrUpdate.json // this example is just showing the usage of "FeaturesetContainers_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 @@ -192,11 +192,11 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceFeaturesetContainer() { IsArchived = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerResource.cs index c98876f53bd37..ce733de06b20e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetContainerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningFeatureSetContainerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceFeaturesetContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetContainer/delete.json // this example is just showing the usage of "FeaturesetContainers_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteWorkspaceFeaturesetContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetEntityWorkspaceFeaturesetContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetContainer/getEntity.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetContainer/getEntity.json // this example is just showing the usage of "FeaturesetContainers_GetEntity" 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 @@ -80,7 +80,7 @@ public async Task Get_GetEntityWorkspaceFeaturesetContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceFeaturesetContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetContainer/createOrUpdate.json // this example is just showing the usage of "FeaturesetContainers_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 @@ -102,11 +102,11 @@ public async Task Update_CreateOrUpdateWorkspaceFeaturesetContainer() { IsArchived = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionCollection.cs index 017cf5f9f64f7..8829694e89389 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningFeatureSetVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceFeaturesetVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/list.json // this example is just showing the usage of "FeaturesetVersions_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 @@ -59,7 +59,7 @@ public async Task GetAll_ListWorkspaceFeaturesetVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceFeaturesetVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/get.json // this example is just showing the usage of "FeaturesetVersions_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 @@ -95,7 +95,7 @@ public async Task Get_GetWorkspaceFeaturesetVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceFeaturesetVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/get.json // this example is just showing the usage of "FeaturesetVersions_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 @@ -127,7 +127,7 @@ public async Task Exists_GetWorkspaceFeaturesetVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceFeaturesetVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/get.json // this example is just showing the usage of "FeaturesetVersions_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 @@ -171,7 +171,7 @@ public async Task GetIfExists_GetWorkspaceFeaturesetVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceFeaturesetVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/createOrUpdate.json // this example is just showing the usage of "FeaturesetVersions_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 @@ -195,24 +195,10 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceFeaturesetVersion() string version = "string"; MachineLearningFeatureSetVersionData data = new MachineLearningFeatureSetVersionData(new MachineLearningFeatureSetVersionProperties() { - Entities = -{ -"string" -}, + SpecificationPath = "string", MaterializationSettings = new MaterializationSettings() { - Notification = new NotificationSetting() - { - EmailOn = -{ -EmailNotificationEnableType.JobFailed -}, - Emails = -{ -"string" -}, - }, - ResourceInstanceType = "string", + StoreType = MaterializationStoreType.Online, Schedule = new MachineLearningRecurrenceTrigger(MachineLearningRecurrenceFrequency.Day, 1) { Schedule = new MachineLearningRecurrenceSchedule(new int[] @@ -223,35 +209,49 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceFeaturesetVersion() 1 }) { - MonthDays = -{ -1 -}, WeekDays = { MachineLearningDayOfWeek.Monday +}, + MonthDays = +{ +1 }, }, EndTime = "string", StartTime = "string", TimeZone = "string", }, + Notification = new NotificationSetting() + { + Emails = +{ +"string" +}, + EmailOn = +{ +EmailNotificationEnableType.JobFailed +}, + }, + ResourceInstanceType = "string", SparkConfiguration = { ["string"] = "string", }, - StoreType = MaterializationStoreType.Online, }, - SpecificationPath = "string", Stage = "string", - IsAnonymous = false, + Entities = +{ +"string" +}, IsArchived = false, + IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionResource.cs index 0322fbecb1c2d..d844af9bb131f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureSetVersionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningFeatureSetVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceFeaturesetVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/delete.json // this example is just showing the usage of "FeaturesetVersions_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteWorkspaceFeaturesetVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceFeaturesetVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/get.json // this example is just showing the usage of "FeaturesetVersions_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 @@ -82,7 +82,7 @@ public async Task Get_GetWorkspaceFeaturesetVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceFeaturesetVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/createOrUpdate.json // this example is just showing the usage of "FeaturesetVersions_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 @@ -103,24 +103,10 @@ public async Task Update_CreateOrUpdateWorkspaceFeaturesetVersion() // invoke the operation MachineLearningFeatureSetVersionData data = new MachineLearningFeatureSetVersionData(new MachineLearningFeatureSetVersionProperties() { - Entities = -{ -"string" -}, + SpecificationPath = "string", MaterializationSettings = new MaterializationSettings() { - Notification = new NotificationSetting() - { - EmailOn = -{ -EmailNotificationEnableType.JobFailed -}, - Emails = -{ -"string" -}, - }, - ResourceInstanceType = "string", + StoreType = MaterializationStoreType.Online, Schedule = new MachineLearningRecurrenceTrigger(MachineLearningRecurrenceFrequency.Day, 1) { Schedule = new MachineLearningRecurrenceSchedule(new int[] @@ -131,35 +117,49 @@ public async Task Update_CreateOrUpdateWorkspaceFeaturesetVersion() 1 }) { - MonthDays = -{ -1 -}, WeekDays = { MachineLearningDayOfWeek.Monday +}, + MonthDays = +{ +1 }, }, EndTime = "string", StartTime = "string", TimeZone = "string", }, + Notification = new NotificationSetting() + { + Emails = +{ +"string" +}, + EmailOn = +{ +EmailNotificationEnableType.JobFailed +}, + }, + ResourceInstanceType = "string", SparkConfiguration = { ["string"] = "string", }, - StoreType = MaterializationStoreType.Online, }, - SpecificationPath = "string", Stage = "string", - IsAnonymous = false, + Entities = +{ +"string" +}, IsArchived = false, + IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, @@ -179,7 +179,7 @@ public async Task Update_CreateOrUpdateWorkspaceFeaturesetVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Backfill_BackfillWorkspaceFeaturesetVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturesetVersion/backfill.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturesetVersion/backfill.json // this example is just showing the usage of "FeaturesetVersions_Backfill" 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 @@ -200,24 +200,24 @@ public async Task Backfill_BackfillWorkspaceFeaturesetVersion() // invoke the operation FeatureSetVersionBackfillContent content = new FeatureSetVersionBackfillContent() { - DataAvailabilityStatus = -{ -DataAvailabilityStatus.None -}, - Description = "string", DisplayName = "string", + Description = "string", FeatureWindow = new FeatureWindow() { - FeatureWindowEnd = DateTimeOffset.Parse("2020-01-01T12:34:56.999+00:51"), FeatureWindowStart = DateTimeOffset.Parse("2020-01-01T12:34:56.999+00:51"), + FeatureWindowEnd = DateTimeOffset.Parse("2020-01-01T12:34:56.999+00:51"), }, + DataAvailabilityStatus = +{ +DataAvailabilityStatus.None +}, JobId = "string", - ResourceInstanceType = "string", - SparkConfiguration = + Tags = { ["string"] = "string", }, - Tags = + ResourceInstanceType = "string", + SparkConfiguration = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerCollection.cs index 5703389d9baf8..acf6c88b8641a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningFeatureStoreEntityContainerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceFeaturestoreEntityContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityContainer/list.json // this example is just showing the usage of "FeaturestoreEntityContainers_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 @@ -58,7 +58,7 @@ public async Task GetAll_ListWorkspaceFeaturestoreEntityContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetEntityWorkspaceFeaturestoreEntityContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityContainer/getEntity.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityContainer/getEntity.json // this example is just showing the usage of "FeaturestoreEntityContainers_GetEntity" 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,7 +93,7 @@ public async Task Get_GetEntityWorkspaceFeaturestoreEntityContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetEntityWorkspaceFeaturestoreEntityContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityContainer/getEntity.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityContainer/getEntity.json // this example is just showing the usage of "FeaturestoreEntityContainers_GetEntity" 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 @@ -124,7 +124,7 @@ public async Task Exists_GetEntityWorkspaceFeaturestoreEntityContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetEntityWorkspaceFeaturestoreEntityContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityContainer/getEntity.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityContainer/getEntity.json // this example is just showing the usage of "FeaturestoreEntityContainers_GetEntity" 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 @@ -167,7 +167,7 @@ public async Task GetIfExists_GetEntityWorkspaceFeaturestoreEntityContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceFeaturestoreEntityContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json // this example is just showing the usage of "FeaturestoreEntityContainers_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 @@ -192,11 +192,11 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceFeaturestoreEntityContai { IsArchived = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerResource.cs index 29a8f77229aaf..742b6d9c25993 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeatureStoreEntityContainerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningFeatureStoreEntityContainerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceFeaturestoreEntityContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityContainer/delete.json // this example is just showing the usage of "FeaturestoreEntityContainers_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteWorkspaceFeaturestoreEntityContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetEntityWorkspaceFeaturestoreEntityContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityContainer/getEntity.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityContainer/getEntity.json // this example is just showing the usage of "FeaturestoreEntityContainers_GetEntity" 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 @@ -80,7 +80,7 @@ public async Task Get_GetEntityWorkspaceFeaturestoreEntityContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceFeaturestoreEntityContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json // this example is just showing the usage of "FeaturestoreEntityContainers_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 @@ -102,11 +102,11 @@ public async Task Update_CreateOrUpdateWorkspaceFeaturestoreEntityContainer() { IsArchived = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionCollection.cs index 0c243903be494..ca53970a03214 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningFeaturestoreEntityVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceFeaturestoreEntityVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityVersion/list.json // this example is just showing the usage of "FeaturestoreEntityVersions_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 @@ -59,7 +59,7 @@ public async Task GetAll_ListWorkspaceFeaturestoreEntityVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceFeaturestoreEntityVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityVersion/get.json // this example is just showing the usage of "FeaturestoreEntityVersions_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 @@ -95,7 +95,7 @@ public async Task Get_GetWorkspaceFeaturestoreEntityVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceFeaturestoreEntityVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityVersion/get.json // this example is just showing the usage of "FeaturestoreEntityVersions_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 @@ -127,7 +127,7 @@ public async Task Exists_GetWorkspaceFeaturestoreEntityVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceFeaturestoreEntityVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityVersion/get.json // this example is just showing the usage of "FeaturestoreEntityVersions_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 @@ -171,7 +171,7 @@ public async Task GetIfExists_GetWorkspaceFeaturestoreEntityVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceFeaturestoreEntityVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json // this example is just showing the usage of "FeaturestoreEntityVersions_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 @@ -199,18 +199,18 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceFeaturestoreEntityVersio { new IndexColumn() { -ColumnName = "string", DataType = FeatureDataType.Datetime, +ColumnName = "string", } }, - IsAnonymous = false, IsArchived = false, + IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionResource.cs index 9adb6dc0282e5..d21d51684ea04 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningFeaturestoreEntityVersionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningFeaturestoreEntityVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceFeaturestoreEntityVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityVersion/delete.json // this example is just showing the usage of "FeaturestoreEntityVersions_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteWorkspaceFeaturestoreEntityVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceFeaturestoreEntityVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityVersion/get.json // this example is just showing the usage of "FeaturestoreEntityVersions_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 @@ -82,7 +82,7 @@ public async Task Get_GetWorkspaceFeaturestoreEntityVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceFeaturestoreEntityVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json // this example is just showing the usage of "FeaturestoreEntityVersions_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 @@ -107,18 +107,18 @@ public async Task Update_CreateOrUpdateWorkspaceFeaturestoreEntityVersion() { new IndexColumn() { -ColumnName = "string", DataType = FeatureDataType.Datetime, +ColumnName = "string", } }, - IsAnonymous = false, IsArchived = false, + IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobCollection.cs index 6552673667bc1..04fb61e608762 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_MachineLearningJobCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListAutoMLJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/AutoMLJob/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/AutoMLJob/list.json // this example is just showing the usage of "Jobs_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 @@ -59,7 +59,7 @@ public async Task GetAll_ListAutoMLJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCommandJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/CommandJob/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/CommandJob/list.json // this example is just showing the usage of "Jobs_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 @@ -93,52 +93,12 @@ public async Task GetAll_ListCommandJob() Console.WriteLine($"Succeeded"); } - // List FineTuning Job. - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListFineTuningJob() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/FineTuningJob/list.json - // this example is just showing the usage of "Jobs_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); - - // this example assumes you already have this MachineLearningWorkspaceResource created on azure - // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "my-aml-workspace"; - ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); - MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - - // get the collection of this MachineLearningJobResource - MachineLearningJobCollection collection = machineLearningWorkspace.GetMachineLearningJobs(); - - // invoke the operation and iterate over the result - string jobType = "string"; - string tag = "string"; - MachineLearningListViewType? listViewType = MachineLearningListViewType.All; - await foreach (MachineLearningJobResource item in collection.GetAllAsync(jobType: jobType, tag: tag, listViewType: listViewType)) - { - // the variable item 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 - MachineLearningJobData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - // List Pipeline Job. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPipelineJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/PipelineJob/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/PipelineJob/list.json // this example is just showing the usage of "Jobs_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 @@ -177,7 +137,7 @@ public async Task GetAll_ListPipelineJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSweepJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/SweepJob/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/SweepJob/list.json // this example is just showing the usage of "Jobs_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 @@ -216,7 +176,7 @@ public async Task GetAll_ListSweepJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutoMLJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/AutoMLJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/AutoMLJob/get.json // this example is just showing the usage of "Jobs_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 @@ -251,7 +211,7 @@ public async Task Get_GetAutoMLJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAutoMLJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/AutoMLJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/AutoMLJob/get.json // this example is just showing the usage of "Jobs_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 @@ -282,7 +242,7 @@ public async Task Exists_GetAutoMLJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAutoMLJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/AutoMLJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/AutoMLJob/get.json // this example is just showing the usage of "Jobs_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 @@ -325,7 +285,7 @@ public async Task GetIfExists_GetAutoMLJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCommandJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/CommandJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/CommandJob/get.json // this example is just showing the usage of "Jobs_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 @@ -360,7 +320,7 @@ public async Task Get_GetCommandJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCommandJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/CommandJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/CommandJob/get.json // this example is just showing the usage of "Jobs_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 @@ -391,116 +351,7 @@ public async Task Exists_GetCommandJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetCommandJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/CommandJob/get.json - // this example is just showing the usage of "Jobs_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceResource created on azure - // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "my-aml-workspace"; - ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); - MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - - // get the collection of this MachineLearningJobResource - MachineLearningJobCollection collection = machineLearningWorkspace.GetMachineLearningJobs(); - - // invoke the operation - string id = "string"; - NullableResponse response = await collection.GetIfExistsAsync(id); - MachineLearningJobResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // 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 - MachineLearningJobData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // Get FineTuning Job. - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetFineTuningJob() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/FineTuningJob/get.json - // this example is just showing the usage of "Jobs_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceResource created on azure - // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "my-aml-workspace"; - ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); - MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - - // get the collection of this MachineLearningJobResource - MachineLearningJobCollection collection = machineLearningWorkspace.GetMachineLearningJobs(); - - // invoke the operation - string id = "string"; - MachineLearningJobResource result = await collection.GetAsync(id); - - // 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 - MachineLearningJobData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get FineTuning Job. - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetFineTuningJob() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/FineTuningJob/get.json - // this example is just showing the usage of "Jobs_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceResource created on azure - // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "my-aml-workspace"; - ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); - MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - - // get the collection of this MachineLearningJobResource - MachineLearningJobCollection collection = machineLearningWorkspace.GetMachineLearningJobs(); - - // invoke the operation - string id = "string"; - bool result = await collection.ExistsAsync(id); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get FineTuning Job. - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetFineTuningJob() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/FineTuningJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/CommandJob/get.json // this example is just showing the usage of "Jobs_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 @@ -543,7 +394,7 @@ public async Task GetIfExists_GetFineTuningJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPipelineJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/PipelineJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/PipelineJob/get.json // this example is just showing the usage of "Jobs_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 @@ -578,7 +429,7 @@ public async Task Get_GetPipelineJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPipelineJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/PipelineJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/PipelineJob/get.json // this example is just showing the usage of "Jobs_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 +460,7 @@ public async Task Exists_GetPipelineJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPipelineJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/PipelineJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/PipelineJob/get.json // this example is just showing the usage of "Jobs_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 @@ -652,7 +503,7 @@ public async Task GetIfExists_GetPipelineJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSweepJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/SweepJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/SweepJob/get.json // this example is just showing the usage of "Jobs_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 @@ -687,7 +538,7 @@ public async Task Get_GetSweepJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSweepJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/SweepJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/SweepJob/get.json // this example is just showing the usage of "Jobs_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 @@ -718,7 +569,7 @@ public async Task Exists_GetSweepJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSweepJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/SweepJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/SweepJob/get.json // this example is just showing the usage of "Jobs_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 @@ -761,7 +612,7 @@ public async Task GetIfExists_GetSweepJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateAutoMLJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/AutoMLJob/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/AutoMLJob/createOrUpdate.json // this example is just showing the usage of "Jobs_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 @@ -801,6 +652,17 @@ public async Task CreateOrUpdate_CreateOrUpdateAutoMLJob() TargetColumnName = "string", }) { + Resources = new MachineLearningJobResourceConfiguration() + { + InstanceCount = 1, + InstanceType = "string", + Properties = +{ +["string"] = BinaryData.FromObjectAsJson(new Dictionary() +{ +["9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad"] = null}), +}, + }, EnvironmentId = "string", EnvironmentVariables = { @@ -810,46 +672,35 @@ public async Task CreateOrUpdate_CreateOrUpdateAutoMLJob() { ["string"] = new MachineLearningUriFileJobOutput() { -Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, Uri = new Uri("string"), +Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, Description = "string", }, }, - Resources = new MachineLearningJobResourceConfiguration() - { - InstanceCount = 1, - InstanceType = "string", - Properties = -{ -["string"] = BinaryData.FromObjectAsJson(new Dictionary() -{ -["9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad"] = null}), -}, - }, - ComputeId = new ResourceIdentifier("string"), DisplayName = "string", ExperimentName = "string", - Identity = new AmlToken(), - IsArchived = false, Services = { ["string"] = new MachineLearningJobService() { -Endpoint = "string", JobServiceType = "string", Port = 1, +Endpoint = "string", Properties = { ["string"] = "string", }, }, }, + ComputeId = new ResourceIdentifier("string"), + IsArchived = false, + Identity = new AmlToken(), Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, @@ -869,7 +720,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAutoMLJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateCommandJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/CommandJob/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/CommandJob/createOrUpdate.json // this example is just showing the usage of "Jobs_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 @@ -892,16 +743,18 @@ public async Task CreateOrUpdate_CreateOrUpdateCommandJob() string id = "string"; MachineLearningJobData data = new MachineLearningJobData(new MachineLearningCommandJob("string", new ResourceIdentifier("string")) { - CodeId = new ResourceIdentifier("string"), - Distribution = new TensorFlowDistributionConfiguration() + Resources = new MachineLearningJobResourceConfiguration() { - ParameterServerCount = 1, - WorkerCount = 1, - }, - EnvironmentVariables = + InstanceCount = 1, + InstanceType = "string", + Properties = { -["string"] = "string", +["string"] = BinaryData.FromObjectAsJson(new Dictionary() +{ +["e6b6493e-7d5e-4db3-be1e-306ec641327e"] = null}), }, + }, + CodeId = new ResourceIdentifier("string"), Inputs = { ["string"] = new MachineLearningLiteralJobInput("string") @@ -909,53 +762,51 @@ public async Task CreateOrUpdate_CreateOrUpdateCommandJob() Description = "string", }, }, - Limits = new MachineLearningCommandJobLimits() - { - Timeout = XmlConvert.ToTimeSpan("PT5M"), - }, Outputs = { ["string"] = new MachineLearningUriFileJobOutput() { -Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, Uri = new Uri("string"), +Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, Description = "string", }, }, - Resources = new MachineLearningJobResourceConfiguration() + Distribution = new TensorFlowDistributionConfiguration() { - InstanceCount = 1, - InstanceType = "string", - Properties = -{ -["string"] = BinaryData.FromObjectAsJson(new Dictionary() + WorkerCount = 1, + ParameterServerCount = 1, + }, + Limits = new MachineLearningCommandJobLimits() + { + Timeout = XmlConvert.ToTimeSpan("PT5M"), + }, + EnvironmentVariables = { -["e6b6493e-7d5e-4db3-be1e-306ec641327e"] = null}), +["string"] = "string", }, - }, - ComputeId = new ResourceIdentifier("string"), DisplayName = "string", ExperimentName = "string", - Identity = new AmlToken(), Services = { ["string"] = new MachineLearningJobService() { -Endpoint = "string", JobServiceType = "string", Port = 1, +Endpoint = "string", Properties = { ["string"] = "string", }, }, }, + ComputeId = new ResourceIdentifier("string"), + Identity = new AmlToken(), Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, @@ -970,68 +821,12 @@ public async Task CreateOrUpdate_CreateOrUpdateCommandJob() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // CreateOrUpdate FineTuning Job. - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateOrUpdateFineTuningJob() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/FineTuningJob/createOrUpdate.json - // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceResource created on azure - // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "my-aml-workspace"; - ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); - MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - - // get the collection of this MachineLearningJobResource - MachineLearningJobCollection collection = machineLearningWorkspace.GetMachineLearningJobs(); - - // invoke the operation - string id = "string"; - MachineLearningJobData data = new MachineLearningJobData(new FineTuningJob(new CustomModelFineTuning(FineTuningTaskType.TextCompletion, new MachineLearningUriFileJobInput(new Uri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11")) - { - Mode = MachineLearningInputDeliveryMode.ReadOnlyMount, - Description = null, - }, new MachineLearningFlowModelJobInput(new Uri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11")) - { - Mode = MachineLearningInputDeliveryMode.ReadOnlyMount, - Description = null, - }), new Dictionary() - { - ["string"] = new MachineLearningFlowModelJobOutput() - { - Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, - Uri = new Uri("string"), - Description = "string", - }, - }) - { - ExperimentName = "llm-finetuning", - }); - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, id, data); - MachineLearningJobResource 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 - MachineLearningJobData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - // CreateOrUpdate Pipeline Job. [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdatePipelineJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/PipelineJob/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/PipelineJob/createOrUpdate.json // this example is just showing the usage of "Jobs_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 @@ -1054,6 +849,9 @@ public async Task CreateOrUpdate_CreateOrUpdatePipelineJob() string id = "string"; MachineLearningJobData data = new MachineLearningJobData(new MachineLearningPipelineJob() { + Settings = BinaryData.FromObjectAsJson(new Dictionary() + { + }), Inputs = { ["string"] = new MachineLearningLiteralJobInput("string") @@ -1065,36 +863,33 @@ public async Task CreateOrUpdate_CreateOrUpdatePipelineJob() { ["string"] = new MachineLearningUriFileJobOutput() { -Mode = MachineLearningOutputDeliveryMode.Upload, Uri = new Uri("string"), +Mode = MachineLearningOutputDeliveryMode.Upload, Description = "string", }, }, - Settings = BinaryData.FromObjectAsJson(new Dictionary() - { - }), - ComputeId = new ResourceIdentifier("string"), DisplayName = "string", ExperimentName = "string", Services = { ["string"] = new MachineLearningJobService() { -Endpoint = "string", JobServiceType = "string", Port = 1, +Endpoint = "string", Properties = { ["string"] = "string", }, }, }, + ComputeId = new ResourceIdentifier("string"), Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, @@ -1114,7 +909,7 @@ public async Task CreateOrUpdate_CreateOrUpdatePipelineJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateSweepJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/SweepJob/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/SweepJob/createOrUpdate.json // this example is just showing the usage of "Jobs_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 @@ -1135,22 +930,22 @@ public async Task CreateOrUpdate_CreateOrUpdateSweepJob() // invoke the operation string id = "string"; - MachineLearningJobData data = new MachineLearningJobData(new MachineLearningSweepJob(new MachineLearningObjective(MachineLearningGoal.Minimize, "string"), new GridSamplingAlgorithm(), BinaryData.FromObjectAsJson(new Dictionary() + MachineLearningJobData data = new MachineLearningJobData(new MachineLearningSweepJob(BinaryData.FromObjectAsJson(new Dictionary() { ["string"] = new Dictionary() { } - }), new MachineLearningTrialComponent("string", new ResourceIdentifier("string")) + }), new GridSamplingAlgorithm(), new MachineLearningObjective("string", MachineLearningGoal.Minimize), new MachineLearningTrialComponent("string", new ResourceIdentifier("string")) { CodeId = new ResourceIdentifier("string"), - Distribution = new MpiDistributionConfiguration() - { - ProcessCountPerInstance = 1, - }, EnvironmentVariables = { ["string"] = "string", }, + Distribution = new MpiDistributionConfiguration() + { + ProcessCountPerInstance = 1, + }, Resources = new MachineLearningJobResourceConfiguration() { InstanceCount = 1, @@ -1164,39 +959,39 @@ public async Task CreateOrUpdate_CreateOrUpdateSweepJob() }, }) { - EarlyTermination = new MedianStoppingPolicy() - { - DelayEvaluation = 1, - EvaluationInterval = 1, - }, Limits = new MachineLearningSweepJobLimits() { - MaxConcurrentTrials = 1, MaxTotalTrials = 1, + MaxConcurrentTrials = 1, TrialTimeout = XmlConvert.ToTimeSpan("PT1S"), }, - ComputeId = new ResourceIdentifier("string"), + EarlyTermination = new MedianStoppingPolicy() + { + EvaluationInterval = 1, + DelayEvaluation = 1, + }, DisplayName = "string", ExperimentName = "string", Services = { ["string"] = new MachineLearningJobService() { -Endpoint = "string", JobServiceType = "string", Port = 1, +Endpoint = "string", Properties = { ["string"] = "string", }, }, }, + ComputeId = new ResourceIdentifier("string"), Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobResource.cs index 4c1dd15df8746..b3a2e5057cbda 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningJobResource.cs @@ -22,7 +22,7 @@ public partial class Sample_MachineLearningJobResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/delete.json // this example is just showing the usage of "Jobs_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 @@ -50,7 +50,7 @@ public async Task Delete_DeleteJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAutoMLJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/AutoMLJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/AutoMLJob/get.json // this example is just showing the usage of "Jobs_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 @@ -82,39 +82,7 @@ public async Task Get_GetAutoMLJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCommandJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/CommandJob/get.json - // this example is just showing the usage of "Jobs_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningJobResource created on azure - // for more information of creating MachineLearningJobResource, please refer to the document of MachineLearningJobResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "my-aml-workspace"; - string id = "string"; - ResourceIdentifier machineLearningJobResourceId = MachineLearningJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, id); - MachineLearningJobResource machineLearningJob = client.GetMachineLearningJobResource(machineLearningJobResourceId); - - // invoke the operation - MachineLearningJobResource result = await machineLearningJob.GetAsync(); - - // 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 - MachineLearningJobData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get FineTuning Job. - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetFineTuningJob() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/FineTuningJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/CommandJob/get.json // this example is just showing the usage of "Jobs_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 @@ -146,7 +114,7 @@ public async Task Get_GetFineTuningJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPipelineJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/PipelineJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/PipelineJob/get.json // this example is just showing the usage of "Jobs_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 @@ -178,7 +146,7 @@ public async Task Get_GetPipelineJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSweepJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/SweepJob/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/SweepJob/get.json // this example is just showing the usage of "Jobs_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 @@ -210,7 +178,7 @@ public async Task Get_GetSweepJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateAutoMLJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/AutoMLJob/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/AutoMLJob/createOrUpdate.json // this example is just showing the usage of "Jobs_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 @@ -247,6 +215,17 @@ public async Task Update_CreateOrUpdateAutoMLJob() TargetColumnName = "string", }) { + Resources = new MachineLearningJobResourceConfiguration() + { + InstanceCount = 1, + InstanceType = "string", + Properties = +{ +["string"] = BinaryData.FromObjectAsJson(new Dictionary() +{ +["9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad"] = null}), +}, + }, EnvironmentId = "string", EnvironmentVariables = { @@ -256,51 +235,40 @@ public async Task Update_CreateOrUpdateAutoMLJob() { ["string"] = new MachineLearningUriFileJobOutput() { -Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, Uri = new Uri("string"), +Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, Description = "string", }, }, - Resources = new MachineLearningJobResourceConfiguration() - { - InstanceCount = 1, - InstanceType = "string", - Properties = -{ -["string"] = BinaryData.FromObjectAsJson(new Dictionary() -{ -["9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad"] = null}), -}, - }, - ComputeId = new ResourceIdentifier("string"), DisplayName = "string", ExperimentName = "string", - Identity = new AmlToken(), - IsArchived = false, Services = { ["string"] = new MachineLearningJobService() { -Endpoint = "string", JobServiceType = "string", Port = 1, +Endpoint = "string", Properties = { ["string"] = "string", }, }, }, + ComputeId = new ResourceIdentifier("string"), + IsArchived = false, + Identity = new AmlToken(), Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, }); - ArmOperation lro = await machineLearningJob.UpdateAsync(WaitUntil.Completed, data); + ArmOperation lro = await machineLearningJob.UpdateAsync(WaitUntil.Completed, data, default); MachineLearningJobResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -315,7 +283,7 @@ public async Task Update_CreateOrUpdateAutoMLJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateCommandJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/CommandJob/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/CommandJob/createOrUpdate.json // this example is just showing the usage of "Jobs_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 @@ -335,16 +303,18 @@ public async Task Update_CreateOrUpdateCommandJob() // invoke the operation MachineLearningJobData data = new MachineLearningJobData(new MachineLearningCommandJob("string", new ResourceIdentifier("string")) { - CodeId = new ResourceIdentifier("string"), - Distribution = new TensorFlowDistributionConfiguration() + Resources = new MachineLearningJobResourceConfiguration() { - ParameterServerCount = 1, - WorkerCount = 1, - }, - EnvironmentVariables = + InstanceCount = 1, + InstanceType = "string", + Properties = { -["string"] = "string", +["string"] = BinaryData.FromObjectAsJson(new Dictionary() +{ +["e6b6493e-7d5e-4db3-be1e-306ec641327e"] = null}), }, + }, + CodeId = new ResourceIdentifier("string"), Inputs = { ["string"] = new MachineLearningLiteralJobInput("string") @@ -352,111 +322,56 @@ public async Task Update_CreateOrUpdateCommandJob() Description = "string", }, }, - Limits = new MachineLearningCommandJobLimits() - { - Timeout = XmlConvert.ToTimeSpan("PT5M"), - }, Outputs = { ["string"] = new MachineLearningUriFileJobOutput() { -Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, Uri = new Uri("string"), +Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, Description = "string", }, }, - Resources = new MachineLearningJobResourceConfiguration() + Distribution = new TensorFlowDistributionConfiguration() { - InstanceCount = 1, - InstanceType = "string", - Properties = -{ -["string"] = BinaryData.FromObjectAsJson(new Dictionary() + WorkerCount = 1, + ParameterServerCount = 1, + }, + Limits = new MachineLearningCommandJobLimits() + { + Timeout = XmlConvert.ToTimeSpan("PT5M"), + }, + EnvironmentVariables = { -["e6b6493e-7d5e-4db3-be1e-306ec641327e"] = null}), +["string"] = "string", }, - }, - ComputeId = new ResourceIdentifier("string"), DisplayName = "string", ExperimentName = "string", - Identity = new AmlToken(), Services = { ["string"] = new MachineLearningJobService() { -Endpoint = "string", JobServiceType = "string", Port = 1, +Endpoint = "string", Properties = { ["string"] = "string", }, }, }, + ComputeId = new ResourceIdentifier("string"), + Identity = new AmlToken(), Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, }); - ArmOperation lro = await machineLearningJob.UpdateAsync(WaitUntil.Completed, data); - MachineLearningJobResource 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 - MachineLearningJobData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // CreateOrUpdate FineTuning Job. - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateOrUpdateFineTuningJob() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/FineTuningJob/createOrUpdate.json - // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningJobResource created on azure - // for more information of creating MachineLearningJobResource, please refer to the document of MachineLearningJobResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "my-aml-workspace"; - string id = "string"; - ResourceIdentifier machineLearningJobResourceId = MachineLearningJobResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, id); - MachineLearningJobResource machineLearningJob = client.GetMachineLearningJobResource(machineLearningJobResourceId); - - // invoke the operation - MachineLearningJobData data = new MachineLearningJobData(new FineTuningJob(new CustomModelFineTuning(FineTuningTaskType.TextCompletion, new MachineLearningUriFileJobInput(new Uri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11")) - { - Mode = MachineLearningInputDeliveryMode.ReadOnlyMount, - Description = null, - }, new MachineLearningFlowModelJobInput(new Uri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11")) - { - Mode = MachineLearningInputDeliveryMode.ReadOnlyMount, - Description = null, - }), new Dictionary() - { - ["string"] = new MachineLearningFlowModelJobOutput() - { - Mode = MachineLearningOutputDeliveryMode.ReadWriteMount, - Uri = new Uri("string"), - Description = "string", - }, - }) - { - ExperimentName = "llm-finetuning", - }); - ArmOperation lro = await machineLearningJob.UpdateAsync(WaitUntil.Completed, data); + ArmOperation lro = await machineLearningJob.UpdateAsync(WaitUntil.Completed, data, default); MachineLearningJobResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -471,7 +386,7 @@ public async Task Update_CreateOrUpdateFineTuningJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdatePipelineJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/PipelineJob/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/PipelineJob/createOrUpdate.json // this example is just showing the usage of "Jobs_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 @@ -491,6 +406,9 @@ public async Task Update_CreateOrUpdatePipelineJob() // invoke the operation MachineLearningJobData data = new MachineLearningJobData(new MachineLearningPipelineJob() { + Settings = BinaryData.FromObjectAsJson(new Dictionary() + { + }), Inputs = { ["string"] = new MachineLearningLiteralJobInput("string") @@ -502,41 +420,38 @@ public async Task Update_CreateOrUpdatePipelineJob() { ["string"] = new MachineLearningUriFileJobOutput() { -Mode = MachineLearningOutputDeliveryMode.Upload, Uri = new Uri("string"), +Mode = MachineLearningOutputDeliveryMode.Upload, Description = "string", }, }, - Settings = BinaryData.FromObjectAsJson(new Dictionary() - { - }), - ComputeId = new ResourceIdentifier("string"), DisplayName = "string", ExperimentName = "string", Services = { ["string"] = new MachineLearningJobService() { -Endpoint = "string", JobServiceType = "string", Port = 1, +Endpoint = "string", Properties = { ["string"] = "string", }, }, }, + ComputeId = new ResourceIdentifier("string"), Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, }); - ArmOperation lro = await machineLearningJob.UpdateAsync(WaitUntil.Completed, data); + ArmOperation lro = await machineLearningJob.UpdateAsync(WaitUntil.Completed, data, default); MachineLearningJobResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -551,7 +466,7 @@ public async Task Update_CreateOrUpdatePipelineJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateSweepJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/SweepJob/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/SweepJob/createOrUpdate.json // this example is just showing the usage of "Jobs_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 @@ -569,22 +484,22 @@ public async Task Update_CreateOrUpdateSweepJob() MachineLearningJobResource machineLearningJob = client.GetMachineLearningJobResource(machineLearningJobResourceId); // invoke the operation - MachineLearningJobData data = new MachineLearningJobData(new MachineLearningSweepJob(new MachineLearningObjective(MachineLearningGoal.Minimize, "string"), new GridSamplingAlgorithm(), BinaryData.FromObjectAsJson(new Dictionary() + MachineLearningJobData data = new MachineLearningJobData(new MachineLearningSweepJob(BinaryData.FromObjectAsJson(new Dictionary() { ["string"] = new Dictionary() { } - }), new MachineLearningTrialComponent("string", new ResourceIdentifier("string")) + }), new GridSamplingAlgorithm(), new MachineLearningObjective("string", MachineLearningGoal.Minimize), new MachineLearningTrialComponent("string", new ResourceIdentifier("string")) { CodeId = new ResourceIdentifier("string"), - Distribution = new MpiDistributionConfiguration() - { - ProcessCountPerInstance = 1, - }, EnvironmentVariables = { ["string"] = "string", }, + Distribution = new MpiDistributionConfiguration() + { + ProcessCountPerInstance = 1, + }, Resources = new MachineLearningJobResourceConfiguration() { InstanceCount = 1, @@ -598,44 +513,44 @@ public async Task Update_CreateOrUpdateSweepJob() }, }) { - EarlyTermination = new MedianStoppingPolicy() - { - DelayEvaluation = 1, - EvaluationInterval = 1, - }, Limits = new MachineLearningSweepJobLimits() { - MaxConcurrentTrials = 1, MaxTotalTrials = 1, + MaxConcurrentTrials = 1, TrialTimeout = XmlConvert.ToTimeSpan("PT1S"), }, - ComputeId = new ResourceIdentifier("string"), + EarlyTermination = new MedianStoppingPolicy() + { + EvaluationInterval = 1, + DelayEvaluation = 1, + }, DisplayName = "string", ExperimentName = "string", Services = { ["string"] = new MachineLearningJobService() { -Endpoint = "string", JobServiceType = "string", Port = 1, +Endpoint = "string", Properties = { ["string"] = "string", }, }, }, + ComputeId = new ResourceIdentifier("string"), Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, }); - ArmOperation lro = await machineLearningJob.UpdateAsync(WaitUntil.Completed, data); + ArmOperation lro = await machineLearningJob.UpdateAsync(WaitUntil.Completed, data, default); MachineLearningJobResource result = lro.Value; // the variable result is a resource, you could call other operations on this instance as well @@ -650,7 +565,7 @@ public async Task Update_CreateOrUpdateSweepJob() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Cancel_CancelJob() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Job/cancel.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Job/cancel.json // this example is just showing the usage of "Jobs_Cancel" 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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerCollection.cs index 5211c70c4aafb..bed3ac0978541 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningModelContainerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelContainer/list.json // this example is just showing the usage of "ModelContainers_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 @@ -57,7 +57,7 @@ public async Task GetAll_ListWorkspaceModelContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelContainer/get.json // this example is just showing the usage of "ModelContainers_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 @@ -92,7 +92,7 @@ public async Task Get_GetWorkspaceModelContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelContainer/get.json // this example is just showing the usage of "ModelContainers_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 @@ -123,7 +123,7 @@ public async Task Exists_GetWorkspaceModelContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelContainer/get.json // this example is just showing the usage of "ModelContainers_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 GetIfExists_GetWorkspaceModelContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelContainer/createOrUpdate.json // this example is just showing the usage of "ModelContainers_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerResource.cs index e1a7547a3caca..0efe515dc4fef 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelContainerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningModelContainerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelContainer/delete.json // this example is just showing the usage of "ModelContainers_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteWorkspaceModelContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelContainer/get.json // this example is just showing the usage of "ModelContainers_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 @@ -80,7 +80,7 @@ public async Task Get_GetWorkspaceModelContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelContainer/createOrUpdate.json // this example is just showing the usage of "ModelContainers_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionCollection.cs index 0ca1db3a38611..62ced7520e218 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningModelVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelVersion/list.json // this example is just showing the usage of "ModelVersions_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 @@ -59,7 +59,7 @@ public async Task GetAll_ListWorkspaceModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelVersion/get.json // this example is just showing the usage of "ModelVersions_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 @@ -95,7 +95,7 @@ public async Task Get_GetWorkspaceModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelVersion/get.json // this example is just showing the usage of "ModelVersions_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 @@ -127,7 +127,7 @@ public async Task Exists_GetWorkspaceModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelVersion/get.json // this example is just showing the usage of "ModelVersions_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 @@ -171,7 +171,7 @@ public async Task GetIfExists_GetWorkspaceModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelVersion/createOrUpdate.json // this example is just showing the usage of "ModelVersions_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 @@ -209,11 +209,11 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceModelVersion() ModelUri = new Uri("string"), IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionResource.cs index 9211e26060e1c..12762b36ce37d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningModelVersionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningModelVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelVersion/delete.json // this example is just showing the usage of "ModelVersions_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteWorkspaceModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelVersion/get.json // this example is just showing the usage of "ModelVersions_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 @@ -82,7 +82,7 @@ public async Task Get_GetWorkspaceModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelVersion/createOrUpdate.json // this example is just showing the usage of "ModelVersions_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 @@ -117,11 +117,11 @@ public async Task Update_CreateOrUpdateWorkspaceModelVersion() ModelUri = new Uri("string"), IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, @@ -141,7 +141,7 @@ public async Task Update_CreateOrUpdateWorkspaceModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Publish_PublishWorkspaceModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ModelVersion/publish.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ModelVersion/publish.json // this example is just showing the usage of "ModelVersions_Publish" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -162,9 +162,9 @@ public async Task Publish_PublishWorkspaceModelVersion() // invoke the operation DestinationAsset body = new DestinationAsset() { + RegistryName = "string", DestinationName = "string", DestinationVersion = "string", - RegistryName = "string", }; await machineLearningModelVersion.PublishAsync(WaitUntil.Completed, body); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentCollection.cs index b70d5c39543ca..a9e17cd6f9976 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_MachineLearningOnlineDeploymentCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListOnlineDeployments() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/list.json // this example is just showing the usage of "OnlineDeployments_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 @@ -62,7 +62,7 @@ public async Task GetAll_ListOnlineDeployments() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetKubernetesOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_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 @@ -98,7 +98,7 @@ public async Task Get_GetKubernetesOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetKubernetesOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_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 @@ -130,7 +130,7 @@ public async Task Exists_GetKubernetesOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetKubernetesOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_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 @@ -174,7 +174,7 @@ public async Task GetIfExists_GetKubernetesOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetManagedOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_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 @@ -210,7 +210,7 @@ public async Task Get_GetManagedOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetManagedOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_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 @@ -242,7 +242,7 @@ public async Task Exists_GetManagedOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetManagedOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_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 @@ -286,7 +286,7 @@ public async Task GetIfExists_GetManagedOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json // this example is just showing the usage of "OnlineDeployments_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 @@ -312,54 +312,55 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment() { ContainerResourceRequirements = new MachineLearningContainerResourceRequirements() { - ContainerResourceLimits = new MachineLearningContainerResourceSettings() + ContainerResourceRequests = new MachineLearningContainerResourceSettings() { Cpu = "\"1\"", - Gpu = "\"1\"", Memory = "\"2Gi\"", + Gpu = "\"1\"", }, - ContainerResourceRequests = new MachineLearningContainerResourceSettings() + ContainerResourceLimits = new MachineLearningContainerResourceSettings() { Cpu = "\"1\"", - Gpu = "\"1\"", Memory = "\"2Gi\"", + Gpu = "\"1\"", }, }, + ScaleSettings = new MachineLearningDefaultScaleSettings(), + RequestSettings = new MachineLearningOnlineRequestSettings() + { + MaxQueueWait = XmlConvert.ToTimeSpan("PT5M"), + RequestTimeout = XmlConvert.ToTimeSpan("PT5M"), + MaxConcurrentRequestsPerInstance = 1, + }, + ModelMountPath = "string", AppInsightsEnabled = false, - InstanceType = "string", LivenessProbe = new MachineLearningProbeSettings() { FailureThreshold = 1, - InitialDelay = XmlConvert.ToTimeSpan("PT5M"), - Period = XmlConvert.ToTimeSpan("PT5M"), SuccessThreshold = 1, Timeout = XmlConvert.ToTimeSpan("PT5M"), + Period = XmlConvert.ToTimeSpan("PT5M"), + InitialDelay = XmlConvert.ToTimeSpan("PT5M"), }, + InstanceType = "string", Model = "string", - ModelMountPath = "string", - RequestSettings = new MachineLearningOnlineRequestSettings() - { - MaxConcurrentRequestsPerInstance = 1, - MaxQueueWait = XmlConvert.ToTimeSpan("PT5M"), - RequestTimeout = XmlConvert.ToTimeSpan("PT5M"), - }, - ScaleSettings = new MachineLearningDefaultScaleSettings(), + Description = "string", + Properties = +{ +["string"] = "string", +}, CodeConfiguration = new MachineLearningCodeConfiguration("string") { CodeId = new ResourceIdentifier("string"), }, - Description = "string", EnvironmentId = "string", EnvironmentVariables = { ["string"] = "string", -}, - Properties = -{ -["string"] = "string", }, }) { + Kind = "string", Identity = new ManagedServiceIdentity("SystemAssigned") { UserAssignedIdentities = @@ -367,7 +368,6 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment() [new ResourceIdentifier("string")] = new UserAssignedIdentity(), }, }, - Kind = "string", Sku = new MachineLearningSku("string") { Tier = MachineLearningSkuTier.Free, @@ -394,7 +394,7 @@ public async Task CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json // this example is just showing the usage of "OnlineDeployments_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 @@ -418,49 +418,50 @@ public async Task CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment() string deploymentName = "testDeploymentName"; MachineLearningOnlineDeploymentData data = new MachineLearningOnlineDeploymentData(new AzureLocation("string"), new MachineLearningManagedOnlineDeployment() { + ScaleSettings = new MachineLearningDefaultScaleSettings(), + RequestSettings = new MachineLearningOnlineRequestSettings() + { + MaxQueueWait = XmlConvert.ToTimeSpan("PT5M"), + RequestTimeout = XmlConvert.ToTimeSpan("PT5M"), + MaxConcurrentRequestsPerInstance = 1, + }, + ModelMountPath = "string", AppInsightsEnabled = false, - InstanceType = "string", LivenessProbe = new MachineLearningProbeSettings() { FailureThreshold = 1, - InitialDelay = XmlConvert.ToTimeSpan("PT5M"), - Period = XmlConvert.ToTimeSpan("PT5M"), SuccessThreshold = 1, Timeout = XmlConvert.ToTimeSpan("PT5M"), + Period = XmlConvert.ToTimeSpan("PT5M"), + InitialDelay = XmlConvert.ToTimeSpan("PT5M"), }, - Model = "string", - ModelMountPath = "string", ReadinessProbe = new MachineLearningProbeSettings() { FailureThreshold = 30, - InitialDelay = XmlConvert.ToTimeSpan("PT1S"), - Period = XmlConvert.ToTimeSpan("PT10S"), SuccessThreshold = 1, Timeout = XmlConvert.ToTimeSpan("PT2S"), + Period = XmlConvert.ToTimeSpan("PT10S"), + InitialDelay = XmlConvert.ToTimeSpan("PT1S"), }, - RequestSettings = new MachineLearningOnlineRequestSettings() - { - MaxConcurrentRequestsPerInstance = 1, - MaxQueueWait = XmlConvert.ToTimeSpan("PT5M"), - RequestTimeout = XmlConvert.ToTimeSpan("PT5M"), - }, - ScaleSettings = new MachineLearningDefaultScaleSettings(), + InstanceType = "string", + Model = "string", + Description = "string", + Properties = +{ +["string"] = "string", +}, CodeConfiguration = new MachineLearningCodeConfiguration("string") { CodeId = new ResourceIdentifier("string"), }, - Description = "string", EnvironmentId = "string", EnvironmentVariables = { ["string"] = "string", -}, - Properties = -{ -["string"] = "string", }, }) { + Kind = "string", Identity = new ManagedServiceIdentity("SystemAssigned") { UserAssignedIdentities = @@ -468,7 +469,6 @@ public async Task CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment() [new ResourceIdentifier("string")] = new UserAssignedIdentity(), }, }, - Kind = "string", Sku = new MachineLearningSku("string") { Tier = MachineLearningSkuTier.Free, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentResource.cs index 23dd7bfff8559..169b22bbc4c06 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineDeploymentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningOnlineDeploymentResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/OnlineDeployment/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/OnlineDeployment/delete.json // this example is just showing the usage of "OnlineDeployments_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteWorkspaceOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetKubernetesOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_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 @@ -82,7 +82,7 @@ public async Task Get_GetKubernetesOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetManagedOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json // this example is just showing the usage of "OnlineDeployments_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 @@ -115,7 +115,7 @@ public async Task Get_GetManagedOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateKubernetesOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json // this example is just showing the usage of "OnlineDeployments_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 @@ -138,11 +138,11 @@ public async Task Update_UpdateKubernetesOnlineDeployment() { Sku = new MachineLearningSkuPatch() { - Capacity = 1, - Family = "string", Name = "string", - Size = "string", Tier = MachineLearningSkuTier.Free, + Size = "string", + Family = "string", + Capacity = 1, }, Tags = { @@ -163,7 +163,7 @@ public async Task Update_UpdateKubernetesOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateManagedOnlineDeployment() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/ManagedOnlineDeployment/update.json // this example is just showing the usage of "OnlineDeployments_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 @@ -186,11 +186,11 @@ public async Task Update_UpdateManagedOnlineDeployment() { Sku = new MachineLearningSkuPatch() { - Capacity = 1, - Family = "string", Name = "string", - Size = "string", Tier = MachineLearningSkuTier.Free, + Size = "string", + Family = "string", + Capacity = 1, }, Tags = { @@ -211,7 +211,7 @@ public async Task Update_UpdateManagedOnlineDeployment() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLogs_GetOnlineDeploymentLogs() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/getLogs.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/getLogs.json // this example is just showing the usage of "OnlineDeployments_GetLogs" 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 @@ -245,7 +245,7 @@ public async Task GetLogs_GetOnlineDeploymentLogs() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSkus_ListKubernetesOnlineDeploymentSkus() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json // this example is just showing the usage of "OnlineDeployments_ListSkus" 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 @@ -278,7 +278,7 @@ public async Task GetSkus_ListKubernetesOnlineDeploymentSkus() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSkus_ListManagedOnlineDeploymentSkus() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json // this example is just showing the usage of "OnlineDeployments_ListSkus" 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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointCollection.cs index 7a891d4721a73..fe41baa7674e7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_MachineLearningOnlineEndpointCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/OnlineEndpoint/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/OnlineEndpoint/list.json // this example is just showing the usage of "OnlineEndpoints_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 @@ -59,7 +59,7 @@ public async Task GetAll_ListWorkspaceOnlineEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/OnlineEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/OnlineEndpoint/get.json // this example is just showing the usage of "OnlineEndpoints_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 @@ -94,7 +94,7 @@ public async Task Get_GetWorkspaceOnlineEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/OnlineEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/OnlineEndpoint/get.json // this example is just showing the usage of "OnlineEndpoints_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 @@ -125,7 +125,7 @@ public async Task Exists_GetWorkspaceOnlineEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/OnlineEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/OnlineEndpoint/get.json // this example is just showing the usage of "OnlineEndpoints_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 @@ -168,7 +168,7 @@ public async Task GetIfExists_GetWorkspaceOnlineEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/OnlineEndpoint/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/OnlineEndpoint/createOrUpdate.json // this example is just showing the usage of "OnlineEndpoints_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 @@ -203,6 +203,7 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceOnlineEndpoint() }, }) { + Kind = "string", Identity = new ManagedServiceIdentity("SystemAssigned") { UserAssignedIdentities = @@ -210,7 +211,6 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceOnlineEndpoint() [new ResourceIdentifier("string")] = new UserAssignedIdentity(), }, }, - Kind = "string", Sku = new MachineLearningSku("string") { Tier = MachineLearningSkuTier.Free, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointResource.cs index 715ec18d2608d..5f287bd234b2f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOnlineEndpointResource.cs @@ -21,7 +21,7 @@ public partial class Sample_MachineLearningOnlineEndpointResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/OnlineEndpoint/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/OnlineEndpoint/delete.json // this example is just showing the usage of "OnlineEndpoints_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteWorkspaceOnlineEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/OnlineEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/OnlineEndpoint/get.json // this example is just showing the usage of "OnlineEndpoints_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 @@ -81,7 +81,7 @@ public async Task Get_GetWorkspaceOnlineEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/OnlineEndpoint/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/OnlineEndpoint/update.json // this example is just showing the usage of "OnlineEndpoints_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 @@ -130,7 +130,7 @@ public async Task Update_UpdateWorkspaceOnlineEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKeys_ListKeysWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/OnlineEndpoint/listKeys.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/OnlineEndpoint/listKeys.json // this example is just showing the usage of "OnlineEndpoints_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -158,7 +158,7 @@ public async Task GetKeys_ListKeysWorkspaceOnlineEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegenerateKeys_RegenerateKeysWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/OnlineEndpoint/regenerateKeys.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/OnlineEndpoint/regenerateKeys.json // this example is just showing the usage of "OnlineEndpoints_RegenerateKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -190,7 +190,7 @@ public async Task RegenerateKeys_RegenerateKeysWorkspaceOnlineEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetToken_GetTokenWorkspaceOnlineEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/OnlineEndpoint/getToken.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/OnlineEndpoint/getToken.json // this example is just showing the usage of "OnlineEndpoints_GetToken" 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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicCollection.cs index 6d8dfac3695ba..336dacb502528 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningOutboundRuleBasicCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListManagedNetworkSettingsRule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/ManagedNetwork/listRule.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/listRule.json // this example is just showing the usage of "ManagedNetworkSettingsRule_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 @@ -57,7 +57,7 @@ public async Task GetAll_ListManagedNetworkSettingsRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetManagedNetworkSettingsRule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/ManagedNetwork/getRule.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/getRule.json // this example is just showing the usage of "ManagedNetworkSettingsRule_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 @@ -92,7 +92,7 @@ public async Task Get_GetManagedNetworkSettingsRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetManagedNetworkSettingsRule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/ManagedNetwork/getRule.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/getRule.json // this example is just showing the usage of "ManagedNetworkSettingsRule_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 @@ -123,7 +123,7 @@ public async Task Exists_GetManagedNetworkSettingsRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetManagedNetworkSettingsRule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/ManagedNetwork/getRule.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/getRule.json // this example is just showing the usage of "ManagedNetworkSettingsRule_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 GetIfExists_GetManagedNetworkSettingsRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateManagedNetworkSettingsRule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/ManagedNetwork/createOrUpdateRule.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/createOrUpdateRule.json // this example is just showing the usage of "ManagedNetworkSettingsRule_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicResource.cs index 1f110f29783e9..7068120b968a7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningOutboundRuleBasicResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningOutboundRuleBasicResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteManagedNetworkSettingsRule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/ManagedNetwork/deleteRule.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/deleteRule.json // this example is just showing the usage of "ManagedNetworkSettingsRule_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteManagedNetworkSettingsRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetManagedNetworkSettingsRule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/ManagedNetwork/getRule.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/getRule.json // this example is just showing the usage of "ManagedNetworkSettingsRule_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 @@ -80,7 +80,7 @@ public async Task Get_GetManagedNetworkSettingsRule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateManagedNetworkSettingsRule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/ManagedNetwork/createOrUpdateRule.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/createOrUpdateRule.json // this example is just showing the usage of "ManagedNetworkSettingsRule_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionCollection.cs index 11ec149a08014..37882ae86cfed 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningPrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_StorageAccountListPrivateEndpointConnections() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/PrivateEndpointConnection/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/PrivateEndpointConnection/list.json // this example is just showing the usage of "PrivateEndpointConnections_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 @@ -57,7 +57,7 @@ public async Task GetAll_StorageAccountListPrivateEndpointConnections() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_WorkspaceGetPrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/PrivateEndpointConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/PrivateEndpointConnection/get.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 @@ -92,7 +92,7 @@ public async Task Get_WorkspaceGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_WorkspaceGetPrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/PrivateEndpointConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/PrivateEndpointConnection/get.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 @@ -123,7 +123,7 @@ public async Task Exists_WorkspaceGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_WorkspaceGetPrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/PrivateEndpointConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/PrivateEndpointConnection/get.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 GetIfExists_WorkspaceGetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_WorkspacePutPrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/PrivateEndpointConnection/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/PrivateEndpointConnection/createOrUpdate.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -191,8 +191,8 @@ public async Task CreateOrUpdate_WorkspacePutPrivateEndpointConnection() { ConnectionState = new MachineLearningPrivateLinkServiceConnectionState() { - Description = "Auto-Approved", Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, + Description = "Auto-Approved", }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionResource.cs index 947195048b750..0f7384528f55c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningPrivateEndpointConnectionResource.cs @@ -15,13 +15,13 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningPrivateEndpointConnectionResource { - // WorkspacePutPrivateEndpointConnection + // WorkspaceGetPrivateEndpointConnection [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_WorkspacePutPrivateEndpointConnection() + public async Task Get_WorkspaceGetPrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/PrivateEndpointConnection/delete.json - // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/PrivateEndpointConnection/get.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 TokenCredential cred = new DefaultAzureCredential(); @@ -38,18 +38,22 @@ public async Task Delete_WorkspacePutPrivateEndpointConnection() MachineLearningPrivateEndpointConnectionResource machineLearningPrivateEndpointConnection = client.GetMachineLearningPrivateEndpointConnectionResource(machineLearningPrivateEndpointConnectionResourceId); // invoke the operation - await machineLearningPrivateEndpointConnection.DeleteAsync(WaitUntil.Completed); + MachineLearningPrivateEndpointConnectionResource result = await machineLearningPrivateEndpointConnection.GetAsync(); - Console.WriteLine($"Succeeded"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningPrivateEndpointConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // WorkspaceGetPrivateEndpointConnection + // WorkspacePutPrivateEndpointConnection [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_WorkspaceGetPrivateEndpointConnection() + public async Task Update_WorkspacePutPrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/PrivateEndpointConnection/get.json - // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/PrivateEndpointConnection/createOrUpdate.json + // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -66,7 +70,16 @@ public async Task Get_WorkspaceGetPrivateEndpointConnection() MachineLearningPrivateEndpointConnectionResource machineLearningPrivateEndpointConnection = client.GetMachineLearningPrivateEndpointConnectionResource(machineLearningPrivateEndpointConnectionResourceId); // invoke the operation - MachineLearningPrivateEndpointConnectionResource result = await machineLearningPrivateEndpointConnection.GetAsync(); + MachineLearningPrivateEndpointConnectionData data = new MachineLearningPrivateEndpointConnectionData(new AzureLocation("placeholder")) + { + ConnectionState = new MachineLearningPrivateLinkServiceConnectionState() + { + Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, + Description = "Auto-Approved", + }, + }; + ArmOperation lro = await machineLearningPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); + MachineLearningPrivateEndpointConnectionResource 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 @@ -75,13 +88,13 @@ public async Task Get_WorkspaceGetPrivateEndpointConnection() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // WorkspacePutPrivateEndpointConnection + // WorkspaceDeletePrivateEndpointConnection [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_WorkspacePutPrivateEndpointConnection() + public async Task Delete_WorkspaceDeletePrivateEndpointConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/PrivateEndpointConnection/createOrUpdate.json - // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/PrivateEndpointConnection/delete.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 TokenCredential cred = new DefaultAzureCredential(); @@ -98,22 +111,9 @@ public async Task Update_WorkspacePutPrivateEndpointConnection() MachineLearningPrivateEndpointConnectionResource machineLearningPrivateEndpointConnection = client.GetMachineLearningPrivateEndpointConnectionResource(machineLearningPrivateEndpointConnectionResourceId); // invoke the operation - MachineLearningPrivateEndpointConnectionData data = new MachineLearningPrivateEndpointConnectionData(new AzureLocation("placeholder")) - { - ConnectionState = new MachineLearningPrivateLinkServiceConnectionState() - { - Description = "Auto-Approved", - Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, - }, - }; - ArmOperation lro = await machineLearningPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data); - MachineLearningPrivateEndpointConnectionResource result = lro.Value; + await machineLearningPrivateEndpointConnection.DeleteAsync(WaitUntil.Completed); - // 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 - MachineLearningPrivateEndpointConnectionData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded"); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerCollection.cs index eb071ebcb0084..3e0dcc45f55d4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryCodeContainerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRegistryCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeContainer/list.json // this example is just showing the usage of "RegistryCodeContainers_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 @@ -57,7 +57,7 @@ public async Task GetAll_ListRegistryCodeContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeContainer/get.json // this example is just showing the usage of "RegistryCodeContainers_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 @@ -92,7 +92,7 @@ public async Task Get_GetRegistryCodeContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRegistryCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeContainer/get.json // this example is just showing the usage of "RegistryCodeContainers_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 @@ -123,7 +123,7 @@ public async Task Exists_GetRegistryCodeContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRegistryCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeContainer/get.json // this example is just showing the usage of "RegistryCodeContainers_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 GetIfExists_GetRegistryCodeContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRegistryCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeContainer/createOrUpdate.json // this example is just showing the usage of "RegistryCodeContainers_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerResource.cs index 1c255d1b17587..183c8b8e2d60b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeContainerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryCodeContainerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteRegistryCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeContainer/delete.json // this example is just showing the usage of "RegistryCodeContainers_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteRegistryCodeContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeContainer/get.json // this example is just showing the usage of "RegistryCodeContainers_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 @@ -80,7 +80,7 @@ public async Task Get_GetRegistryCodeContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateRegistryCodeContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeContainer/createOrUpdate.json // this example is just showing the usage of "RegistryCodeContainers_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionCollection.cs index 0c00637f99ed9..73e592f7fecf3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryCodeVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRegistryCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/list.json // this example is just showing the usage of "RegistryCodeVersions_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 @@ -60,7 +60,7 @@ public async Task GetAll_ListRegistryCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/get.json // this example is just showing the usage of "RegistryCodeVersions_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 @@ -96,7 +96,7 @@ public async Task Get_GetRegistryCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRegistryCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/get.json // this example is just showing the usage of "RegistryCodeVersions_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 @@ -128,7 +128,7 @@ public async Task Exists_GetRegistryCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRegistryCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/get.json // this example is just showing the usage of "RegistryCodeVersions_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 @@ -172,7 +172,7 @@ public async Task GetIfExists_GetRegistryCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRegistryCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/createOrUpdate.json // this example is just showing the usage of "RegistryCodeVersions_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 @@ -199,11 +199,11 @@ public async Task CreateOrUpdate_CreateOrUpdateRegistryCodeVersion() CodeUri = new Uri("https://blobStorage/folderName"), IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionResource.cs index 478f35ea7b9a2..b1d6fc89129af 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCodeVersionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryCodeVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteRegistryCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/delete.json // this example is just showing the usage of "RegistryCodeVersions_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteRegistryCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/get.json // this example is just showing the usage of "RegistryCodeVersions_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 @@ -82,7 +82,7 @@ public async Task Get_GetRegistryCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateRegistryCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/createOrUpdate.json // this example is just showing the usage of "RegistryCodeVersions_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 @@ -106,11 +106,11 @@ public async Task Update_CreateOrUpdateRegistryCodeVersion() CodeUri = new Uri("https://blobStorage/folderName"), IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, @@ -130,7 +130,7 @@ public async Task Update_CreateOrUpdateRegistryCodeVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrGetStartPendingUpload_CreateOrGetStartPendingUploadRegistryCodeVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/CodeVersion/createOrGetStartPendingUpload.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/CodeVersion/createOrGetStartPendingUpload.json // this example is just showing the usage of "RegistryCodeVersions_CreateOrGetStartPendingUpload" 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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCollection.cs index 601f95a319cd5..5cbc7678677b1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_MachineLearningRegistryCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRegistriesWithSystemCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/list-SystemCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/list-SystemCreated.json // this example is just showing the usage of "Registries_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 @@ -58,7 +58,7 @@ public async Task GetAll_ListRegistriesWithSystemCreatedAccounts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRegistriesWithUserCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/list-UserCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/list-UserCreated.json // this example is just showing the usage of "Registries_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 @@ -94,7 +94,7 @@ public async Task GetAll_ListRegistriesWithUserCreatedAccounts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryWithSystemCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/get-SystemCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/get-SystemCreated.json // this example is just showing the usage of "Registries_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 @@ -128,7 +128,7 @@ public async Task Get_GetRegistryWithSystemCreatedAccounts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRegistryWithSystemCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/get-SystemCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/get-SystemCreated.json // this example is just showing the usage of "Registries_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 @@ -158,7 +158,7 @@ public async Task Exists_GetRegistryWithSystemCreatedAccounts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRegistryWithSystemCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/get-SystemCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/get-SystemCreated.json // this example is just showing the usage of "Registries_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 @@ -200,7 +200,7 @@ public async Task GetIfExists_GetRegistryWithSystemCreatedAccounts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryWithUserCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/get-UserCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/get-UserCreated.json // this example is just showing the usage of "Registries_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 @@ -234,7 +234,7 @@ public async Task Get_GetRegistryWithUserCreatedAccounts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRegistryWithUserCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/get-UserCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/get-UserCreated.json // this example is just showing the usage of "Registries_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 @@ -264,7 +264,7 @@ public async Task Exists_GetRegistryWithUserCreatedAccounts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRegistryWithUserCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/get-UserCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/get-UserCreated.json // this example is just showing the usage of "Registries_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 @@ -306,7 +306,7 @@ public async Task GetIfExists_GetRegistryWithUserCreatedAccounts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRegistryWithSystemCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/createOrUpdate-SystemCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/createOrUpdate-SystemCreated.json // this example is just showing the usage of "Registries_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 @@ -365,7 +365,7 @@ public async Task CreateOrUpdate_CreateOrUpdateRegistryWithSystemCreatedAccounts { ActionsRequired = "string", Description = "string", -Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, +Status = EndpointServiceConnectionStatus.Approved, }, ProvisioningState = "string", } @@ -423,7 +423,7 @@ public async Task CreateOrUpdate_CreateOrUpdateRegistryWithSystemCreatedAccounts [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRegistryWithUserCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/createOrUpdate-UserCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/createOrUpdate-UserCreated.json // this example is just showing the usage of "Registries_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 @@ -482,7 +482,7 @@ public async Task CreateOrUpdate_CreateOrUpdateRegistryWithUserCreatedAccounts() { ActionsRequired = "string", Description = "string", -Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, +Status = EndpointServiceConnectionStatus.Approved, }, ProvisioningState = "string", } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerCollection.cs index d03eaa57501a5..b976351c53af3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryDataContainerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RegistryListRegistryDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataContainer/registryList.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataContainer/registryList.json // this example is just showing the usage of "RegistryDataContainers_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 @@ -58,7 +58,7 @@ public async Task GetAll_RegistryListRegistryDataContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataContainer/get.json // this example is just showing the usage of "RegistryDataContainers_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 @@ -93,7 +93,7 @@ public async Task Get_GetRegistryDataContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRegistryDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataContainer/get.json // this example is just showing the usage of "RegistryDataContainers_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 @@ -124,7 +124,7 @@ public async Task Exists_GetRegistryDataContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRegistryDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataContainer/get.json // this example is just showing the usage of "RegistryDataContainers_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 @@ -167,7 +167,7 @@ public async Task GetIfExists_GetRegistryDataContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRegistryDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataContainer/createOrUpdate.json // this example is just showing the usage of "RegistryDataContainers_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 @@ -192,11 +192,11 @@ public async Task CreateOrUpdate_CreateOrUpdateRegistryDataContainer() { IsArchived = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerResource.cs index 4643b39bdd4e4..3c443dbdcaf65 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataContainerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryDataContainerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteRegistryDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataContainer/delete.json // this example is just showing the usage of "RegistryDataContainers_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteRegistryDataContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataContainer/get.json // this example is just showing the usage of "RegistryDataContainers_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 @@ -80,7 +80,7 @@ public async Task Get_GetRegistryDataContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateRegistryDataContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataContainer/createOrUpdate.json // this example is just showing the usage of "RegistryDataContainers_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 @@ -102,11 +102,11 @@ public async Task Update_CreateOrUpdateRegistryDataContainer() { IsArchived = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionCollection.cs index 504edabb1f9dd..31b9a44892ecf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryDataVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RegistryListRegistryDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataVersionBase/registryList.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/registryList.json // this example is just showing the usage of "RegistryDataVersions_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 @@ -62,7 +62,7 @@ public async Task GetAll_RegistryListRegistryDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataVersionBase/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/get.json // this example is just showing the usage of "RegistryDataVersions_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 @@ -98,7 +98,7 @@ public async Task Get_GetRegistryDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRegistryDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataVersionBase/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/get.json // this example is just showing the usage of "RegistryDataVersions_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 @@ -130,7 +130,7 @@ public async Task Exists_GetRegistryDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRegistryDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataVersionBase/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/get.json // this example is just showing the usage of "RegistryDataVersions_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 @@ -174,7 +174,7 @@ public async Task GetIfExists_GetRegistryDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRegistryDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataVersionBase/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/createOrUpdate.json // this example is just showing the usage of "RegistryDataVersions_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 @@ -202,14 +202,14 @@ public async Task CreateOrUpdate_CreateOrUpdateRegistryDataVersionBase() { new Uri("string") }, - IsAnonymous = false, IsArchived = false, + IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionResource.cs index 585198b8eb920..a8eb7798b26ec 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryDataVersionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryDataVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteRegistryDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataVersionBase/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/delete.json // this example is just showing the usage of "RegistryDataVersions_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteRegistryDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataVersionBase/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/get.json // this example is just showing the usage of "RegistryDataVersions_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 @@ -82,7 +82,7 @@ public async Task Get_GetRegistryDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateRegistryDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataVersionBase/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/createOrUpdate.json // this example is just showing the usage of "RegistryDataVersions_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 @@ -107,14 +107,14 @@ public async Task Update_CreateOrUpdateRegistryDataVersionBase() { new Uri("string") }, - IsAnonymous = false, IsArchived = false, + IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, @@ -134,7 +134,7 @@ public async Task Update_CreateOrUpdateRegistryDataVersionBase() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrGetStartPendingUpload_CreateOrGetStartPendingUploadRegistryDataVersionBase() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/DataVersionBase/createOrGetStartPendingUpload.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/DataVersionBase/createOrGetStartPendingUpload.json // this example is just showing the usage of "RegistryDataVersions_CreateOrGetStartPendingUpload" 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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerCollection.cs index d2c18ad5a5aa3..8b91affc1bb36 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryEnvironmentContainerCollectio [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRegistryEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentContainer/list.json // this example is just showing the usage of "RegistryEnvironmentContainers_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 @@ -57,7 +57,7 @@ public async Task GetAll_ListRegistryEnvironmentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentContainer/get.json // this example is just showing the usage of "RegistryEnvironmentContainers_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 @@ -92,7 +92,7 @@ public async Task Get_GetRegistryEnvironmentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRegistryEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentContainer/get.json // this example is just showing the usage of "RegistryEnvironmentContainers_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 @@ -123,7 +123,7 @@ public async Task Exists_GetRegistryEnvironmentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRegistryEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentContainer/get.json // this example is just showing the usage of "RegistryEnvironmentContainers_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 GetIfExists_GetRegistryEnvironmentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRegistryEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentContainer/createOrUpdate.json // this example is just showing the usage of "RegistryEnvironmentContainers_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 @@ -190,13 +190,13 @@ public async Task CreateOrUpdate_CreateOrUpdateRegistryEnvironmentContainer() MachineLearningEnvironmentContainerData data = new MachineLearningEnvironmentContainerData(new MachineLearningEnvironmentContainerProperties() { Description = "string", - Properties = + Tags = { ["additionalProp1"] = "string", ["additionalProp2"] = "string", ["additionalProp3"] = "string", }, - Tags = + Properties = { ["additionalProp1"] = "string", ["additionalProp2"] = "string", diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerResource.cs index 909c579c52ab2..b4f45f58c2813 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentContainerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryEnvironmentContainerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteRegistryEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentContainer/delete.json // this example is just showing the usage of "RegistryEnvironmentContainers_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteRegistryEnvironmentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentContainer/get.json // this example is just showing the usage of "RegistryEnvironmentContainers_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 @@ -80,7 +80,7 @@ public async Task Get_GetRegistryEnvironmentContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateRegistryEnvironmentContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentContainer/createOrUpdate.json // this example is just showing the usage of "RegistryEnvironmentContainers_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 @@ -101,13 +101,13 @@ public async Task Update_CreateOrUpdateRegistryEnvironmentContainer() MachineLearningEnvironmentContainerData data = new MachineLearningEnvironmentContainerData(new MachineLearningEnvironmentContainerProperties() { Description = "string", - Properties = + Tags = { ["additionalProp1"] = "string", ["additionalProp2"] = "string", ["additionalProp3"] = "string", }, - Tags = + Properties = { ["additionalProp1"] = "string", ["additionalProp2"] = "string", diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionCollection.cs index 1a4accc406495..2cb0dc43bacc1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryEnvironmentVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRegistryEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentVersion/list.json // this example is just showing the usage of "RegistryEnvironmentVersions_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 @@ -60,7 +60,7 @@ public async Task GetAll_ListRegistryEnvironmentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentVersion/get.json // this example is just showing the usage of "RegistryEnvironmentVersions_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 @@ -96,7 +96,7 @@ public async Task Get_GetRegistryEnvironmentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRegistryEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentVersion/get.json // this example is just showing the usage of "RegistryEnvironmentVersions_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 @@ -128,7 +128,7 @@ public async Task Exists_GetRegistryEnvironmentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRegistryEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentVersion/get.json // this example is just showing the usage of "RegistryEnvironmentVersions_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 @@ -172,7 +172,7 @@ public async Task GetIfExists_GetRegistryEnvironmentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRegistryEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentVersion/createOrUpdate.json // this example is just showing the usage of "RegistryEnvironmentVersions_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 @@ -196,12 +196,12 @@ public async Task CreateOrUpdate_CreateOrUpdateRegistryEnvironmentVersion() string version = "string"; MachineLearningEnvironmentVersionData data = new MachineLearningEnvironmentVersionData(new MachineLearningEnvironmentVersionProperties() { + Image = "docker.io/tensorflow/serving:latest", + CondaFile = "string", Build = new MachineLearningBuildContext(new Uri("https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/")) { DockerfilePath = "prod/Dockerfile", }, - CondaFile = "string", - Image = "docker.io/tensorflow/serving:latest", InferenceConfig = new MachineLearningInferenceContainerProperties() { LivenessRoute = new MachineLearningInferenceContainerRoute("string", 1), @@ -210,11 +210,11 @@ public async Task CreateOrUpdate_CreateOrUpdateRegistryEnvironmentVersion() }, IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionResource.cs index 4391cd0a14908..799fc99666900 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryEnvironmentVersionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryEnvironmentVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteRegistryEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentVersion/delete.json // this example is just showing the usage of "RegistryEnvironmentVersions_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteRegistryEnvironmentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentVersion/get.json // this example is just showing the usage of "RegistryEnvironmentVersions_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 @@ -82,7 +82,7 @@ public async Task Get_GetRegistryEnvironmentVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateRegistryEnvironmentVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/EnvironmentVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/EnvironmentVersion/createOrUpdate.json // this example is just showing the usage of "RegistryEnvironmentVersions_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 @@ -103,12 +103,12 @@ public async Task Update_CreateOrUpdateRegistryEnvironmentVersion() // invoke the operation MachineLearningEnvironmentVersionData data = new MachineLearningEnvironmentVersionData(new MachineLearningEnvironmentVersionProperties() { + Image = "docker.io/tensorflow/serving:latest", + CondaFile = "string", Build = new MachineLearningBuildContext(new Uri("https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/")) { DockerfilePath = "prod/Dockerfile", }, - CondaFile = "string", - Image = "docker.io/tensorflow/serving:latest", InferenceConfig = new MachineLearningInferenceContainerProperties() { LivenessRoute = new MachineLearningInferenceContainerRoute("string", 1), @@ -117,11 +117,11 @@ public async Task Update_CreateOrUpdateRegistryEnvironmentVersion() }, IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerCollection.cs index 20bab15e0910c..2f7526b40337b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryModelContainerCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRegistryModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelContainer/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelContainer/list.json // this example is just showing the usage of "RegistryModelContainers_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 @@ -57,7 +57,7 @@ public async Task GetAll_ListRegistryModelContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelContainer/get.json // this example is just showing the usage of "RegistryModelContainers_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 @@ -92,7 +92,7 @@ public async Task Get_GetRegistryModelContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRegistryModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelContainer/get.json // this example is just showing the usage of "RegistryModelContainers_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 @@ -123,7 +123,7 @@ public async Task Exists_GetRegistryModelContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRegistryModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelContainer/get.json // this example is just showing the usage of "RegistryModelContainers_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 GetIfExists_GetRegistryModelContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRegistryModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelContainer/createOrUpdate.json // this example is just showing the usage of "RegistryModelContainers_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerResource.cs index a0dc575e7a281..da10344660d0c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelContainerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryModelContainerResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteRegistryModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelContainer/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelContainer/delete.json // this example is just showing the usage of "RegistryModelContainers_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteRegistryModelContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelContainer/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelContainer/get.json // this example is just showing the usage of "RegistryModelContainers_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 @@ -80,7 +80,7 @@ public async Task Get_GetRegistryModelContainer() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateRegistryModelContainer() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelContainer/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelContainer/createOrUpdate.json // this example is just showing the usage of "RegistryModelContainers_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionCollection.cs index 92f94d6ac3e38..3e3d0fb323df9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryModelVersionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListRegistryModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelVersion/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/list.json // this example is just showing the usage of "RegistryModelVersions_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 @@ -59,7 +59,7 @@ public async Task GetAll_ListRegistryModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/get.json // this example is just showing the usage of "RegistryModelVersions_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 @@ -95,7 +95,7 @@ public async Task Get_GetRegistryModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetRegistryModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/get.json // this example is just showing the usage of "RegistryModelVersions_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 @@ -127,7 +127,7 @@ public async Task Exists_GetRegistryModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetRegistryModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/get.json // this example is just showing the usage of "RegistryModelVersions_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 @@ -171,7 +171,7 @@ public async Task GetIfExists_GetRegistryModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateRegistryModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/createOrUpdate.json // this example is just showing the usage of "RegistryModelVersions_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 @@ -209,11 +209,11 @@ public async Task CreateOrUpdate_CreateOrUpdateRegistryModelVersion() ModelUri = new Uri("string"), IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionResource.cs index 84d7db0765f99..49471a0103e97 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryModelVersionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MachineLearningRegistryModelVersionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteRegistryModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelVersion/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/delete.json // this example is just showing the usage of "RegistryModelVersions_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteRegistryModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelVersion/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/get.json // this example is just showing the usage of "RegistryModelVersions_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 @@ -82,7 +82,7 @@ public async Task Get_GetRegistryModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateRegistryModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelVersion/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/createOrUpdate.json // this example is just showing the usage of "RegistryModelVersions_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 @@ -117,11 +117,11 @@ public async Task Update_CreateOrUpdateRegistryModelVersion() ModelUri = new Uri("string"), IsAnonymous = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, @@ -141,7 +141,7 @@ public async Task Update_CreateOrUpdateRegistryModelVersion() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrGetStartPendingUpload_CreateOrGetStartPendingUploadRegistryModelVersion() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registry/ModelVersion/createOrGetStartPendingUpload.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registry/ModelVersion/createOrGetStartPendingUpload.json // this example is just showing the usage of "RegistryModelVersions_CreateOrGetStartPendingUpload" 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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryResource.cs index 3602d65f8a45d..a924a1305df73 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningRegistryResource.cs @@ -22,7 +22,7 @@ public partial class Sample_MachineLearningRegistryResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetBlobReferenceSasRegistryDataReference_GetBlobReferenceSASDataReference() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/DataReference/getBlobReferenceSAS.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/DataReference/getBlobReferenceSAS.json // this example is just showing the usage of "RegistryDataReferences_GetBlobReferenceSas" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task GetBlobReferenceSasRegistryDataReference_GetBlobReferenceSASDa [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMachineLearningRegistries_ListRegistriesBySubscription() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/listBySubscription.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/listBySubscription.json // this example is just showing the usage of "Registries_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 @@ -88,7 +88,7 @@ public async Task GetMachineLearningRegistries_ListRegistriesBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteRegistry() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/delete.json // this example is just showing the usage of "Registries_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 @@ -115,7 +115,7 @@ public async Task Delete_DeleteRegistry() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryWithSystemCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/get-SystemCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/get-SystemCreated.json // this example is just showing the usage of "Registries_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 @@ -146,7 +146,7 @@ public async Task Get_GetRegistryWithSystemCreatedAccounts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetRegistryWithUserCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/get-UserCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/get-UserCreated.json // this example is just showing the usage of "Registries_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 @@ -177,7 +177,7 @@ public async Task Get_GetRegistryWithUserCreatedAccounts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateRegistryWithSystemCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/update-SystemCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/update-SystemCreated.json // this example is just showing the usage of "Registries_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 @@ -205,11 +205,11 @@ public async Task Update_UpdateRegistryWithSystemCreatedAccounts() }, Sku = new MachineLearningSkuPatch() { - Capacity = 1, - Family = "string", Name = "string", - Size = "string", Tier = MachineLearningSkuTier.Basic, + Size = "string", + Family = "string", + Capacity = 1, }, Tags = { @@ -229,7 +229,7 @@ public async Task Update_UpdateRegistryWithSystemCreatedAccounts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateRegistryWithUserCreatedAccounts() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/update-UserCreated.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/update-UserCreated.json // this example is just showing the usage of "Registries_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -257,11 +257,11 @@ public async Task Update_UpdateRegistryWithUserCreatedAccounts() }, Sku = new MachineLearningSkuPatch() { - Capacity = 1, - Family = "string", Name = "string", - Size = "string", Tier = MachineLearningSkuTier.Basic, + Size = "string", + Family = "string", + Capacity = 1, }, Tags = { @@ -281,7 +281,7 @@ public async Task Update_UpdateRegistryWithUserCreatedAccounts() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RemoveRegions_RemoveRegionsFromRegistry() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Registries/removeRegions.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Registries/removeRegions.json // this example is just showing the usage of "Registries_RemoveRegions" 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 @@ -337,7 +337,7 @@ public async Task RemoveRegions_RemoveRegionsFromRegistry() { ActionsRequired = "string", Description = "string", -Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, +Status = EndpointServiceConnectionStatus.Approved, }, ProvisioningState = "string", } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleCollection.cs index 049dcbc1b0915..9004740e819f1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_MachineLearningScheduleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSchedules() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Schedule/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Schedule/list.json // this example is just showing the usage of "Schedules_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 @@ -58,7 +58,7 @@ public async Task GetAll_ListSchedules() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Schedule/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Schedule/get.json // this example is just showing the usage of "Schedules_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 @@ -93,7 +93,7 @@ public async Task Get_GetSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Schedule/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Schedule/get.json // this example is just showing the usage of "Schedules_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 @@ -124,7 +124,7 @@ public async Task Exists_GetSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Schedule/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Schedule/get.json // this example is just showing the usage of "Schedules_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 @@ -167,7 +167,7 @@ public async Task GetIfExists_GetSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Schedule/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Schedule/createOrUpdate.json // this example is just showing the usage of "Schedules_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,24 +188,24 @@ public async Task CreateOrUpdate_CreateOrUpdateSchedule() // invoke the operation string name = "string"; - MachineLearningScheduleData data = new MachineLearningScheduleData(new MachineLearningScheduleProperties(new MachineLearningEndpointScheduleAction(BinaryData.FromObjectAsJson(new Dictionary() - { - ["9965593e-526f-4b89-bb36-761138cf2794"] = null - })), new CronTrigger("string") + MachineLearningScheduleData data = new MachineLearningScheduleData(new MachineLearningScheduleProperties(new CronTrigger("string") { EndTime = "string", StartTime = "string", TimeZone = "string", - }) + }, new MachineLearningEndpointScheduleAction(BinaryData.FromObjectAsJson(new Dictionary() + { + ["9965593e-526f-4b89-bb36-761138cf2794"] = null + }))) { DisplayName = "string", IsEnabled = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleResource.cs index 08b92858b18f5..47302b51176eb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningScheduleResource.cs @@ -21,7 +21,7 @@ public partial class Sample_MachineLearningScheduleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Schedule/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Schedule/delete.json // this example is just showing the usage of "Schedules_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Schedule/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Schedule/get.json // this example is just showing the usage of "Schedules_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 @@ -81,7 +81,7 @@ public async Task Get_GetSchedule() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateSchedule() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Schedule/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Schedule/createOrUpdate.json // this example is just showing the usage of "Schedules_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 @@ -99,24 +99,24 @@ public async Task Update_CreateOrUpdateSchedule() MachineLearningScheduleResource machineLearningSchedule = client.GetMachineLearningScheduleResource(machineLearningScheduleResourceId); // invoke the operation - MachineLearningScheduleData data = new MachineLearningScheduleData(new MachineLearningScheduleProperties(new MachineLearningEndpointScheduleAction(BinaryData.FromObjectAsJson(new Dictionary() - { - ["9965593e-526f-4b89-bb36-761138cf2794"] = null - })), new CronTrigger("string") + MachineLearningScheduleData data = new MachineLearningScheduleData(new MachineLearningScheduleProperties(new CronTrigger("string") { EndTime = "string", StartTime = "string", TimeZone = "string", - }) + }, new MachineLearningEndpointScheduleAction(BinaryData.FromObjectAsJson(new Dictionary() + { + ["9965593e-526f-4b89-bb36-761138cf2794"] = null + }))) { DisplayName = "string", IsEnabled = false, Description = "string", - Properties = + Tags = { ["string"] = "string", }, - Tags = + Properties = { ["string"] = "string", }, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceCollection.cs index 961aa1eddc87f..fb60944226e91 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceCollection.cs @@ -17,48 +17,12 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningWorkspaceCollection { - // Get Workspaces by Resource Group - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_GetWorkspacesByResourceGroup() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/listByResourceGroup.json - // this example is just showing the usage of "Workspaces_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "workspace-1234"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this MachineLearningWorkspaceResource - MachineLearningWorkspaceCollection collection = resourceGroupResource.GetMachineLearningWorkspaces(); - - // invoke the operation and iterate over the result - await foreach (MachineLearningWorkspaceResource item in collection.GetAllAsync()) - { - // the variable item 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 - MachineLearningWorkspaceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - // Get Workspace [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/get.json // this example is just showing the usage of "Workspaces_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 @@ -92,7 +56,7 @@ public async Task Get_GetWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/get.json // this example is just showing the usage of "Workspaces_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 @@ -122,7 +86,7 @@ public async Task Exists_GetWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/get.json // this example is just showing the usage of "Workspaces_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 @@ -164,7 +128,7 @@ public async Task GetIfExists_GetWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/create.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/create.json // this example is just showing the usage of "Workspaces_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 @@ -193,31 +157,31 @@ public async Task CreateOrUpdate_CreateWorkspace() [new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai")] = new UserAssignedIdentity(), }, }, + Description = "test description", + FriendlyName = "HelloName", + KeyVault = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", ApplicationInsights = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", ContainerRegistry = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", - Description = "test description", - Encryption = new MachineLearningEncryptionSetting(new MachineLearningEncryptionKeyVaultProperties("https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb", new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv")) + StorageAccount = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount", + Encryption = new MachineLearningEncryptionSetting(MachineLearningEncryptionStatus.Enabled, new MachineLearningEncryptionKeyVaultProperties(new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv"), "https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb") { IdentityClientId = "", - }, MachineLearningEncryptionStatus.Enabled) + }) { UserAssignedIdentity = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai"), }, - FriendlyName = "HelloName", IsHbiWorkspace = false, - KeyVault = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", SharedPrivateLinkResources = { new MachineLearningSharedPrivateLinkResource() { Name = "testdbresource", -GroupId = "Sql", PrivateLinkResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql"), +GroupId = "Sql", RequestMessage = "Please approve", Status = MachineLearningPrivateEndpointServiceConnectionStatus.Approved, } }, - StorageAccount = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, workspaceName, data); MachineLearningWorkspaceResource result = lro.Value; @@ -228,5 +192,41 @@ public async Task CreateOrUpdate_CreateWorkspace() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + // Get Workspaces by Resource Group + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_GetWorkspacesByResourceGroup() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/listByResourceGroup.json + // this example is just showing the usage of "Workspaces_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MachineLearningWorkspaceResource + MachineLearningWorkspaceCollection collection = resourceGroupResource.GetMachineLearningWorkspaces(); + + // invoke the operation and iterate over the result + await foreach (MachineLearningWorkspaceResource item in collection.GetAllAsync()) + { + // the variable item 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 + MachineLearningWorkspaceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionCollection.cs index 56970054f07e0..bc86545806a24 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionCollection.cs @@ -15,13 +15,13 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningWorkspaceConnectionCollection { - // ListWorkspaceConnections + // CreateWorkspaceConnection [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListWorkspaceConnections() + public async Task CreateOrUpdate_CreateWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/list.json - // this example is just showing the usage of "WorkspaceConnections_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/WorkspaceConnection/create.json + // this example is just showing the usage of "WorkspaceConnections_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 TokenCredential cred = new DefaultAzureCredential(); @@ -39,19 +39,21 @@ public async Task GetAll_ListWorkspaceConnections() // get the collection of this MachineLearningWorkspaceConnectionResource MachineLearningWorkspaceConnectionCollection collection = machineLearningWorkspace.GetMachineLearningWorkspaceConnections(); - // invoke the operation and iterate over the result - string target = "www.facebook.com"; - string category = "ContainerRegistry"; - await foreach (MachineLearningWorkspaceConnectionResource item in collection.GetAllAsync(target: target, category: category)) + // invoke the operation + string connectionName = "connection-1"; + MachineLearningWorkspaceConnectionData data = new MachineLearningWorkspaceConnectionData(new MachineLearningNoneAuthTypeWorkspaceConnection() { - // the variable item 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 - MachineLearningWorkspaceConnectionData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } + Category = MachineLearningConnectionCategory.ContainerRegistry, + Target = "www.facebook.com", + }); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, connectionName, data); + MachineLearningWorkspaceConnectionResource result = lro.Value; - Console.WriteLine($"Succeeded"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningWorkspaceConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } // GetWorkspaceConnection @@ -59,7 +61,7 @@ public async Task GetAll_ListWorkspaceConnections() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/WorkspaceConnection/get.json // this example is just showing the usage of "WorkspaceConnections_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 @@ -94,7 +96,7 @@ public async Task Get_GetWorkspaceConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/WorkspaceConnection/get.json // this example is just showing the usage of "WorkspaceConnections_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 @@ -125,7 +127,7 @@ public async Task Exists_GetWorkspaceConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/WorkspaceConnection/get.json // this example is just showing the usage of "WorkspaceConnections_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 @@ -163,13 +165,13 @@ public async Task GetIfExists_GetWorkspaceConnection() } } - // CreateWorkspaceConnection + // ListWorkspaceConnections [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateWorkspaceConnection() + public async Task GetAll_ListWorkspaceConnections() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/create.json - // this example is just showing the usage of "WorkspaceConnections_Create" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/WorkspaceConnection/list.json + // this example is just showing the usage of "WorkspaceConnections_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(); @@ -187,22 +189,19 @@ public async Task CreateOrUpdate_CreateWorkspaceConnection() // get the collection of this MachineLearningWorkspaceConnectionResource MachineLearningWorkspaceConnectionCollection collection = machineLearningWorkspace.GetMachineLearningWorkspaceConnections(); - // invoke the operation - string connectionName = "connection-1"; - MachineLearningWorkspaceConnectionData data = new MachineLearningWorkspaceConnectionData(new MachineLearningNoneAuthTypeWorkspaceConnection() + // invoke the operation and iterate over the result + string target = "www.facebook.com"; + string category = "ContainerRegistry"; + await foreach (MachineLearningWorkspaceConnectionResource item in collection.GetAllAsync(target: target, category: category)) { - Category = MachineLearningConnectionCategory.ContainerRegistry, - ExpiryOn = DateTimeOffset.Parse("2024-03-15T14:30:00Z"), - Target = "www.facebook.com", - }); - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, connectionName, data); - MachineLearningWorkspaceConnectionResource result = lro.Value; + // the variable item 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 + MachineLearningWorkspaceConnectionData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } - // 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 - MachineLearningWorkspaceConnectionData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded"); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionResource.cs index 23da7862194c1..3a448537e501a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceConnectionResource.cs @@ -15,13 +15,13 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningWorkspaceConnectionResource { - // DeleteWorkspaceConnection + // CreateWorkspaceConnection [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteWorkspaceConnection() + public async Task Update_CreateWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/delete.json - // this example is just showing the usage of "WorkspaceConnections_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/WorkspaceConnection/create.json + // this example is just showing the usage of "WorkspaceConnections_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 TokenCredential cred = new DefaultAzureCredential(); @@ -38,9 +38,19 @@ public async Task Delete_DeleteWorkspaceConnection() MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); // invoke the operation - await machineLearningWorkspaceConnection.DeleteAsync(WaitUntil.Completed); + MachineLearningWorkspaceConnectionData data = new MachineLearningWorkspaceConnectionData(new MachineLearningNoneAuthTypeWorkspaceConnection() + { + Category = MachineLearningConnectionCategory.ContainerRegistry, + Target = "www.facebook.com", + }); + ArmOperation lro = await machineLearningWorkspaceConnection.UpdateAsync(WaitUntil.Completed, data); + MachineLearningWorkspaceConnectionResource result = lro.Value; - Console.WriteLine($"Succeeded"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningWorkspaceConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } // GetWorkspaceConnection @@ -48,7 +58,7 @@ public async Task Delete_DeleteWorkspaceConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/WorkspaceConnection/get.json // this example is just showing the usage of "WorkspaceConnections_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 @@ -75,13 +85,13 @@ public async Task Get_GetWorkspaceConnection() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // UpdateWorkspaceConnection + // DeleteWorkspaceConnection [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_UpdateWorkspaceConnection() + public async Task Delete_DeleteWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/update.json - // this example is just showing the usage of "WorkspaceConnections_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/WorkspaceConnection/delete.json + // this example is just showing the usage of "WorkspaceConnections_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 TokenCredential cred = new DefaultAzureCredential(); @@ -91,37 +101,16 @@ public async Task Update_UpdateWorkspaceConnection() // this example assumes you already have this MachineLearningWorkspaceConnectionResource created on azure // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; + string resourceGroupName = "resourceGroup-1"; string workspaceName = "workspace-1"; string connectionName = "connection-1"; ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); // invoke the operation - MachineLearningWorkspaceConnectionPatch patch = new MachineLearningWorkspaceConnectionPatch() - { - Properties = new AccessKeyAuthTypeWorkspaceConnectionProperties() - { - Credentials = new WorkspaceConnectionAccessKey() - { - AccessKeyId = "some_string", - SecretAccessKey = "some_string", - }, - Category = MachineLearningConnectionCategory.AdlsGen2, - ExpiryOn = DateTimeOffset.Parse("2020-01-01T00:00:00Z"), - Metadata = -{ -}, - Target = "some_string", - }, - }; - MachineLearningWorkspaceConnectionResource result = await machineLearningWorkspaceConnection.UpdateAsync(patch); + await machineLearningWorkspaceConnection.DeleteAsync(WaitUntil.Completed); - // 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 - MachineLearningWorkspaceConnectionData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded"); } // GetWorkspaceConnection @@ -129,7 +118,7 @@ public async Task Update_UpdateWorkspaceConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSecrets_GetWorkspaceConnection() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/listSecrets.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/WorkspaceConnection/listSecrets.json // this example is just showing the usage of "WorkspaceConnections_ListSecrets" 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 @@ -155,70 +144,5 @@ public async Task GetSecrets_GetWorkspaceConnection() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - - // TestWorkspaceConnection - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task TestConnection_TestWorkspaceConnection() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/testConnection.json - // this example is just showing the usage of "WorkspaceConnections_TestConnection" 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 MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "workspace-1"; - string connectionName = "connection-1"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // invoke the operation - MachineLearningWorkspaceConnectionData data = new MachineLearningWorkspaceConnectionData(new MachineLearningNoneAuthTypeWorkspaceConnection() - { - Category = MachineLearningConnectionCategory.ContainerRegistry, - ExpiryOn = DateTimeOffset.Parse("2024-03-15T14:30:00Z"), - Target = "target_url", - }); - await machineLearningWorkspaceConnection.TestConnectionAsync(WaitUntil.Completed, data: data); - - Console.WriteLine($"Succeeded"); - } - - // Get Azure OpenAI Connection Models - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetModelsConnections_GetAzureOpenAIConnectionModels() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/getModels.json - // this example is just showing the usage of "Connection_GetModels" 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 MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // invoke the operation and iterate over the result - await foreach (EndpointModelProperties item in machineLearningWorkspaceConnection.GetModelsConnectionsAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine($"Succeeded"); - } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceResource.cs index f6ec98c17e7f0..18fffa45e98c2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MachineLearningWorkspaceResource.cs @@ -16,13 +16,13 @@ namespace Azure.ResourceManager.MachineLearning.Samples { public partial class Sample_MachineLearningWorkspaceResource { - // List Workspace features + // Get Workspace [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetWorkspaceFeatures_ListWorkspaceFeatures() + public async Task Get_GetWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceFeature/list.json - // this example is just showing the usage of "WorkspaceFeatures_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/get.json + // this example is just showing the usage of "Workspaces_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 TokenCredential cred = new DefaultAzureCredential(); @@ -31,51 +31,20 @@ public async Task GetWorkspaceFeatures_ListWorkspaceFeatures() // this example assumes you already have this MachineLearningWorkspaceResource created on azure // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "myResourceGroup"; + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "workspace-1234"; string workspaceName = "testworkspace"; ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - // invoke the operation and iterate over the result - await foreach (MachineLearningUserFeature item in machineLearningWorkspace.GetWorkspaceFeaturesAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine($"Succeeded"); - } - - // Get Workspaces by subscription - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetMachineLearningWorkspaces_GetWorkspacesBySubscription() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/listBySubscription.json - // this example is just showing the usage of "Workspaces_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (MachineLearningWorkspaceResource item in subscriptionResource.GetMachineLearningWorkspacesAsync()) - { - // the variable item 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 - MachineLearningWorkspaceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } + // invoke the operation + MachineLearningWorkspaceResource result = await machineLearningWorkspace.GetAsync(); - Console.WriteLine($"Succeeded"); + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + MachineLearningWorkspaceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } // Delete Workspace @@ -83,7 +52,7 @@ public async Task GetMachineLearningWorkspaces_GetWorkspacesBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/delete.json // this example is just showing the usage of "Workspaces_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 @@ -105,43 +74,12 @@ public async Task Delete_DeleteWorkspace() Console.WriteLine($"Succeeded"); } - // Get Workspace - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetWorkspace() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/get.json - // this example is just showing the usage of "Workspaces_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceResource created on azure - // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "workspace-1234"; - string workspaceName = "testworkspace"; - ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); - MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - - // invoke the operation - MachineLearningWorkspaceResource result = await machineLearningWorkspace.GetAsync(); - - // 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 - MachineLearningWorkspaceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - // Update Workspace [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/update.json // this example is just showing the usage of "Workspaces_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 @@ -162,7 +100,7 @@ public async Task Update_UpdateWorkspace() { Description = "new description", FriendlyName = "New friendly name", - PublicNetworkAccessType = MachineLearningPublicNetworkAccessType.Disabled, + PublicNetworkAccessType = PublicNetworkAccess.Disabled, }; ArmOperation lro = await machineLearningWorkspace.UpdateAsync(WaitUntil.Completed, patch); MachineLearningWorkspaceResource result = lro.Value; @@ -179,7 +117,7 @@ public async Task Update_UpdateWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Diagnose_DiagnoseWorkspace() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/diagnose.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/diagnose.json // this example is just showing the usage of "Workspaces_Diagnose" 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 @@ -200,31 +138,31 @@ public async Task Diagnose_DiagnoseWorkspace() { Value = new MachineLearningWorkspaceDiagnoseProperties() { - ApplicationInsights = + Udr = { }, - ContainerRegistry = + Nsg = { }, - DnsResolution = + ResourceLock = { }, - KeyVault = + DnsResolution = { }, - Nsg = + StorageAccount = { }, - Others = + KeyVault = { }, - ResourceLock = + ContainerRegistry = { }, - StorageAccount = + ApplicationInsights = { }, - Udr = + Others = { }, }, @@ -240,7 +178,7 @@ public async Task Diagnose_DiagnoseWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKeys_ListWorkspaceKeys() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/listKeys.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/listKeys.json // this example is just showing the usage of "Workspaces_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -262,40 +200,13 @@ public async Task GetKeys_ListWorkspaceKeys() Console.WriteLine($"Succeeded: {result}"); } - // List Workspace Keys - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetNotebookAccessToken_ListWorkspaceKeys() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/listNotebookAccessToken.json - // this example is just showing the usage of "Workspaces_ListNotebookAccessToken" 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 MachineLearningWorkspaceResource created on azure - // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "workspace-1234"; - string workspaceName = "testworkspace"; - ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); - MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - - // invoke the operation - MachineLearningWorkspaceNotebookAccessTokenResult result = await machineLearningWorkspace.GetNotebookAccessTokenAsync(); - - Console.WriteLine($"Succeeded: {result}"); - } - - // List Workspace Keys + // Resync Workspace Keys [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetNotebookKeys_ListWorkspaceKeys() + public async Task ResyncKeys_ResyncWorkspaceKeys() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Notebook/listKeys.json - // this example is just showing the usage of "Workspaces_ListNotebookKeys" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/resyncKeys.json + // this example is just showing the usage of "Workspaces_ResyncKeys" 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(); @@ -311,45 +222,50 @@ public async Task GetNotebookKeys_ListWorkspaceKeys() MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); // invoke the operation - MachineLearningWorkspaceGetNotebookKeysResult result = await machineLearningWorkspace.GetNotebookKeysAsync(); + await machineLearningWorkspace.ResyncKeysAsync(WaitUntil.Completed); - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine($"Succeeded"); } - // List Workspace Keys + // Get Workspaces by subscription [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetStorageAccountKeys_ListWorkspaceKeys() + public async Task GetMachineLearningWorkspaces_GetWorkspacesBySubscription() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/listStorageAccountKeys.json - // this example is just showing the usage of "Workspaces_ListStorageAccountKeys" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/listBySubscription.json + // this example is just showing the usage of "Workspaces_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 TokenCredential cred = new DefaultAzureCredential(); // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this MachineLearningWorkspaceResource created on azure - // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"; - string resourceGroupName = "testrg123"; - string workspaceName = "workspaces123"; - ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); - MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation - MachineLearningWorkspaceGetStorageAccountKeysResult result = await machineLearningWorkspace.GetStorageAccountKeysAsync(); + // invoke the operation and iterate over the result + await foreach (MachineLearningWorkspaceResource item in subscriptionResource.GetMachineLearningWorkspacesAsync(string.Empty, default)) + { + // the variable item 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 + MachineLearningWorkspaceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine($"Succeeded"); } - // ListOutboundNetworkDependenciesEndpoints + // List Workspace Keys [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetOutboundNetworkDependenciesEndpoints_ListOutboundNetworkDependenciesEndpoints() + public async Task GetNotebookAccessToken_ListWorkspaceKeys() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/ExternalFQDN/get.json - // this example is just showing the usage of "Workspaces_ListOutboundNetworkDependenciesEndpoints" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/listNotebookAccessToken.json + // this example is just showing the usage of "Workspaces_ListNotebookAccessToken" 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(); @@ -364,13 +280,10 @@ public async Task GetOutboundNetworkDependenciesEndpoints_ListOutboundNetworkDep ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - // invoke the operation and iterate over the result - await foreach (MachineLearningFqdnEndpoints item in machineLearningWorkspace.GetOutboundNetworkDependenciesEndpointsAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + MachineLearningWorkspaceNotebookAccessTokenResult result = await machineLearningWorkspace.GetNotebookAccessTokenAsync(); - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Prepare Notebook @@ -378,7 +291,7 @@ public async Task GetOutboundNetworkDependenciesEndpoints_ListOutboundNetworkDep [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PrepareNotebook_PrepareNotebook() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Notebook/prepare.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Notebook/prepare.json // this example is just showing the usage of "Workspaces_PrepareNotebook" 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 @@ -401,13 +314,13 @@ public async Task PrepareNotebook_PrepareNotebook() Console.WriteLine($"Succeeded: {result}"); } - // Resync Workspace Keys + // List Workspace Keys [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task ResyncKeys_ResyncWorkspaceKeys() + public async Task GetStorageAccountKeys_ListWorkspaceKeys() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/resyncKeys.json - // this example is just showing the usage of "Workspaces_ResyncKeys" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/listStorageAccountKeys.json + // this example is just showing the usage of "Workspaces_ListStorageAccountKeys" 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(); @@ -423,18 +336,18 @@ public async Task ResyncKeys_ResyncWorkspaceKeys() MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); // invoke the operation - await machineLearningWorkspace.ResyncKeysAsync(WaitUntil.Completed); + MachineLearningWorkspaceGetStorageAccountKeysResult result = await machineLearningWorkspace.GetStorageAccountKeysAsync(); - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } - // Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy + // List Workspace Keys [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetModelsConnections_GetModelsUnderTheAzureMLWorkspaceForAllAzureOpenAIConnectionsThatTheUserCanDeploy() + public async Task GetNotebookKeys_ListWorkspaceKeys() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/listConnectionModels.json - // this example is just showing the usage of "Connection_ListModels" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Notebook/listKeys.json + // this example is just showing the usage of "Workspaces_ListNotebookKeys" 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(); @@ -443,28 +356,25 @@ public async Task GetModelsConnections_GetModelsUnderTheAzureMLWorkspaceForAllAz // this example assumes you already have this MachineLearningWorkspaceResource created on azure // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; + string subscriptionId = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"; + string resourceGroupName = "testrg123"; + string workspaceName = "workspaces123"; ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); - // invoke the operation and iterate over the result - await foreach (EndpointModelProperties item in machineLearningWorkspace.GetModelsConnectionsAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + MachineLearningWorkspaceGetNotebookKeysResult result = await machineLearningWorkspace.GetNotebookKeysAsync(); - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } - // Get Endpoint Deployments In Workspace + // ListOutboundNetworkDependenciesEndpoints [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetInWorkspaceEndpointDeployments_GetEndpointDeploymentsInWorkspace() + public async Task GetOutboundNetworkDependenciesEndpoints_ListOutboundNetworkDependenciesEndpoints() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/Deployment/getInWorkspace.json - // this example is just showing the usage of "EndpointDeployment_GetInWorkspace" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ExternalFQDN/get.json + // this example is just showing the usage of "Workspaces_ListOutboundNetworkDependenciesEndpoints" 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(); @@ -474,19 +384,15 @@ public async Task GetInWorkspaceEndpointDeployments_GetEndpointDeploymentsInWork // this example assumes you already have this MachineLearningWorkspaceResource created on azure // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; + string resourceGroupName = "workspace-1234"; string workspaceName = "testworkspace"; ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); // invoke the operation and iterate over the result - await foreach (WorkspaceEndpointDeploymentResource item in machineLearningWorkspace.GetInWorkspaceEndpointDeploymentsAsync()) + await foreach (MachineLearningFqdnEndpoints item in machineLearningWorkspace.GetOutboundNetworkDependenciesEndpointsAsync()) { - // the variable item 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 - EndpointDeploymentResourcePropertiesBasicResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded: {item}"); } Console.WriteLine($"Succeeded"); @@ -497,7 +403,7 @@ public async Task GetInWorkspaceEndpointDeployments_GetEndpointDeploymentsInWork [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResources_WorkspaceListPrivateLinkResources() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/PrivateLinkResource/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/PrivateLinkResource/list.json // this example is just showing the usage of "PrivateLinkResources_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 @@ -527,7 +433,7 @@ public async Task GetPrivateLinkResources_WorkspaceListPrivateLinkResources() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ProvisionManagedNetworkManagedNetworkProvision_ProvisionManagedNetwork() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/ManagedNetwork/provision.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/ManagedNetwork/provision.json // this example is just showing the usage of "ManagedNetworkProvisions_ProvisionManagedNetwork" 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 @@ -553,5 +459,35 @@ public async Task ProvisionManagedNetworkManagedNetworkProvision_ProvisionManage Console.WriteLine($"Succeeded: {result}"); } + + // List Workspace features + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetWorkspaceFeatures_ListWorkspaceFeatures() + { + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/WorkspaceFeature/list.json + // this example is just showing the usage of "WorkspaceFeatures_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); + + // this example assumes you already have this MachineLearningWorkspaceResource created on azure + // for more information of creating MachineLearningWorkspaceResource, please refer to the document of MachineLearningWorkspaceResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "myResourceGroup"; + string workspaceName = "testworkspace"; + ResourceIdentifier machineLearningWorkspaceResourceId = MachineLearningWorkspaceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName); + MachineLearningWorkspaceResource machineLearningWorkspace = client.GetMachineLearningWorkspaceResource(machineLearningWorkspaceResourceId); + + // invoke the operation and iterate over the result + await foreach (MachineLearningUserFeature item in machineLearningWorkspace.GetWorkspaceFeaturesAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine($"Succeeded"); + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MarketplaceSubscriptionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MarketplaceSubscriptionCollection.cs index 617b53afb3d53..7b5fe6f7e9e21 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MarketplaceSubscriptionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MarketplaceSubscriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_MarketplaceSubscriptionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceMarketplaceSubscription() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/MarketplaceSubscription/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/MarketplaceSubscription/list.json // this example is just showing the usage of "MarketplaceSubscriptions_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 @@ -57,7 +57,7 @@ public async Task GetAll_ListWorkspaceMarketplaceSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceMarketplaceSubscription() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/MarketplaceSubscription/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/MarketplaceSubscription/get.json // this example is just showing the usage of "MarketplaceSubscriptions_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 @@ -92,7 +92,7 @@ public async Task Get_GetWorkspaceMarketplaceSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceMarketplaceSubscription() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/MarketplaceSubscription/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/MarketplaceSubscription/get.json // this example is just showing the usage of "MarketplaceSubscriptions_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 @@ -123,7 +123,7 @@ public async Task Exists_GetWorkspaceMarketplaceSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceMarketplaceSubscription() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/MarketplaceSubscription/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/MarketplaceSubscription/get.json // this example is just showing the usage of "MarketplaceSubscriptions_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 GetIfExists_GetWorkspaceMarketplaceSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceMarketplaceSubscription() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/MarketplaceSubscription/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/MarketplaceSubscription/createOrUpdate.json // this example is just showing the usage of "MarketplaceSubscriptions_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MarketplaceSubscriptionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MarketplaceSubscriptionResource.cs index 1ffbcee59581f..26faccdd58f7c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MarketplaceSubscriptionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_MarketplaceSubscriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_MarketplaceSubscriptionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceMarketplaceSubscription() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/MarketplaceSubscription/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/MarketplaceSubscription/delete.json // this example is just showing the usage of "MarketplaceSubscriptions_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 @@ -48,7 +48,7 @@ public async Task Delete_DeleteWorkspaceMarketplaceSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceMarketplaceSubscription() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/MarketplaceSubscription/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/MarketplaceSubscription/get.json // this example is just showing the usage of "MarketplaceSubscriptions_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 @@ -80,7 +80,7 @@ public async Task Get_GetWorkspaceMarketplaceSubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateOrUpdateWorkspaceMarketplaceSubscription() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/MarketplaceSubscription/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/MarketplaceSubscription/createOrUpdate.json // this example is just showing the usage of "MarketplaceSubscriptions_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/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_RaiBlocklistItemPropertiesBasicResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_RaiBlocklistItemPropertiesBasicResource.cs deleted file mode 100644 index 6ef2b6e228f28..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_RaiBlocklistItemPropertiesBasicResource.cs +++ /dev/null @@ -1,122 +0,0 @@ -// 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.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_RaiBlocklistItemPropertiesBasicResource - { - // Delete RaiBlocklist Item - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteRaiBlocklistItem() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklistItem/delete.json - // this example is just showing the usage of "ConnectionRaiBlocklistItem_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RaiBlocklistItemPropertiesBasicResource created on azure - // for more information of creating RaiBlocklistItemPropertiesBasicResource, please refer to the document of RaiBlocklistItemPropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiBlocklistName = "raiBlocklistName"; - string raiBlocklistItemName = "raiBlocklistItemName"; - ResourceIdentifier raiBlocklistItemPropertiesBasicResourceId = RaiBlocklistItemPropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName); - RaiBlocklistItemPropertiesBasicResource raiBlocklistItemPropertiesBasicResource = client.GetRaiBlocklistItemPropertiesBasicResource(raiBlocklistItemPropertiesBasicResourceId); - - // invoke the operation - await raiBlocklistItemPropertiesBasicResource.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // Get Rai RaiBlocklist Item - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetRaiRaiBlocklistItem() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklistItem/get.json - // this example is just showing the usage of "ConnectionRaiBlocklistItem_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RaiBlocklistItemPropertiesBasicResource created on azure - // for more information of creating RaiBlocklistItemPropertiesBasicResource, please refer to the document of RaiBlocklistItemPropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiBlocklistName = "raiBlocklistName"; - string raiBlocklistItemName = "raiBlocklistItemName"; - ResourceIdentifier raiBlocklistItemPropertiesBasicResourceId = RaiBlocklistItemPropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName); - RaiBlocklistItemPropertiesBasicResource raiBlocklistItemPropertiesBasicResource = client.GetRaiBlocklistItemPropertiesBasicResource(raiBlocklistItemPropertiesBasicResourceId); - - // invoke the operation - RaiBlocklistItemPropertiesBasicResource result = await raiBlocklistItemPropertiesBasicResource.GetAsync(); - - // 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 - RaiBlocklistItemPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create RaiBlocklist Item - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateRaiBlocklistItem() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklistItem/create.json - // this example is just showing the usage of "ConnectionRaiBlocklistItem_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RaiBlocklistItemPropertiesBasicResource created on azure - // for more information of creating RaiBlocklistItemPropertiesBasicResource, please refer to the document of RaiBlocklistItemPropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiBlocklistName = "raiBlocklistName"; - string raiBlocklistItemName = "raiBlocklistItemName"; - ResourceIdentifier raiBlocklistItemPropertiesBasicResourceId = RaiBlocklistItemPropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName); - RaiBlocklistItemPropertiesBasicResource raiBlocklistItemPropertiesBasicResource = client.GetRaiBlocklistItemPropertiesBasicResource(raiBlocklistItemPropertiesBasicResourceId); - - // invoke the operation - RaiBlocklistItemPropertiesBasicResourceData data = new RaiBlocklistItemPropertiesBasicResourceData(new RaiBlocklistItemProperties() - { - IsRegex = false, - Pattern = "Pattern To Block", - }); - ArmOperation lro = await raiBlocklistItemPropertiesBasicResource.UpdateAsync(WaitUntil.Completed, data); - RaiBlocklistItemPropertiesBasicResource 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 - RaiBlocklistItemPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_RaiBlocklistItemPropertiesBasicResourceCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_RaiBlocklistItemPropertiesBasicResourceCollection.cs deleted file mode 100644 index 09ebde51ea62f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_RaiBlocklistItemPropertiesBasicResourceCollection.cs +++ /dev/null @@ -1,215 +0,0 @@ -// 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.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_RaiBlocklistItemPropertiesBasicResourceCollection - { - // Get Rai RaiBlocklist Item - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetRaiRaiBlocklistItem() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklistItem/get.json - // this example is just showing the usage of "ConnectionRaiBlocklistItem_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RaiBlocklistPropertiesBasicResource created on azure - // for more information of creating RaiBlocklistPropertiesBasicResource, please refer to the document of RaiBlocklistPropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiBlocklistName = "raiBlocklistName"; - ResourceIdentifier raiBlocklistPropertiesBasicResourceId = RaiBlocklistPropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - RaiBlocklistPropertiesBasicResource raiBlocklistPropertiesBasicResource = client.GetRaiBlocklistPropertiesBasicResource(raiBlocklistPropertiesBasicResourceId); - - // get the collection of this RaiBlocklistItemPropertiesBasicResource - RaiBlocklistItemPropertiesBasicResourceCollection collection = raiBlocklistPropertiesBasicResource.GetRaiBlocklistItemPropertiesBasicResources(); - - // invoke the operation - string raiBlocklistItemName = "raiBlocklistItemName"; - RaiBlocklistItemPropertiesBasicResource result = await collection.GetAsync(raiBlocklistItemName); - - // 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 - RaiBlocklistItemPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get Rai RaiBlocklist Item - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetRaiRaiBlocklistItem() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklistItem/get.json - // this example is just showing the usage of "ConnectionRaiBlocklistItem_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RaiBlocklistPropertiesBasicResource created on azure - // for more information of creating RaiBlocklistPropertiesBasicResource, please refer to the document of RaiBlocklistPropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiBlocklistName = "raiBlocklistName"; - ResourceIdentifier raiBlocklistPropertiesBasicResourceId = RaiBlocklistPropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - RaiBlocklistPropertiesBasicResource raiBlocklistPropertiesBasicResource = client.GetRaiBlocklistPropertiesBasicResource(raiBlocklistPropertiesBasicResourceId); - - // get the collection of this RaiBlocklistItemPropertiesBasicResource - RaiBlocklistItemPropertiesBasicResourceCollection collection = raiBlocklistPropertiesBasicResource.GetRaiBlocklistItemPropertiesBasicResources(); - - // invoke the operation - string raiBlocklistItemName = "raiBlocklistItemName"; - bool result = await collection.ExistsAsync(raiBlocklistItemName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get Rai RaiBlocklist Item - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetRaiRaiBlocklistItem() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklistItem/get.json - // this example is just showing the usage of "ConnectionRaiBlocklistItem_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RaiBlocklistPropertiesBasicResource created on azure - // for more information of creating RaiBlocklistPropertiesBasicResource, please refer to the document of RaiBlocklistPropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiBlocklistName = "raiBlocklistName"; - ResourceIdentifier raiBlocklistPropertiesBasicResourceId = RaiBlocklistPropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - RaiBlocklistPropertiesBasicResource raiBlocklistPropertiesBasicResource = client.GetRaiBlocklistPropertiesBasicResource(raiBlocklistPropertiesBasicResourceId); - - // get the collection of this RaiBlocklistItemPropertiesBasicResource - RaiBlocklistItemPropertiesBasicResourceCollection collection = raiBlocklistPropertiesBasicResource.GetRaiBlocklistItemPropertiesBasicResources(); - - // invoke the operation - string raiBlocklistItemName = "raiBlocklistItemName"; - NullableResponse response = await collection.GetIfExistsAsync(raiBlocklistItemName); - RaiBlocklistItemPropertiesBasicResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // 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 - RaiBlocklistItemPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // Create RaiBlocklist Item - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateRaiBlocklistItem() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklistItem/create.json - // this example is just showing the usage of "ConnectionRaiBlocklistItem_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RaiBlocklistPropertiesBasicResource created on azure - // for more information of creating RaiBlocklistPropertiesBasicResource, please refer to the document of RaiBlocklistPropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiBlocklistName = "raiBlocklistName"; - ResourceIdentifier raiBlocklistPropertiesBasicResourceId = RaiBlocklistPropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - RaiBlocklistPropertiesBasicResource raiBlocklistPropertiesBasicResource = client.GetRaiBlocklistPropertiesBasicResource(raiBlocklistPropertiesBasicResourceId); - - // get the collection of this RaiBlocklistItemPropertiesBasicResource - RaiBlocklistItemPropertiesBasicResourceCollection collection = raiBlocklistPropertiesBasicResource.GetRaiBlocklistItemPropertiesBasicResources(); - - // invoke the operation - string raiBlocklistItemName = "raiBlocklistItemName"; - RaiBlocklistItemPropertiesBasicResourceData data = new RaiBlocklistItemPropertiesBasicResourceData(new RaiBlocklistItemProperties() - { - IsRegex = false, - Pattern = "Pattern To Block", - }); - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, raiBlocklistItemName, data); - RaiBlocklistItemPropertiesBasicResource 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 - RaiBlocklistItemPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // List RaiBlocklist Items - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListRaiBlocklistItems() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklistItem/list.json - // this example is just showing the usage of "ConnectionRaiBlocklistItems_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); - - // this example assumes you already have this RaiBlocklistPropertiesBasicResource created on azure - // for more information of creating RaiBlocklistPropertiesBasicResource, please refer to the document of RaiBlocklistPropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiBlocklistName = "raiBlocklistName"; - ResourceIdentifier raiBlocklistPropertiesBasicResourceId = RaiBlocklistPropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - RaiBlocklistPropertiesBasicResource raiBlocklistPropertiesBasicResource = client.GetRaiBlocklistPropertiesBasicResource(raiBlocklistPropertiesBasicResourceId); - - // get the collection of this RaiBlocklistItemPropertiesBasicResource - RaiBlocklistItemPropertiesBasicResourceCollection collection = raiBlocklistPropertiesBasicResource.GetRaiBlocklistItemPropertiesBasicResources(); - - // invoke the operation and iterate over the result - await foreach (RaiBlocklistItemPropertiesBasicResource item in collection.GetAllAsync()) - { - // the variable item 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 - RaiBlocklistItemPropertiesBasicResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_RaiBlocklistPropertiesBasicResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_RaiBlocklistPropertiesBasicResource.cs deleted file mode 100644 index aacc0ca4270fd..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_RaiBlocklistPropertiesBasicResource.cs +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_RaiBlocklistPropertiesBasicResource - { - // Delete Rai Blocklist - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteRaiBlocklist() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklist/delete.json - // this example is just showing the usage of "ConnectionRaiBlocklist_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RaiBlocklistPropertiesBasicResource created on azure - // for more information of creating RaiBlocklistPropertiesBasicResource, please refer to the document of RaiBlocklistPropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiBlocklistName = "raiBlocklistName"; - ResourceIdentifier raiBlocklistPropertiesBasicResourceId = RaiBlocklistPropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - RaiBlocklistPropertiesBasicResource raiBlocklistPropertiesBasicResource = client.GetRaiBlocklistPropertiesBasicResource(raiBlocklistPropertiesBasicResourceId); - - // invoke the operation - await raiBlocklistPropertiesBasicResource.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // Get Rai Blocklist - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetRaiBlocklist() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklist/get.json - // this example is just showing the usage of "ConnectionRaiBlocklist_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RaiBlocklistPropertiesBasicResource created on azure - // for more information of creating RaiBlocklistPropertiesBasicResource, please refer to the document of RaiBlocklistPropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiBlocklistName = "raiBlocklistName"; - ResourceIdentifier raiBlocklistPropertiesBasicResourceId = RaiBlocklistPropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - RaiBlocklistPropertiesBasicResource raiBlocklistPropertiesBasicResource = client.GetRaiBlocklistPropertiesBasicResource(raiBlocklistPropertiesBasicResourceId); - - // invoke the operation - RaiBlocklistPropertiesBasicResource result = await raiBlocklistPropertiesBasicResource.GetAsync(); - - // 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 - RaiBlocklistPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create Rai Blocklist - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateRaiBlocklist() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklist/create.json - // this example is just showing the usage of "ConnectionRaiBlocklist_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this RaiBlocklistPropertiesBasicResource created on azure - // for more information of creating RaiBlocklistPropertiesBasicResource, please refer to the document of RaiBlocklistPropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiBlocklistName = "raiBlocklistName"; - ResourceIdentifier raiBlocklistPropertiesBasicResourceId = RaiBlocklistPropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - RaiBlocklistPropertiesBasicResource raiBlocklistPropertiesBasicResource = client.GetRaiBlocklistPropertiesBasicResource(raiBlocklistPropertiesBasicResourceId); - - // invoke the operation - RaiBlocklistPropertiesBasicResourceData data = new RaiBlocklistPropertiesBasicResourceData(new RaiBlocklistProperties() - { - Description = "Basic blocklist description", - }); - ArmOperation lro = await raiBlocklistPropertiesBasicResource.UpdateAsync(WaitUntil.Completed, data); - RaiBlocklistPropertiesBasicResource 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 - RaiBlocklistPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create Bulk Rai Blocklist Items - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task AddBulkConnectionRaiBlocklistItem_CreateBulkRaiBlocklistItems() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklistItem/addBulk.json - // this example is just showing the usage of "ConnectionRaiBlocklistItem_AddBulk" 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 RaiBlocklistPropertiesBasicResource created on azure - // for more information of creating RaiBlocklistPropertiesBasicResource, please refer to the document of RaiBlocklistPropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiBlocklistName = "raiBlocklistName"; - ResourceIdentifier raiBlocklistPropertiesBasicResourceId = RaiBlocklistPropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - RaiBlocklistPropertiesBasicResource raiBlocklistPropertiesBasicResource = client.GetRaiBlocklistPropertiesBasicResource(raiBlocklistPropertiesBasicResourceId); - - // invoke the operation - IEnumerable content = new RaiBlocklistItemBulkRequest[] - { -new RaiBlocklistItemBulkRequest() -{ -Name = "myblocklistitem1", -Properties = new RaiBlocklistItemProperties() -{ -IsRegex = true, -Pattern = "^[a-z0-9_-]{2,16}$", -}, -},new RaiBlocklistItemBulkRequest() -{ -Name = "myblocklistitem2", -Properties = new RaiBlocklistItemProperties() -{ -IsRegex = false, -Pattern = "blockwords", -}, -} - }; - ArmOperation> lro = await raiBlocklistPropertiesBasicResource.AddBulkConnectionRaiBlocklistItemAsync(WaitUntil.Completed, content); - IList result = lro.Value; - - Console.WriteLine($"Succeeded: {result}"); - } - - // Delete Bulk Rai Blocklist Items - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task DeleteBulkConnectionRaiBlocklistItem_DeleteBulkRaiBlocklistItems() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklistItem/deleteBulk.json - // this example is just showing the usage of "ConnectionRaiBlocklistItem_DeleteBulk" 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 RaiBlocklistPropertiesBasicResource created on azure - // for more information of creating RaiBlocklistPropertiesBasicResource, please refer to the document of RaiBlocklistPropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiBlocklistName = "raiBlocklistName"; - ResourceIdentifier raiBlocklistPropertiesBasicResourceId = RaiBlocklistPropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - RaiBlocklistPropertiesBasicResource raiBlocklistPropertiesBasicResource = client.GetRaiBlocklistPropertiesBasicResource(raiBlocklistPropertiesBasicResourceId); - - // invoke the operation - BinaryData body = BinaryData.FromObjectAsJson(new object[] { "myblocklistitem1", "myblocklistitem2" }); - await raiBlocklistPropertiesBasicResource.DeleteBulkConnectionRaiBlocklistItemAsync(WaitUntil.Completed, body); - - Console.WriteLine($"Succeeded"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_RaiBlocklistPropertiesBasicResourceCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_RaiBlocklistPropertiesBasicResourceCollection.cs deleted file mode 100644 index 847727a96ff37..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_RaiBlocklistPropertiesBasicResourceCollection.cs +++ /dev/null @@ -1,209 +0,0 @@ -// 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.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_RaiBlocklistPropertiesBasicResourceCollection - { - // List Rai Blocklist - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListRaiBlocklist() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklist/list.json - // this example is just showing the usage of "ConnectionRaiBlocklists_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); - - // this example assumes you already have this MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this RaiBlocklistPropertiesBasicResource - RaiBlocklistPropertiesBasicResourceCollection collection = machineLearningWorkspaceConnection.GetRaiBlocklistPropertiesBasicResources(); - - // invoke the operation and iterate over the result - await foreach (RaiBlocklistPropertiesBasicResource item in collection.GetAllAsync()) - { - // the variable item 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 - RaiBlocklistPropertiesBasicResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // Get Rai Blocklist - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetRaiBlocklist() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklist/get.json - // this example is just showing the usage of "ConnectionRaiBlocklist_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this RaiBlocklistPropertiesBasicResource - RaiBlocklistPropertiesBasicResourceCollection collection = machineLearningWorkspaceConnection.GetRaiBlocklistPropertiesBasicResources(); - - // invoke the operation - string raiBlocklistName = "raiBlocklistName"; - RaiBlocklistPropertiesBasicResource result = await collection.GetAsync(raiBlocklistName); - - // 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 - RaiBlocklistPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get Rai Blocklist - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetRaiBlocklist() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklist/get.json - // this example is just showing the usage of "ConnectionRaiBlocklist_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this RaiBlocklistPropertiesBasicResource - RaiBlocklistPropertiesBasicResourceCollection collection = machineLearningWorkspaceConnection.GetRaiBlocklistPropertiesBasicResources(); - - // invoke the operation - string raiBlocklistName = "raiBlocklistName"; - bool result = await collection.ExistsAsync(raiBlocklistName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get Rai Blocklist - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetRaiBlocklist() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklist/get.json - // this example is just showing the usage of "ConnectionRaiBlocklist_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this RaiBlocklistPropertiesBasicResource - RaiBlocklistPropertiesBasicResourceCollection collection = machineLearningWorkspaceConnection.GetRaiBlocklistPropertiesBasicResources(); - - // invoke the operation - string raiBlocklistName = "raiBlocklistName"; - NullableResponse response = await collection.GetIfExistsAsync(raiBlocklistName); - RaiBlocklistPropertiesBasicResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // 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 - RaiBlocklistPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // Create Rai Blocklist - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateRaiBlocklist() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiBlocklist/create.json - // this example is just showing the usage of "ConnectionRaiBlocklist_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this RaiBlocklistPropertiesBasicResource - RaiBlocklistPropertiesBasicResourceCollection collection = machineLearningWorkspaceConnection.GetRaiBlocklistPropertiesBasicResources(); - - // invoke the operation - string raiBlocklistName = "raiBlocklistName"; - RaiBlocklistPropertiesBasicResourceData data = new RaiBlocklistPropertiesBasicResourceData(new RaiBlocklistProperties() - { - Description = "Basic blocklist description", - }); - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, raiBlocklistName, data); - RaiBlocklistPropertiesBasicResource 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 - RaiBlocklistPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_ServerlessEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_ServerlessEndpointCollection.cs index 50687d47e00fd..6017fcba579ce 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_ServerlessEndpointCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_ServerlessEndpointCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ServerlessEndpointCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWorkspaceServerlessEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ServerlessEndpoint/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/list.json // this example is just showing the usage of "ServerlessEndpoints_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 @@ -58,7 +58,7 @@ public async Task GetAll_ListWorkspaceServerlessEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceServerlessEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ServerlessEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/get.json // this example is just showing the usage of "ServerlessEndpoints_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 @@ -93,7 +93,7 @@ public async Task Get_GetWorkspaceServerlessEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetWorkspaceServerlessEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ServerlessEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/get.json // this example is just showing the usage of "ServerlessEndpoints_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 @@ -124,7 +124,7 @@ public async Task Exists_GetWorkspaceServerlessEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetWorkspaceServerlessEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ServerlessEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/get.json // this example is just showing the usage of "ServerlessEndpoints_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 @@ -167,7 +167,7 @@ public async Task GetIfExists_GetWorkspaceServerlessEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateOrUpdateWorkspaceServerlessEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ServerlessEndpoint/createOrUpdate.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/createOrUpdate.json // this example is just showing the usage of "ServerlessEndpoints_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 @@ -190,10 +190,11 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceServerlessEndpoint() string name = "string"; ServerlessEndpointData data = new ServerlessEndpointData(new AzureLocation("string"), new ServerlessEndpointProperties(ServerlessInferenceEndpointAuthMode.Key) { - ContentSafetyStatus = ContentSafetyStatus.Enabled, ModelId = "string", + ContentSafetyStatus = ContentSafetyStatus.Enabled, }) { + Kind = "string", Identity = new ManagedServiceIdentity("SystemAssigned") { UserAssignedIdentities = @@ -201,7 +202,6 @@ public async Task CreateOrUpdate_CreateOrUpdateWorkspaceServerlessEndpoint() [new ResourceIdentifier("string")] = new UserAssignedIdentity(), }, }, - Kind = "string", Sku = new MachineLearningSku("string") { Tier = MachineLearningSkuTier.Standard, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_ServerlessEndpointResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_ServerlessEndpointResource.cs index da4aa896773a2..699e0773ae8bc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_ServerlessEndpointResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_ServerlessEndpointResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ServerlessEndpointResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteWorkspaceServerlessEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ServerlessEndpoint/delete.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/delete.json // this example is just showing the usage of "ServerlessEndpoints_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 @@ -49,7 +49,7 @@ public async Task Delete_DeleteWorkspaceServerlessEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetWorkspaceServerlessEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ServerlessEndpoint/get.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/get.json // this example is just showing the usage of "ServerlessEndpoints_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 @@ -81,7 +81,7 @@ public async Task Get_GetWorkspaceServerlessEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateWorkspaceServerlessEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ServerlessEndpoint/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/update.json // this example is just showing the usage of "ServerlessEndpoints_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 @@ -101,6 +101,14 @@ public async Task Update_UpdateWorkspaceServerlessEndpoint() // invoke the operation ServerlessEndpointPatch patch = new ServerlessEndpointPatch() { + Sku = new MachineLearningSkuPatch() + { + Name = "string", + Tier = MachineLearningSkuTier.Premium, + Size = "string", + Family = "string", + Capacity = 1, + }, Identity = new MachineLearningPartialManagedServiceIdentity() { ManagedServiceIdentityType = "None", @@ -111,14 +119,6 @@ public async Task Update_UpdateWorkspaceServerlessEndpoint() }), }, }, - Sku = new MachineLearningSkuPatch() - { - Capacity = 1, - Family = "string", - Name = "string", - Size = "string", - Tier = MachineLearningSkuTier.Premium, - }, Tags = { }, @@ -138,7 +138,7 @@ public async Task Update_UpdateWorkspaceServerlessEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetKeys_ListKeysWorkspaceServerlessEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ServerlessEndpoint/listKeys.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/listKeys.json // this example is just showing the usage of "ServerlessEndpoints_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetKeys_ListKeysWorkspaceServerlessEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RegenerateKeys_RegenerateKeysWorkspaceServerlessEndpoint() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Workspace/ServerlessEndpoint/regenerateKeys.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Workspace/ServerlessEndpoint/regenerateKeys.json // this example is just showing the usage of "ServerlessEndpoints_RegenerateKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index d6919254119fb..b02c76f343046 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMachineLearningUsages_ListUsages() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Usage/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Usage/list.json // this example is just showing the usage of "Usages_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 @@ -50,7 +50,7 @@ public async Task GetMachineLearningUsages_ListUsages() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMachineLearningVmSizes_ListVMSizes() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/VirtualMachineSize/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/VirtualMachineSize/list.json // this example is just showing the usage of "VirtualMachineSizes_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 @@ -79,7 +79,7 @@ public async Task GetMachineLearningVmSizes_ListVMSizes() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task UpdateMachineLearningQuotas_UpdateQuotas() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Quota/update.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Quota/update.json // this example is just showing the usage of "Quotas_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 @@ -127,7 +127,7 @@ public async Task UpdateMachineLearningQuotas_UpdateQuotas() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetMachineLearningQuotas_ListWorkspaceQuotasByVMFamily() { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Quota/list.json + // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/examples/Quota/list.json // this example is just showing the usage of "Quotas_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 diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceConnectionDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceConnectionDeploymentCollection.cs deleted file mode 100644 index 48708c1f0bdf4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceConnectionDeploymentCollection.cs +++ /dev/null @@ -1,214 +0,0 @@ -// 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.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_WorkspaceConnectionDeploymentCollection - { - // List Azure OpenAI Connection Deployments - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListAzureOpenAIConnectionDeployments() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/listDeployments.json - // this example is just showing the usage of "Connection_ListDeployments" 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 MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this WorkspaceConnectionDeploymentResource - WorkspaceConnectionDeploymentCollection collection = machineLearningWorkspaceConnection.GetWorkspaceConnectionDeployments(); - - // invoke the operation and iterate over the result - await foreach (WorkspaceConnectionDeploymentResource item in collection.GetAllAsync()) - { - // the variable item 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 - EndpointDeploymentResourcePropertiesBasicResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // Get Azure OpenAI Connection Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetAzureOpenAIConnectionDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/getDeployment.json - // this example is just showing the usage of "Connection_GetDeployment" 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 MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this WorkspaceConnectionDeploymentResource - WorkspaceConnectionDeploymentCollection collection = machineLearningWorkspaceConnection.GetWorkspaceConnectionDeployments(); - - // invoke the operation - string deploymentName = "text-davinci-003"; - WorkspaceConnectionDeploymentResource result = await collection.GetAsync(deploymentName); - - // 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 - EndpointDeploymentResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get Azure OpenAI Connection Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetAzureOpenAIConnectionDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/getDeployment.json - // this example is just showing the usage of "Connection_GetDeployment" 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 MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this WorkspaceConnectionDeploymentResource - WorkspaceConnectionDeploymentCollection collection = machineLearningWorkspaceConnection.GetWorkspaceConnectionDeployments(); - - // invoke the operation - string deploymentName = "text-davinci-003"; - bool result = await collection.ExistsAsync(deploymentName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get Azure OpenAI Connection Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetAzureOpenAIConnectionDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/getDeployment.json - // this example is just showing the usage of "Connection_GetDeployment" 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 MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this WorkspaceConnectionDeploymentResource - WorkspaceConnectionDeploymentCollection collection = machineLearningWorkspaceConnection.GetWorkspaceConnectionDeployments(); - - // invoke the operation - string deploymentName = "text-davinci-003"; - NullableResponse response = await collection.GetIfExistsAsync(deploymentName); - WorkspaceConnectionDeploymentResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // 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 - EndpointDeploymentResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // Create Azure OpenAI Connection Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateAzureOpenAIConnectionDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/createDeployment.json - // this example is just showing the usage of "Connection_CreateOrUpdateDeployment" 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 MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this WorkspaceConnectionDeploymentResource - WorkspaceConnectionDeploymentCollection collection = machineLearningWorkspaceConnection.GetWorkspaceConnectionDeployments(); - - // invoke the operation - string deploymentName = "text-davinci-003"; - EndpointDeploymentResourcePropertiesBasicResourceData data = new EndpointDeploymentResourcePropertiesBasicResourceData(new OpenAIEndpointDeploymentResourceProperties(new EndpointDeploymentModel() - { - Format = "OpenAI", - Name = "text-davinci-003", - Version = "1", - }) - { - VersionUpgradeOption = DeploymentModelVersionUpgradeOption.OnceNewDefaultVersionAvailable, - }); - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, deploymentName, data); - WorkspaceConnectionDeploymentResource 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 - EndpointDeploymentResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceConnectionDeploymentResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceConnectionDeploymentResource.cs deleted file mode 100644 index 65151803829b0..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceConnectionDeploymentResource.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_WorkspaceConnectionDeploymentResource - { - // Delete Azure OpenAI Connection Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteAzureOpenAIConnectionDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/deleteDeployment.json - // this example is just showing the usage of "Connection_DeleteDeployment" 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 WorkspaceConnectionDeploymentResource created on azure - // for more information of creating WorkspaceConnectionDeploymentResource, please refer to the document of WorkspaceConnectionDeploymentResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string deploymentName = "testDeploymentName"; - ResourceIdentifier workspaceConnectionDeploymentResourceId = WorkspaceConnectionDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, deploymentName); - WorkspaceConnectionDeploymentResource workspaceConnectionDeployment = client.GetWorkspaceConnectionDeploymentResource(workspaceConnectionDeploymentResourceId); - - // invoke the operation - await workspaceConnectionDeployment.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // Get Azure OpenAI Connection Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetAzureOpenAIConnectionDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/getDeployment.json - // this example is just showing the usage of "Connection_GetDeployment" 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 WorkspaceConnectionDeploymentResource created on azure - // for more information of creating WorkspaceConnectionDeploymentResource, please refer to the document of WorkspaceConnectionDeploymentResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string connectionName = "testConnection"; - string deploymentName = "text-davinci-003"; - ResourceIdentifier workspaceConnectionDeploymentResourceId = WorkspaceConnectionDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, deploymentName); - WorkspaceConnectionDeploymentResource workspaceConnectionDeployment = client.GetWorkspaceConnectionDeploymentResource(workspaceConnectionDeploymentResourceId); - - // invoke the operation - WorkspaceConnectionDeploymentResource result = await workspaceConnectionDeployment.GetAsync(); - - // 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 - EndpointDeploymentResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create Azure OpenAI Connection Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateAzureOpenAIConnectionDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/createDeployment.json - // this example is just showing the usage of "Connection_CreateOrUpdateDeployment" 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 WorkspaceConnectionDeploymentResource created on azure - // for more information of creating WorkspaceConnectionDeploymentResource, please refer to the document of WorkspaceConnectionDeploymentResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string connectionName = "testConnection"; - string deploymentName = "text-davinci-003"; - ResourceIdentifier workspaceConnectionDeploymentResourceId = WorkspaceConnectionDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, deploymentName); - WorkspaceConnectionDeploymentResource workspaceConnectionDeployment = client.GetWorkspaceConnectionDeploymentResource(workspaceConnectionDeploymentResourceId); - - // invoke the operation - EndpointDeploymentResourcePropertiesBasicResourceData data = new EndpointDeploymentResourcePropertiesBasicResourceData(new OpenAIEndpointDeploymentResourceProperties(new EndpointDeploymentModel() - { - Format = "OpenAI", - Name = "text-davinci-003", - Version = "1", - }) - { - VersionUpgradeOption = DeploymentModelVersionUpgradeOption.OnceNewDefaultVersionAvailable, - }); - ArmOperation lro = await workspaceConnectionDeployment.UpdateAsync(WaitUntil.Completed, data); - WorkspaceConnectionDeploymentResource 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 - EndpointDeploymentResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceConnectionRaiPolicyCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceConnectionRaiPolicyCollection.cs deleted file mode 100644 index 4236bdc5d3e92..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceConnectionRaiPolicyCollection.cs +++ /dev/null @@ -1,238 +0,0 @@ -// 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.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_WorkspaceConnectionRaiPolicyCollection - { - // List Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiPolicy/list.json - // this example is just showing the usage of "ConnectionRaiPolicies_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); - - // this example assumes you already have this MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this WorkspaceConnectionRaiPolicyResource - WorkspaceConnectionRaiPolicyCollection collection = machineLearningWorkspaceConnection.GetWorkspaceConnectionRaiPolicies(); - - // invoke the operation and iterate over the result - await foreach (WorkspaceConnectionRaiPolicyResource item in collection.GetAllAsync()) - { - // the variable item 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 - RaiPolicyPropertiesBasicResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // Get Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiPolicy/get.json - // this example is just showing the usage of "ConnectionRaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this WorkspaceConnectionRaiPolicyResource - WorkspaceConnectionRaiPolicyCollection collection = machineLearningWorkspaceConnection.GetWorkspaceConnectionRaiPolicies(); - - // invoke the operation - string raiPolicyName = "raiPolicyName"; - WorkspaceConnectionRaiPolicyResource result = await collection.GetAsync(raiPolicyName); - - // 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 - RaiPolicyPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiPolicy/get.json - // this example is just showing the usage of "ConnectionRaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this WorkspaceConnectionRaiPolicyResource - WorkspaceConnectionRaiPolicyCollection collection = machineLearningWorkspaceConnection.GetWorkspaceConnectionRaiPolicies(); - - // invoke the operation - string raiPolicyName = "raiPolicyName"; - bool result = await collection.ExistsAsync(raiPolicyName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiPolicy/get.json - // this example is just showing the usage of "ConnectionRaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this WorkspaceConnectionRaiPolicyResource - WorkspaceConnectionRaiPolicyCollection collection = machineLearningWorkspaceConnection.GetWorkspaceConnectionRaiPolicies(); - - // invoke the operation - string raiPolicyName = "raiPolicyName"; - NullableResponse response = await collection.GetIfExistsAsync(raiPolicyName); - WorkspaceConnectionRaiPolicyResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // 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 - RaiPolicyPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // Create Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiPolicy/create.json - // this example is just showing the usage of "ConnectionRaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MachineLearningWorkspaceConnectionResource created on azure - // for more information of creating MachineLearningWorkspaceConnectionResource, please refer to the document of MachineLearningWorkspaceConnectionResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - ResourceIdentifier machineLearningWorkspaceConnectionResourceId = MachineLearningWorkspaceConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName); - MachineLearningWorkspaceConnectionResource machineLearningWorkspaceConnection = client.GetMachineLearningWorkspaceConnectionResource(machineLearningWorkspaceConnectionResourceId); - - // get the collection of this WorkspaceConnectionRaiPolicyResource - WorkspaceConnectionRaiPolicyCollection collection = machineLearningWorkspaceConnection.GetWorkspaceConnectionRaiPolicies(); - - // invoke the operation - string raiPolicyName = "raiPolicyName"; - RaiPolicyPropertiesBasicResourceData data = new RaiPolicyPropertiesBasicResourceData(new RaiPolicyProperties() - { - BasePolicyName = "112", - CompletionBlocklists = -{ -new RaiBlocklistConfig() -{ -Blocking = false, -BlocklistName = "blocklistName", -} -}, - ContentFilters = -{ -new RaiPolicyContentFilter() -{ -AllowedContentLevel = AllowedContentLevel.Low, -Blocking = false, -Enabled = false, -Name = "policyName", -Source = RaiPolicyContentSource.Prompt, -} -}, - Mode = RaiPolicyMode.Blocking, - PromptBlocklists = -{ -new RaiBlocklistConfig() -{ -Blocking = false, -BlocklistName = "blocklistName", -} -}, - PolicyType = RaiPolicyType.SystemManaged, - }); - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, raiPolicyName, data); - WorkspaceConnectionRaiPolicyResource 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 - RaiPolicyPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceConnectionRaiPolicyResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceConnectionRaiPolicyResource.cs deleted file mode 100644 index 3c41b9d3979ac..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceConnectionRaiPolicyResource.cs +++ /dev/null @@ -1,147 +0,0 @@ -// 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.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_WorkspaceConnectionRaiPolicyResource - { - // Delete Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiPolicy/delete.json - // this example is just showing the usage of "ConnectionRaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this WorkspaceConnectionRaiPolicyResource created on azure - // for more information of creating WorkspaceConnectionRaiPolicyResource, please refer to the document of WorkspaceConnectionRaiPolicyResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiPolicyName = "raiPolicyName"; - ResourceIdentifier workspaceConnectionRaiPolicyResourceId = WorkspaceConnectionRaiPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiPolicyName); - WorkspaceConnectionRaiPolicyResource workspaceConnectionRaiPolicy = client.GetWorkspaceConnectionRaiPolicyResource(workspaceConnectionRaiPolicyResourceId); - - // invoke the operation - await workspaceConnectionRaiPolicy.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // Get Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiPolicy/get.json - // this example is just showing the usage of "ConnectionRaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this WorkspaceConnectionRaiPolicyResource created on azure - // for more information of creating WorkspaceConnectionRaiPolicyResource, please refer to the document of WorkspaceConnectionRaiPolicyResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiPolicyName = "raiPolicyName"; - ResourceIdentifier workspaceConnectionRaiPolicyResourceId = WorkspaceConnectionRaiPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiPolicyName); - WorkspaceConnectionRaiPolicyResource workspaceConnectionRaiPolicy = client.GetWorkspaceConnectionRaiPolicyResource(workspaceConnectionRaiPolicyResourceId); - - // invoke the operation - WorkspaceConnectionRaiPolicyResource result = await workspaceConnectionRaiPolicy.GetAsync(); - - // 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 - RaiPolicyPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/WorkspaceConnection/RaiPolicy/create.json - // this example is just showing the usage of "ConnectionRaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this WorkspaceConnectionRaiPolicyResource created on azure - // for more information of creating WorkspaceConnectionRaiPolicyResource, please refer to the document of WorkspaceConnectionRaiPolicyResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string connectionName = "testConnection"; - string raiPolicyName = "raiPolicyName"; - ResourceIdentifier workspaceConnectionRaiPolicyResourceId = WorkspaceConnectionRaiPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, connectionName, raiPolicyName); - WorkspaceConnectionRaiPolicyResource workspaceConnectionRaiPolicy = client.GetWorkspaceConnectionRaiPolicyResource(workspaceConnectionRaiPolicyResourceId); - - // invoke the operation - RaiPolicyPropertiesBasicResourceData data = new RaiPolicyPropertiesBasicResourceData(new RaiPolicyProperties() - { - BasePolicyName = "112", - CompletionBlocklists = -{ -new RaiBlocklistConfig() -{ -Blocking = false, -BlocklistName = "blocklistName", -} -}, - ContentFilters = -{ -new RaiPolicyContentFilter() -{ -AllowedContentLevel = AllowedContentLevel.Low, -Blocking = false, -Enabled = false, -Name = "policyName", -Source = RaiPolicyContentSource.Prompt, -} -}, - Mode = RaiPolicyMode.Blocking, - PromptBlocklists = -{ -new RaiBlocklistConfig() -{ -Blocking = false, -BlocklistName = "blocklistName", -} -}, - PolicyType = RaiPolicyType.SystemManaged, - }); - ArmOperation lro = await workspaceConnectionRaiPolicy.UpdateAsync(WaitUntil.Completed, data); - WorkspaceConnectionRaiPolicyResource 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 - RaiPolicyPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceEndpointDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceEndpointDeploymentCollection.cs deleted file mode 100644 index 680856af5281c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceEndpointDeploymentCollection.cs +++ /dev/null @@ -1,214 +0,0 @@ -// 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.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_WorkspaceEndpointDeploymentCollection - { - // Get Endpoint Deployments - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_GetEndpointDeployments() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/Deployment/getDeployments.json - // this example is just showing the usage of "EndpointDeployment_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); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // get the collection of this WorkspaceEndpointDeploymentResource - WorkspaceEndpointDeploymentCollection collection = endpointResourcePropertiesBasicResource.GetWorkspaceEndpointDeployments(); - - // invoke the operation and iterate over the result - await foreach (WorkspaceEndpointDeploymentResource item in collection.GetAllAsync()) - { - // the variable item 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 - EndpointDeploymentResourcePropertiesBasicResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // Get Endpoint Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetEndpointDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/Deployment/get.json - // this example is just showing the usage of "EndpointDeployment_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // get the collection of this WorkspaceEndpointDeploymentResource - WorkspaceEndpointDeploymentCollection collection = endpointResourcePropertiesBasicResource.GetWorkspaceEndpointDeployments(); - - // invoke the operation - string deploymentName = "text-davinci-003"; - WorkspaceEndpointDeploymentResource result = await collection.GetAsync(deploymentName); - - // 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 - EndpointDeploymentResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get Endpoint Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetEndpointDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/Deployment/get.json - // this example is just showing the usage of "EndpointDeployment_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // get the collection of this WorkspaceEndpointDeploymentResource - WorkspaceEndpointDeploymentCollection collection = endpointResourcePropertiesBasicResource.GetWorkspaceEndpointDeployments(); - - // invoke the operation - string deploymentName = "text-davinci-003"; - bool result = await collection.ExistsAsync(deploymentName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get Endpoint Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetEndpointDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/Deployment/get.json - // this example is just showing the usage of "EndpointDeployment_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // get the collection of this WorkspaceEndpointDeploymentResource - WorkspaceEndpointDeploymentCollection collection = endpointResourcePropertiesBasicResource.GetWorkspaceEndpointDeployments(); - - // invoke the operation - string deploymentName = "text-davinci-003"; - NullableResponse response = await collection.GetIfExistsAsync(deploymentName); - WorkspaceEndpointDeploymentResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // 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 - EndpointDeploymentResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // Create Endpoint Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateEndpointDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/Deployment/create.json - // this example is just showing the usage of "EndpointDeployment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // get the collection of this WorkspaceEndpointDeploymentResource - WorkspaceEndpointDeploymentCollection collection = endpointResourcePropertiesBasicResource.GetWorkspaceEndpointDeployments(); - - // invoke the operation - string deploymentName = "text-davinci-003"; - EndpointDeploymentResourcePropertiesBasicResourceData data = new EndpointDeploymentResourcePropertiesBasicResourceData(new OpenAIEndpointDeploymentResourceProperties(new EndpointDeploymentModel() - { - Format = "OpenAI", - Name = "text-davinci-003", - Version = "1", - }) - { - VersionUpgradeOption = DeploymentModelVersionUpgradeOption.OnceNewDefaultVersionAvailable, - }); - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, deploymentName, data); - WorkspaceEndpointDeploymentResource 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 - EndpointDeploymentResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceEndpointDeploymentResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceEndpointDeploymentResource.cs deleted file mode 100644 index c1101097e97ee..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceEndpointDeploymentResource.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_WorkspaceEndpointDeploymentResource - { - // Delete Endpoint Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteEndpointDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/Deployment/delete.json - // this example is just showing the usage of "EndpointDeployment_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this WorkspaceEndpointDeploymentResource created on azure - // for more information of creating WorkspaceEndpointDeploymentResource, please refer to the document of WorkspaceEndpointDeploymentResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - string deploymentName = "testDeploymentName"; - ResourceIdentifier workspaceEndpointDeploymentResourceId = WorkspaceEndpointDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName, deploymentName); - WorkspaceEndpointDeploymentResource workspaceEndpointDeployment = client.GetWorkspaceEndpointDeploymentResource(workspaceEndpointDeploymentResourceId); - - // invoke the operation - await workspaceEndpointDeployment.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // Get Endpoint Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetEndpointDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/Deployment/get.json - // this example is just showing the usage of "EndpointDeployment_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this WorkspaceEndpointDeploymentResource created on azure - // for more information of creating WorkspaceEndpointDeploymentResource, please refer to the document of WorkspaceEndpointDeploymentResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string endpointName = "Azure.OpenAI"; - string deploymentName = "text-davinci-003"; - ResourceIdentifier workspaceEndpointDeploymentResourceId = WorkspaceEndpointDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName, deploymentName); - WorkspaceEndpointDeploymentResource workspaceEndpointDeployment = client.GetWorkspaceEndpointDeploymentResource(workspaceEndpointDeploymentResourceId); - - // invoke the operation - WorkspaceEndpointDeploymentResource result = await workspaceEndpointDeployment.GetAsync(); - - // 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 - EndpointDeploymentResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create Endpoint Deployment - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateEndpointDeployment() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/Deployment/create.json - // this example is just showing the usage of "EndpointDeployment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this WorkspaceEndpointDeploymentResource created on azure - // for more information of creating WorkspaceEndpointDeploymentResource, please refer to the document of WorkspaceEndpointDeploymentResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "resourceGroup-1"; - string workspaceName = "testworkspace"; - string endpointName = "Azure.OpenAI"; - string deploymentName = "text-davinci-003"; - ResourceIdentifier workspaceEndpointDeploymentResourceId = WorkspaceEndpointDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName, deploymentName); - WorkspaceEndpointDeploymentResource workspaceEndpointDeployment = client.GetWorkspaceEndpointDeploymentResource(workspaceEndpointDeploymentResourceId); - - // invoke the operation - EndpointDeploymentResourcePropertiesBasicResourceData data = new EndpointDeploymentResourcePropertiesBasicResourceData(new OpenAIEndpointDeploymentResourceProperties(new EndpointDeploymentModel() - { - Format = "OpenAI", - Name = "text-davinci-003", - Version = "1", - }) - { - VersionUpgradeOption = DeploymentModelVersionUpgradeOption.OnceNewDefaultVersionAvailable, - }); - ArmOperation lro = await workspaceEndpointDeployment.UpdateAsync(WaitUntil.Completed, data); - WorkspaceEndpointDeploymentResource 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 - EndpointDeploymentResourcePropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceEndpointRaiPolicyCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceEndpointRaiPolicyCollection.cs deleted file mode 100644 index 105749e74d20c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceEndpointRaiPolicyCollection.cs +++ /dev/null @@ -1,238 +0,0 @@ -// 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.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_WorkspaceEndpointRaiPolicyCollection - { - // List Rai policies - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_ListRaiPolicies() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/RaiPolicy/list.json - // this example is just showing the usage of "RaiPolicies_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); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // get the collection of this WorkspaceEndpointRaiPolicyResource - WorkspaceEndpointRaiPolicyCollection collection = endpointResourcePropertiesBasicResource.GetWorkspaceEndpointRaiPolicies(); - - // invoke the operation and iterate over the result - await foreach (WorkspaceEndpointRaiPolicyResource item in collection.GetAllAsync()) - { - // the variable item 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 - RaiPolicyPropertiesBasicResourceData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // Get Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/RaiPolicy/get.json - // this example is just showing the usage of "RaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // get the collection of this WorkspaceEndpointRaiPolicyResource - WorkspaceEndpointRaiPolicyCollection collection = endpointResourcePropertiesBasicResource.GetWorkspaceEndpointRaiPolicies(); - - // invoke the operation - string raiPolicyName = "raiPolicyName"; - WorkspaceEndpointRaiPolicyResource result = await collection.GetAsync(raiPolicyName); - - // 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 - RaiPolicyPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Get Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_GetRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/RaiPolicy/get.json - // this example is just showing the usage of "RaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // get the collection of this WorkspaceEndpointRaiPolicyResource - WorkspaceEndpointRaiPolicyCollection collection = endpointResourcePropertiesBasicResource.GetWorkspaceEndpointRaiPolicies(); - - // invoke the operation - string raiPolicyName = "raiPolicyName"; - bool result = await collection.ExistsAsync(raiPolicyName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // Get Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_GetRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/RaiPolicy/get.json - // this example is just showing the usage of "RaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // get the collection of this WorkspaceEndpointRaiPolicyResource - WorkspaceEndpointRaiPolicyCollection collection = endpointResourcePropertiesBasicResource.GetWorkspaceEndpointRaiPolicies(); - - // invoke the operation - string raiPolicyName = "raiPolicyName"; - NullableResponse response = await collection.GetIfExistsAsync(raiPolicyName); - WorkspaceEndpointRaiPolicyResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // 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 - RaiPolicyPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // Create Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/RaiPolicy/create.json - // this example is just showing the usage of "RaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this EndpointResourcePropertiesBasicResource created on azure - // for more information of creating EndpointResourcePropertiesBasicResource, please refer to the document of EndpointResourcePropertiesBasicResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - ResourceIdentifier endpointResourcePropertiesBasicResourceId = EndpointResourcePropertiesBasicResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName); - EndpointResourcePropertiesBasicResource endpointResourcePropertiesBasicResource = client.GetEndpointResourcePropertiesBasicResource(endpointResourcePropertiesBasicResourceId); - - // get the collection of this WorkspaceEndpointRaiPolicyResource - WorkspaceEndpointRaiPolicyCollection collection = endpointResourcePropertiesBasicResource.GetWorkspaceEndpointRaiPolicies(); - - // invoke the operation - string raiPolicyName = "raiPolicyName"; - RaiPolicyPropertiesBasicResourceData data = new RaiPolicyPropertiesBasicResourceData(new RaiPolicyProperties() - { - BasePolicyName = "112", - CompletionBlocklists = -{ -new RaiBlocklistConfig() -{ -Blocking = false, -BlocklistName = "blocklistName", -} -}, - ContentFilters = -{ -new RaiPolicyContentFilter() -{ -AllowedContentLevel = AllowedContentLevel.Low, -Blocking = false, -Enabled = false, -Name = "policyName", -Source = RaiPolicyContentSource.Prompt, -} -}, - Mode = RaiPolicyMode.Blocking, - PromptBlocklists = -{ -new RaiBlocklistConfig() -{ -Blocking = false, -BlocklistName = "blocklistName", -} -}, - PolicyType = RaiPolicyType.SystemManaged, - }); - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, raiPolicyName, data); - WorkspaceEndpointRaiPolicyResource 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 - RaiPolicyPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceEndpointRaiPolicyResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceEndpointRaiPolicyResource.cs deleted file mode 100644 index fc3d2ae838bc8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/samples/Generated/Samples/Sample_WorkspaceEndpointRaiPolicyResource.cs +++ /dev/null @@ -1,147 +0,0 @@ -// 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.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning.Samples -{ - public partial class Sample_WorkspaceEndpointRaiPolicyResource - { - // Delete Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_DeleteRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/RaiPolicy/delete.json - // this example is just showing the usage of "RaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this WorkspaceEndpointRaiPolicyResource created on azure - // for more information of creating WorkspaceEndpointRaiPolicyResource, please refer to the document of WorkspaceEndpointRaiPolicyResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - string raiPolicyName = "raiPolicyName"; - ResourceIdentifier workspaceEndpointRaiPolicyResourceId = WorkspaceEndpointRaiPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName, raiPolicyName); - WorkspaceEndpointRaiPolicyResource workspaceEndpointRaiPolicy = client.GetWorkspaceEndpointRaiPolicyResource(workspaceEndpointRaiPolicyResourceId); - - // invoke the operation - await workspaceEndpointRaiPolicy.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // Get Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_GetRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/RaiPolicy/get.json - // this example is just showing the usage of "RaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this WorkspaceEndpointRaiPolicyResource created on azure - // for more information of creating WorkspaceEndpointRaiPolicyResource, please refer to the document of WorkspaceEndpointRaiPolicyResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - string raiPolicyName = "raiPolicyName"; - ResourceIdentifier workspaceEndpointRaiPolicyResourceId = WorkspaceEndpointRaiPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName, raiPolicyName); - WorkspaceEndpointRaiPolicyResource workspaceEndpointRaiPolicy = client.GetWorkspaceEndpointRaiPolicyResource(workspaceEndpointRaiPolicyResourceId); - - // invoke the operation - WorkspaceEndpointRaiPolicyResource result = await workspaceEndpointRaiPolicy.GetAsync(); - - // 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 - RaiPolicyPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // Create Rai policy - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateRaiPolicy() - { - // Generated from example definition: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2024-07-01-preview/examples/Endpoint/RaiPolicy/create.json - // this example is just showing the usage of "RaiPolicy_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this WorkspaceEndpointRaiPolicyResource created on azure - // for more information of creating WorkspaceEndpointRaiPolicyResource, please refer to the document of WorkspaceEndpointRaiPolicyResource - string subscriptionId = "00000000-1111-2222-3333-444444444444"; - string resourceGroupName = "test-rg"; - string workspaceName = "aml-workspace-name"; - string endpointName = "Azure.OpenAI"; - string raiPolicyName = "raiPolicyName"; - ResourceIdentifier workspaceEndpointRaiPolicyResourceId = WorkspaceEndpointRaiPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, workspaceName, endpointName, raiPolicyName); - WorkspaceEndpointRaiPolicyResource workspaceEndpointRaiPolicy = client.GetWorkspaceEndpointRaiPolicyResource(workspaceEndpointRaiPolicyResourceId); - - // invoke the operation - RaiPolicyPropertiesBasicResourceData data = new RaiPolicyPropertiesBasicResourceData(new RaiPolicyProperties() - { - BasePolicyName = "112", - CompletionBlocklists = -{ -new RaiBlocklistConfig() -{ -Blocking = false, -BlocklistName = "blocklistName", -} -}, - ContentFilters = -{ -new RaiPolicyContentFilter() -{ -AllowedContentLevel = AllowedContentLevel.Low, -Blocking = false, -Enabled = false, -Name = "policyName", -Source = RaiPolicyContentSource.Prompt, -} -}, - Mode = RaiPolicyMode.Blocking, - PromptBlocklists = -{ -new RaiBlocklistConfig() -{ -Blocking = false, -BlocklistName = "blocklistName", -} -}, - PolicyType = RaiPolicyType.SystemManaged, - }); - ArmOperation lro = await workspaceEndpointRaiPolicy.UpdateAsync(WaitUntil.Completed, data); - WorkspaceEndpointRaiPolicyResource 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 - RaiPolicyPropertiesBasicResourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Extensions/MockableMachineLearningSubscriptionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Extensions/MockableMachineLearningSubscriptionResource.cs deleted file mode 100644 index d999830dd8f12..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Extensions/MockableMachineLearningSubscriptionResource.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System.ComponentModel; -using System.Threading; - -namespace Azure.ResourceManager.MachineLearning.Mocking -{ - /// A class to add extension methods to SubscriptionResource. - public partial class MockableMachineLearningSubscriptionResource : ArmResource - { - /// - /// Lists all the available machine learning workspaces under the specified subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces - /// - /// - /// Operation Id - /// Workspaces_ListBySubscription - /// - /// - /// - /// Continuation token for pagination. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - [EditorBrowsable(EditorBrowsableState.Never)] - public virtual AsyncPageable GetMachineLearningWorkspacesAsync(string skip = null, CancellationToken cancellationToken = default) - { - return GetMachineLearningWorkspacesAsync(null, skip, null, cancellationToken); - } - - /// - /// Lists all the available machine learning workspaces under the specified subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces - /// - /// - /// Operation Id - /// Workspaces_ListBySubscription - /// - /// - /// - /// Continuation token for pagination. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - [EditorBrowsable(EditorBrowsableState.Never)] - public virtual Pageable GetMachineLearningWorkspaces(string skip = null, CancellationToken cancellationToken = default) - { - return GetMachineLearningWorkspaces(null, skip, null, cancellationToken); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDatastoreResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDatastoreResource.cs deleted file mode 100644 index 4dc0f3e4beb1b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningDatastoreResource.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a MachineLearningDatastore along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetMachineLearningDatastoreResource method. - /// Otherwise you can get one from its parent resource using the GetMachineLearningDatastore method. - /// - public partial class MachineLearningDatastoreResource : ArmResource - { - /// - /// Get datastore secrets. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets - /// - /// - /// Operation Id - /// Datastores_ListSecrets - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetSecretsAsync(CancellationToken cancellationToken = default) - { - var response = await GetSecretsAsync(null, cancellationToken).ConfigureAwait(false); - return response; - } - - /// - /// Get datastore secrets. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets - /// - /// - /// Operation Id - /// Datastores_ListSecrets - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response GetSecrets(CancellationToken cancellationToken = default) => GetSecrets(null, cancellationToken); - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningPrivateEndpointConnectionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningPrivateEndpointConnectionData.cs new file mode 100644 index 0000000000000..885206e44a31c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningPrivateEndpointConnectionData.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A class representing the MachineLearningPrivateEndpointConnection data model. + /// The Private Endpoint Connection resource. + /// + public partial class MachineLearningPrivateEndpointConnectionData : TrackedResourceData + { + private MachineLearningPrivateEndpoint _privateEndpoint; + + /// The resource of private end point. + public MachineLearningPrivateEndpoint PrivateEndpoint + { + get + { + return _privateEndpoint is null ? new MachineLearningPrivateEndpoint(SubResourceId, SubResourceId, _serializedAdditionalRawData) : _privateEndpoint; + } + + set + { + _privateEndpoint = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceCollection.cs deleted file mode 100644 index ba37c00b13346..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceCollection.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System.Collections.Generic; -using System.ComponentModel; -using System.Threading; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetMachineLearningWorkspaces method from an instance of . - /// - public partial class MachineLearningWorkspaceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - /// - /// Lists all the available machine learning workspaces under the specified resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces - /// - /// - /// Operation Id - /// Workspaces_ListByResourceGroup - /// - /// - /// - /// Continuation token for pagination. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - [EditorBrowsable(EditorBrowsableState.Never)] - public virtual AsyncPageable GetAllAsync(string skip, CancellationToken cancellationToken) - => GetAllAsync(skip, null,null, cancellationToken); - - /// - /// Lists all the available machine learning workspaces under the specified resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces - /// - /// - /// Operation Id - /// Workspaces_ListByResourceGroup - /// - /// - /// - /// Continuation token for pagination. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - [EditorBrowsable(EditorBrowsableState.Never)] - public virtual Pageable GetAll(string skip, CancellationToken cancellationToken) - => GetAll(skip, null, null, cancellationToken); - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceConnectionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceConnectionCollection.cs deleted file mode 100644 index 2b5bed9e20215..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningWorkspaceConnectionCollection.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetMachineLearningWorkspaceConnections method from an instance of . - /// - public partial class MachineLearningWorkspaceConnectionCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - /// - /// Lists all the available machine learning workspaces connections under the specified workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections - /// - /// - /// Operation Id - /// WorkspaceConnections_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Target of the workspace connection. - /// Category of the workspace connection. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string target, string category, CancellationToken cancellationToken = default) => GetAllAsync(target, category, null, cancellationToken); - - /// - /// Lists all the available machine learning workspaces connections under the specified workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections - /// - /// - /// Operation Id - /// WorkspaceConnections_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Target of the workspace connection. - /// Category of the workspace connection. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string target, string category, CancellationToken cancellationToken = default) => GetAll(target, category, null, cancellationToken); - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningCertificateDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningCertificateDatastoreCredentials.cs new file mode 100644 index 0000000000000..4bf06552d1a51 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningCertificateDatastoreCredentials.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Certificate datastore credentials configuration. + public partial class MachineLearningCertificateDatastoreCredentials : MachineLearningDatastoreCredentials + { + /// Initializes a new instance of . + /// [Required] Service principal client ID. + /// [Required] Service principal secrets. + /// [Required] ID of the tenant to which the service principal belongs. + /// [Required] Thumbprint of the certificate used for authentication. + /// or is null. + public MachineLearningCertificateDatastoreCredentials(Guid clientId, MachineLearningCertificateDatastoreSecrets secrets, Guid tenantId, string thumbprint) + { + Argument.AssertNotNull(thumbprint, nameof(thumbprint)); + Argument.AssertNotNull(secrets, nameof(secrets)); + + TenantId = tenantId; + ClientId = clientId; + Thumbprint = thumbprint; + Secrets = secrets; + CredentialsType = CredentialsType.Certificate; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningEncryptionKeyVaultProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningEncryptionKeyVaultProperties.cs deleted file mode 100644 index e794d52a17532..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningEncryptionKeyVaultProperties.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using System.ComponentModel; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The MachineLearningEncryptionKeyVaultProperties. - public partial class MachineLearningEncryptionKeyVaultProperties - { - /// Initializes a new instance of MachineLearningEncryptionKeyVaultProperties. - /// The ArmId of the keyVault where the customer owned encryption key is present. - /// Key vault uri to access the encryption key. - /// or is null. - [EditorBrowsable(EditorBrowsableState.Never)] - public MachineLearningEncryptionKeyVaultProperties(ResourceIdentifier keyVaultArmId, string keyIdentifier) - { - Argument.AssertNotNull(keyVaultArmId, nameof(keyVaultArmId)); - Argument.AssertNotNull(keyIdentifier, nameof(keyIdentifier)); - - KeyVaultArmId = keyVaultArmId; - KeyIdentifier = keyIdentifier; - } - - /// Initializes a new instance of MachineLearningEncryptionKeyVaultProperties. - /// The ArmId of the keyVault where the customer owned encryption key is present. - /// Key vault uri to access the encryption key. - /// For future use - The client id of the identity which will be used to access key vault. - [EditorBrowsable(EditorBrowsableState.Never)] - internal MachineLearningEncryptionKeyVaultProperties(ResourceIdentifier keyVaultArmId, string keyIdentifier, string identityClientId) - { - KeyVaultArmId = keyVaultArmId; - KeyIdentifier = keyIdentifier; - IdentityClientId = identityClientId; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningObjective.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningObjective.cs new file mode 100644 index 0000000000000..5268f7770dac7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningObjective.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Optimization objective. + public partial class MachineLearningObjective + { + /// Initializes a new instance of . + /// [Required] Defines supported metric goals for hyperparameter tuning. + /// [Required] Name of the metric to optimize. + /// is null. + public MachineLearningObjective(MachineLearningGoal goal, string primaryMetric) + { + Argument.AssertNotNull(primaryMetric, nameof(primaryMetric)); + + PrimaryMetric = primaryMetric; + Goal = goal; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningPrivateEndpoint.Serialization.cs similarity index 98% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.Serialization.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningPrivateEndpoint.Serialization.cs index 0fc10fd3b28d0..69fb5812a4fe7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningPrivateEndpoint.Serialization.cs @@ -1,8 +1,6 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningPrivateEndpoint.cs similarity index 97% rename from sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.cs rename to sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningPrivateEndpoint.cs index ce73374188eec..a77dcf38581e7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningPrivateEndpoint.cs @@ -1,8 +1,6 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningScheduleProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningScheduleProperties.cs new file mode 100644 index 0000000000000..695da6adf69d0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningScheduleProperties.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Base definition of a schedule. + public partial class MachineLearningScheduleProperties : MachineLearningResourceBase + { + /// Initializes a new instance of . + /// + /// [Required] Specifies the action of the schedule + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// + /// [Required] Specifies the trigger details + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// or is null. + public MachineLearningScheduleProperties(MachineLearningScheduleAction action, MachineLearningTriggerBase trigger) + { + Argument.AssertNotNull(trigger, nameof(trigger)); + Argument.AssertNotNull(action, nameof(action)); + + Trigger = trigger; + Action = action; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningServicePrincipalDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningServicePrincipalDatastoreCredentials.cs new file mode 100644 index 0000000000000..bf05e142efa75 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningServicePrincipalDatastoreCredentials.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Service Principal datastore credentials configuration. + public partial class MachineLearningServicePrincipalDatastoreCredentials : MachineLearningDatastoreCredentials + { + /// Initializes a new instance of . + /// [Required] Service principal client ID. + /// [Required] Service principal secrets. + /// [Required] ID of the tenant to which the service principal belongs. + /// is null. + public MachineLearningServicePrincipalDatastoreCredentials(Guid clientId, MachineLearningServicePrincipalDatastoreSecrets secrets, Guid tenantId) + { + Argument.AssertNotNull(secrets, nameof(secrets)); + + TenantId = tenantId; + ClientId = clientId; + Secrets = secrets; + CredentialsType = CredentialsType.ServicePrincipal; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningSweepJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningSweepJob.cs new file mode 100644 index 0000000000000..e38ee4fa11dac --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/Models/MachineLearningSweepJob.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Sweep job definition. + public partial class MachineLearningSweepJob : MachineLearningJobProperties + { + /// Initializes a new instance of . + /// [Required] Optimization objective. + /// + /// [Required] The hyperparameter sampling algorithm + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. + /// [Required] Trial component definition. + /// , , or is null. + public MachineLearningSweepJob(MachineLearningObjective objective, SamplingAlgorithm samplingAlgorithm, BinaryData searchSpace, MachineLearningTrialComponent trial) + { + Argument.AssertNotNull(searchSpace, nameof(searchSpace)); + Argument.AssertNotNull(samplingAlgorithm, nameof(samplingAlgorithm)); + Argument.AssertNotNull(objective, nameof(objective)); + Argument.AssertNotNull(trial, nameof(trial)); + + SearchSpace = searchSpace; + SamplingAlgorithm = samplingAlgorithm; + Objective = objective; + Trial = trial; + Inputs = new ChangeTrackingDictionary(); + Outputs = new ChangeTrackingDictionary(); + JobType = JobType.Sweep; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ArmMachineLearningModelFactory.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ArmMachineLearningModelFactory.cs index b976946781310..13a31ec17b365 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ArmMachineLearningModelFactory.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ArmMachineLearningModelFactory.cs @@ -17,37 +17,6 @@ namespace Azure.ResourceManager.MachineLearning.Models /// Model factory for models. public static partial class ArmMachineLearningModelFactory { - /// Initializes a new instance of . - /// Specifies the resource ID. - /// Region of the AML workspace in the id. - /// Specifies the resource type. - /// An enum describing the unit of usage measurement. - /// The current usage of the resource. - /// The maximum permitted usage of the resource. - /// The name of the type of usage. - /// A new instance for mocking. - public static MachineLearningUsage MachineLearningUsage(string id = null, string amlWorkspaceLocation = null, string usageType = null, MachineLearningUsageUnit? unit = null, long? currentValue = null, long? limit = null, MachineLearningUsageName name = null) - { - return new MachineLearningUsage( - id, - amlWorkspaceLocation, - usageType, - unit, - currentValue, - limit, - name, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The name of the resource. - /// The localized name of the resource. - /// A new instance for mocking. - public static MachineLearningUsageName MachineLearningUsageName(string value = null, string localizedValue = null) - { - return new MachineLearningUsageName(value, localizedValue, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The error object. /// A new instance for mocking. @@ -56,108 +25,102 @@ public static MachineLearningError MachineLearningError(ResponseError error = nu return new MachineLearningError(error, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The name of the virtual machine size. - /// The family name of the virtual machine size. - /// The number of vCPUs supported by the virtual machine size. - /// The number of gPUs supported by the virtual machine size. - /// The OS VHD disk size, in MB, allowed by the virtual machine size. - /// The resource volume size, in MB, allowed by the virtual machine size. - /// The amount of memory, in GB, supported by the virtual machine size. - /// Specifies if the virtual machine size supports low priority VMs. - /// Specifies if the virtual machine size supports premium IO. - /// The estimated price information for using a VM. - /// Specifies the compute types supported by the virtual machine size. - /// A new instance for mocking. - public static MachineLearningVmSize MachineLearningVmSize(string name = null, string family = null, int? vCpus = null, int? gpus = null, int? osVhdSizeMB = null, int? maxResourceVolumeMB = null, double? memoryGB = null, bool? lowPriorityCapable = null, bool? isPremiumIOSupported = null, MachineLearningEstimatedVmPrices estimatedVmPrices = null, IEnumerable supportedComputeTypes = null) - { - supportedComputeTypes ??= new List(); - - return new MachineLearningVmSize( - name, - family, - vCpus, - gpus, - osVhdSizeMB, - maxResourceVolumeMB, - memoryGB, - lowPriorityCapable, - isPremiumIOSupported, - estimatedVmPrices, - supportedComputeTypes?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Three lettered code specifying the currency of the VM price. Example: USD. - /// The unit of time measurement for the specified VM price. Example: OneHour. - /// The list of estimated prices for using a VM of a particular OS type, tier, etc. - /// A new instance for mocking. - public static MachineLearningEstimatedVmPrices MachineLearningEstimatedVmPrices(MachineLearningBillingCurrency billingCurrency = default, MachineLearningUnitOfMeasure unitOfMeasure = default, IEnumerable values = null) - { - values ??= new List(); - - return new MachineLearningEstimatedVmPrices(billingCurrency, unitOfMeasure, values?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The price charged for using the VM. - /// Operating system type used by the VM. - /// The type of the VM. - /// A new instance for mocking. - public static MachineLearningEstimatedVmPrice MachineLearningEstimatedVmPrice(double retailPrice = default, MachineLearningVmPriceOSType osType = default, MachineLearningVmTier vmTier = default) - { - return new MachineLearningEstimatedVmPrice(retailPrice, osType, vmTier, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Specifies the resource ID. - /// Specifies the resource type. - /// The maximum permitted quota of the resource. - /// An enum describing the unit of quota measurement. - /// Status of update workspace quota. - /// A new instance for mocking. - public static MachineLearningWorkspaceQuotaUpdate MachineLearningWorkspaceQuotaUpdate(string id = null, string updateWorkspaceQuotasType = null, long? limit = null, MachineLearningQuotaUnit? unit = null, MachineLearningWorkspaceQuotaStatus? status = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The identity of the resource. + /// + /// The sku of the workspace. + /// The immutable id associated with this workspace. + /// The description of this workspace. + /// The friendly name for this workspace. This name in mutable. + /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. + /// ARM id of the application insights associated with this workspace. + /// ARM id of the container registry associated with this workspace. + /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. + /// Url for the discovery service to identify regional endpoints for machine learning experimentation services. + /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + /// The encryption settings of Azure ML workspace. + /// The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service. + /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. + /// Count of private connections in the workspace. + /// The compute name for image build. + /// The flag to indicate whether to allow public access when behind VNet. + /// Whether requests from Public Network are allowed. + /// The list of private endpoint connections in the workspace. + /// Settings for serverless compute created in the workspace. + /// The list of shared private link resources in this workspace. + /// The notebook info of Azure ML workspace. + /// The service managed resource settings. + /// The user assigned identity resource id that represents the workspace identity. + /// The tenant id associated with this workspace. + /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. + /// The URI associated with this workspace that machine learning flow must point at to set up tracking. + /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + /// Managed Network settings for a machine learning workspace. + /// Settings for feature store type workspace. + /// + /// + /// + /// WorkspaceHub's configuration object. + /// A new instance for mocking. + public static MachineLearningWorkspaceData MachineLearningWorkspaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningSku sku = null, string workspaceId = null, string description = null, string friendlyName = null, string keyVault = null, string applicationInsights = null, string containerRegistry = null, string storageAccount = null, Uri discoveryUri = null, MachineLearningProvisioningState? provisioningState = null, MachineLearningEncryptionSetting encryption = null, bool? isHbiWorkspace = null, string serviceProvisionedResourceGroup = null, int? privateLinkCount = null, string imageBuildCompute = null, bool? allowPublicAccessWhenBehindVnet = null, PublicNetworkAccess? publicNetworkAccessType = null, IEnumerable privateEndpointConnections = null, ServerlessComputeSettings serverlessComputeSettings = null, IEnumerable sharedPrivateLinkResources = null, MachineLearningNotebookResourceInfo notebookInfo = null, int? cosmosDbCollectionsThroughput = null, string primaryUserAssignedIdentity = null, Guid? tenantId = null, bool? isStorageHnsEnabled = null, Uri mlFlowTrackingUri = null, bool? isV1LegacyMode = null, ManagedNetworkSettings managedNetwork = null, FeatureStoreSettings featureStoreSettings = null, IEnumerable associatedWorkspaces = null, bool? enableDataIsolation = null, ResourceIdentifier hubResourceId = null, WorkspaceHubConfig workspaceHubConfig = null) { - return new MachineLearningWorkspaceQuotaUpdate( - id, - updateWorkspaceQuotasType, - limit, - unit, - status, - serializedAdditionalRawData: null); - } + tags ??= new Dictionary(); + privateEndpointConnections ??= new List(); + sharedPrivateLinkResources ??= new List(); + associatedWorkspaces ??= new List(); - /// Initializes a new instance of . - /// Specifies the resource ID. - /// Region of the AML workspace in the id. - /// Specifies the resource type. - /// Name of the resource. - /// The maximum permitted quota of the resource. - /// An enum describing the unit of quota measurement. - /// A new instance for mocking. - public static MachineLearningResourceQuota MachineLearningResourceQuota(string id = null, string amlWorkspaceLocation = null, string resourceQuotaType = null, MachineLearningResourceName name = null, long? limit = null, MachineLearningQuotaUnit? unit = null) - { - return new MachineLearningResourceQuota( + return new MachineLearningWorkspaceData( id, - amlWorkspaceLocation, - resourceQuotaType, name, - limit, - unit, + resourceType, + systemData, + tags, + location, + identity, + kind, + sku, + workspaceId, + description, + friendlyName, + keyVault, + applicationInsights, + containerRegistry, + storageAccount, + discoveryUri, + provisioningState, + encryption, + isHbiWorkspace, + serviceProvisionedResourceGroup, + privateLinkCount, + imageBuildCompute, + allowPublicAccessWhenBehindVnet, + publicNetworkAccessType, + privateEndpointConnections?.ToList(), + serverlessComputeSettings, + sharedPrivateLinkResources?.ToList(), + notebookInfo, + cosmosDbCollectionsThroughput != null ? new ServiceManagedResourcesSettings(new CosmosDbSettings(cosmosDbCollectionsThroughput, serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null, + primaryUserAssignedIdentity, + tenantId, + isStorageHnsEnabled, + mlFlowTrackingUri, + isV1LegacyMode, + managedNetwork, + featureStoreSettings, + associatedWorkspaces?.ToList(), + enableDataIsolation, + hubResourceId, + workspaceHubConfig, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The name of the resource. - /// The localized name of the resource. - /// A new instance for mocking. - public static MachineLearningResourceName MachineLearningResourceName(string value = null, string localizedValue = null) - { - return new MachineLearningResourceName(value, localizedValue, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -166,17 +129,15 @@ public static MachineLearningResourceName MachineLearningResourceName(string val /// The location. /// The identity of the resource. /// The sku of the workspace. - /// - /// Compute properties - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , and . - /// - /// A new instance for mocking. - public static MachineLearningComputeData MachineLearningComputeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MachineLearningSku sku = null, MachineLearningComputeProperties properties = null) + /// The resource of private end point. + /// A collection of information about the state of the connection between service consumer and provider. + /// The provisioning state of the private endpoint connection resource. + /// A new instance for mocking. + public static MachineLearningPrivateEndpointConnectionData MachineLearningPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MachineLearningSku sku = null, ResourceIdentifier subResourceId = null, MachineLearningPrivateLinkServiceConnectionState connectionState = null, MachineLearningPrivateEndpointConnectionProvisioningState? provisioningState = null) { tags ??= new Dictionary(); - return new MachineLearningComputeData( + return new MachineLearningPrivateEndpointConnectionData( id, name, resourceType, @@ -185,491 +146,451 @@ public static MachineLearningComputeData MachineLearningComputeData(ResourceIden location, identity, sku, - properties, + subResourceId != null ? ResourceManagerModelFactory.SubResource(subResourceId) : null, + connectionState, + provisioningState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The type of compute. - /// Location for the underlying compute. - /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - /// The description of the Machine Learning compute. - /// The time at which the compute was created. - /// The time at which the compute was last modified. - /// ARM resource id of the underlying compute. - /// Errors during provisioning. - /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. - /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - /// A new instance for mocking. - public static MachineLearningComputeProperties MachineLearningComputeProperties(string computeType = null, string computeLocation = null, MachineLearningProvisioningState? provisioningState = null, string description = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, ResourceIdentifier resourceId = null, IEnumerable provisioningErrors = null, bool? isAttachedCompute = null, bool? disableLocalAuth = null) + /// Initializes a new instance of . + /// The ARM identifier for Private Endpoint. + /// A new instance for mocking. + public static PrivateEndpointBase PrivateEndpointBase(ResourceIdentifier id = null) { - provisioningErrors ??= new List(); + return new PrivateEndpointBase(id, serializedAdditionalRawData: null); + } - return new UnknownCompute( - computeType == null ? default : new ComputeType(computeType), - computeLocation, - provisioningState, - description, - createdOn, - modifiedOn, - resourceId, - provisioningErrors?.ToList(), - isAttachedCompute, - disableLocalAuth, - serializedAdditionalRawData: null); + /// Initializes a new instance of . + /// + /// the data plane resourceId that used to initialize notebook component. + /// The error that occurs when preparing notebook. + /// A new instance for mocking. + public static MachineLearningNotebookResourceInfo MachineLearningNotebookResourceInfo(string fqdn = null, string resourceId = null, MachineLearningNotebookPreparationError notebookPreparationError = null) + { + return new MachineLearningNotebookResourceInfo(fqdn, resourceId, notebookPreparationError, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// ID of the compute node. - /// Private IP address of the compute node. - /// Public IP address of the compute node. - /// SSH port number of the node. - /// State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. - /// ID of the Experiment running on the node, if any else null. - /// A new instance for mocking. - public static AmlComputeNodeInformation AmlComputeNodeInformation(string nodeId = null, IPAddress privateIPAddress = null, IPAddress publicIPAddress = null, int? port = null, MachineLearningNodeState? nodeState = null, string runId = null) + /// Initializes a new instance of . + /// + /// + /// A new instance for mocking. + public static MachineLearningNotebookPreparationError MachineLearningNotebookPreparationError(string errorMessage = null, int? statusCode = null) { - return new AmlComputeNodeInformation( - nodeId, - privateIPAddress, - publicIPAddress, - port, - nodeState, - runId, - serializedAdditionalRawData: null); + return new MachineLearningNotebookPreparationError(errorMessage, statusCode, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningCodeContainerData MachineLearningCodeContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningCodeContainerProperties properties = null) + /// Initializes a new instance of . + /// Isolation mode for the managed network of a machine learning workspace. + /// + /// + /// Dictionary of <OutboundRule> + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Status of the Provisioning for the managed network of a machine learning workspace. + /// A new instance for mocking. + public static ManagedNetworkSettings ManagedNetworkSettings(IsolationMode? isolationMode = null, string networkId = null, IDictionary outboundRules = null, ManagedNetworkProvisionStatus status = null) { - return new MachineLearningCodeContainerData( - id, - name, - resourceType, - systemData, - properties, - serializedAdditionalRawData: null); + outboundRules ??= new Dictionary(); + + return new ManagedNetworkSettings(isolationMode, networkId, outboundRules, status, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// Is the asset archived?. - /// The latest version inside this container. - /// The next auto incremental version. - /// Provisioning state for the code container. - /// A new instance for mocking. - public static MachineLearningCodeContainerProperties MachineLearningCodeContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) + /// Initializes a new instance of . + /// + /// A new instance for mocking. + public static MachineLearningWorkspaceDiagnoseResult MachineLearningWorkspaceDiagnoseResult(MachineLearningDiagnoseResultValue value = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); - - return new MachineLearningCodeContainerProperties( - description, - properties, - tags, - serializedAdditionalRawData: null, - isArchived, - latestVersion, - nextVersion, - provisioningState); + return new MachineLearningWorkspaceDiagnoseResult(value, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// Is the asset archived?. - /// The latest version inside this container. - /// The next auto incremental version. - /// A new instance for mocking. - public static MachineLearningAssetContainer MachineLearningAssetContainer(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null) + /// Initializes a new instance of . + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// A new instance for mocking. + public static MachineLearningDiagnoseResultValue MachineLearningDiagnoseResultValue(IEnumerable userDefinedRouteResults = null, IEnumerable networkSecurityRuleResults = null, IEnumerable resourceLockResults = null, IEnumerable dnsResolutionResults = null, IEnumerable storageAccountResults = null, IEnumerable keyVaultResults = null, IEnumerable containerRegistryResults = null, IEnumerable applicationInsightsResults = null, IEnumerable otherResults = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); + userDefinedRouteResults ??= new List(); + networkSecurityRuleResults ??= new List(); + resourceLockResults ??= new List(); + dnsResolutionResults ??= new List(); + storageAccountResults ??= new List(); + keyVaultResults ??= new List(); + containerRegistryResults ??= new List(); + applicationInsightsResults ??= new List(); + otherResults ??= new List(); - return new MachineLearningAssetContainer( - description, - properties, - tags, - serializedAdditionalRawData: null, - isArchived, - latestVersion, - nextVersion); + return new MachineLearningDiagnoseResultValue( + userDefinedRouteResults?.ToList(), + networkSecurityRuleResults?.ToList(), + resourceLockResults?.ToList(), + dnsResolutionResults?.ToList(), + storageAccountResults?.ToList(), + keyVaultResults?.ToList(), + containerRegistryResults?.ToList(), + applicationInsightsResults?.ToList(), + otherResults?.ToList(), + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningCodeVersionData MachineLearningCodeVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningCodeVersionProperties properties = null) + /// Initializes a new instance of . + /// Code for workspace setup error. + /// Level of workspace setup error. + /// Message of workspace setup error. + /// A new instance for mocking. + public static MachineLearningDiagnoseResult MachineLearningDiagnoseResult(string code = null, MachineLearningDiagnoseResultLevel? level = null, string message = null) { - return new MachineLearningCodeVersionData( - id, - name, - resourceType, - systemData, - properties, + return new MachineLearningDiagnoseResult(code, level, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// + /// + /// + /// + /// A new instance for mocking. + public static MachineLearningWorkspaceGetKeysResult MachineLearningWorkspaceGetKeysResult(string userStorageKey = null, string userStorageResourceId = null, string appInsightsInstrumentationKey = null, MachineLearningContainerRegistryCredentials containerRegistryCredentials = null, MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys = null) + { + return new MachineLearningWorkspaceGetKeysResult( + userStorageKey, + userStorageResourceId, + appInsightsInstrumentationKey, + containerRegistryCredentials, + notebookAccessKeys, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). - /// Is the asset archived?. - /// Uri where code is located. - /// Provisioning state for the code version. - /// A new instance for mocking. - public static MachineLearningCodeVersionProperties MachineLearningCodeVersionProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isAnonymous = null, bool? isArchived = null, Uri codeUri = null, RegistryAssetProvisioningState? provisioningState = null) + /// Initializes a new instance of . + /// + /// + /// + /// A new instance for mocking. + public static MachineLearningContainerRegistryCredentials MachineLearningContainerRegistryCredentials(AzureLocation? location = null, string username = null, IEnumerable passwords = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); + passwords ??= new List(); - return new MachineLearningCodeVersionProperties( - description, - properties, - tags, - serializedAdditionalRawData: null, - isAnonymous, - isArchived, - codeUri, - provisioningState); + return new MachineLearningContainerRegistryCredentials(location, username, passwords?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Container level read, write, list SAS. - /// ID for this upload request. - /// TemporaryBlobReference is the only supported type. - /// A new instance for mocking. - public static PendingUploadResponseDto PendingUploadResponseDto(BlobReferenceForConsumptionDto blobReferenceForConsumption = null, string pendingUploadId = null, PendingUploadType? pendingUploadType = null) + /// Initializes a new instance of . + /// + /// + /// A new instance for mocking. + public static MachineLearningPasswordDetail MachineLearningPasswordDetail(string name = null, string value = null) { - return new PendingUploadResponseDto(blobReferenceForConsumption, pendingUploadId, pendingUploadType, serializedAdditionalRawData: null); + return new MachineLearningPasswordDetail(name, value, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// Blob URI path for client to upload data. - /// Example: https://blob.windows.core.net/Container/Path - /// - /// - /// Credential info to access storage account - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - /// Arm ID of the storage account to use. - /// A new instance for mocking. - public static BlobReferenceForConsumptionDto BlobReferenceForConsumptionDto(Uri blobUri = null, PendingUploadCredentialDto credential = null, ResourceIdentifier storageAccountArmId = null) + /// Initializes a new instance of . + /// + /// + /// A new instance for mocking. + public static MachineLearningWorkspaceGetNotebookKeysResult MachineLearningWorkspaceGetNotebookKeysResult(string primaryAccessKey = null, string secondaryAccessKey = null) { - return new BlobReferenceForConsumptionDto(blobUri, credential, storageAccountArmId, serializedAdditionalRawData: null); + return new MachineLearningWorkspaceGetNotebookKeysResult(primaryAccessKey, secondaryAccessKey, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningComponentContainerData MachineLearningComponentContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningComponentContainerProperties properties = null) + /// Initializes a new instance of . + /// Specifies the resource ID. + /// Region of the AML workspace in the id. + /// Specifies the resource type. + /// An enum describing the unit of usage measurement. + /// The current usage of the resource. + /// The maximum permitted usage of the resource. + /// The name of the type of usage. + /// A new instance for mocking. + public static MachineLearningUsage MachineLearningUsage(string id = null, string amlWorkspaceLocation = null, string usageType = null, MachineLearningUsageUnit? unit = null, long? currentValue = null, long? limit = null, MachineLearningUsageName name = null) { - return new MachineLearningComponentContainerData( + return new MachineLearningUsage( id, + amlWorkspaceLocation, + usageType, + unit, + currentValue, + limit, name, - resourceType, - systemData, - properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// Is the asset archived?. - /// The latest version inside this container. - /// The next auto incremental version. - /// Provisioning state for the component container. - /// A new instance for mocking. - public static MachineLearningComponentContainerProperties MachineLearningComponentContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) - { - properties ??= new Dictionary(); - tags ??= new Dictionary(); - - return new MachineLearningComponentContainerProperties( - description, - properties, - tags, - serializedAdditionalRawData: null, - isArchived, - latestVersion, - nextVersion, - provisioningState); + /// Initializes a new instance of . + /// The name of the resource. + /// The localized name of the resource. + /// A new instance for mocking. + public static MachineLearningUsageName MachineLearningUsageName(string value = null, string localizedValue = null) + { + return new MachineLearningUsageName(value, localizedValue, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningComponentVersionData MachineLearningComponentVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningComponentVersionProperties properties = null) + /// Initializes a new instance of . + /// The name of the virtual machine size. + /// The family name of the virtual machine size. + /// The number of vCPUs supported by the virtual machine size. + /// The number of gPUs supported by the virtual machine size. + /// The OS VHD disk size, in MB, allowed by the virtual machine size. + /// The resource volume size, in MB, allowed by the virtual machine size. + /// The amount of memory, in GB, supported by the virtual machine size. + /// Specifies if the virtual machine size supports low priority VMs. + /// Specifies if the virtual machine size supports premium IO. + /// The estimated price information for using a VM. + /// Specifies the compute types supported by the virtual machine size. + /// A new instance for mocking. + public static MachineLearningVmSize MachineLearningVmSize(string name = null, string family = null, int? vCpus = null, int? gpus = null, int? osVhdSizeMB = null, int? maxResourceVolumeMB = null, double? memoryGB = null, bool? lowPriorityCapable = null, bool? isPremiumIOSupported = null, MachineLearningEstimatedVmPrices estimatedVmPrices = null, IEnumerable supportedComputeTypes = null) { - return new MachineLearningComponentVersionData( - id, + supportedComputeTypes ??= new List(); + + return new MachineLearningVmSize( name, - resourceType, - systemData, - properties, + family, + vCpus, + gpus, + osVhdSizeMB, + maxResourceVolumeMB, + memoryGB, + lowPriorityCapable, + isPremiumIOSupported, + estimatedVmPrices, + supportedComputeTypes?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). - /// Is the asset archived?. - /// - /// Defines Component definition details. - /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" /> - /// - /// Provisioning state for the component version. - /// A new instance for mocking. - public static MachineLearningComponentVersionProperties MachineLearningComponentVersionProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isAnonymous = null, bool? isArchived = null, BinaryData componentSpec = null, RegistryAssetProvisioningState? provisioningState = null) + /// Initializes a new instance of . + /// Three lettered code specifying the currency of the VM price. Example: USD. + /// The unit of time measurement for the specified VM price. Example: OneHour. + /// The list of estimated prices for using a VM of a particular OS type, tier, etc. + /// A new instance for mocking. + public static MachineLearningEstimatedVmPrices MachineLearningEstimatedVmPrices(MachineLearningBillingCurrency billingCurrency = default, MachineLearningUnitOfMeasure unitOfMeasure = default, IEnumerable values = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); + values ??= new List(); - return new MachineLearningComponentVersionProperties( - description, - properties, - tags, - serializedAdditionalRawData: null, - isAnonymous, - isArchived, - componentSpec, - provisioningState); + return new MachineLearningEstimatedVmPrices(billingCurrency, unitOfMeasure, values?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningDataContainerData MachineLearningDataContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningDataContainerProperties properties = null) + /// Initializes a new instance of . + /// The price charged for using the VM. + /// Operating system type used by the VM. + /// The type of the VM. + /// A new instance for mocking. + public static MachineLearningEstimatedVmPrice MachineLearningEstimatedVmPrice(double retailPrice = default, MachineLearningVmPriceOSType osType = default, MachineLearningVmTier vmTier = default) { - return new MachineLearningDataContainerData( - id, - name, - resourceType, - systemData, - properties, - serializedAdditionalRawData: null); + return new MachineLearningEstimatedVmPrice(retailPrice, osType, vmTier, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// Is the asset archived?. - /// The latest version inside this container. - /// The next auto incremental version. - /// [Required] Specifies the type of data. - /// A new instance for mocking. - public static MachineLearningDataContainerProperties MachineLearningDataContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, MachineLearningDataType dataType = default) + /// Initializes a new instance of . + /// Specifies the resource ID. + /// Specifies the resource type. + /// The maximum permitted quota of the resource. + /// An enum describing the unit of quota measurement. + /// Status of update workspace quota. + /// A new instance for mocking. + public static MachineLearningWorkspaceQuotaUpdate MachineLearningWorkspaceQuotaUpdate(string id = null, string updateWorkspaceQuotasType = null, long? limit = null, MachineLearningQuotaUnit? unit = null, MachineLearningWorkspaceQuotaStatus? status = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); - - return new MachineLearningDataContainerProperties( - description, - properties, - tags, - serializedAdditionalRawData: null, - isArchived, - latestVersion, - nextVersion, - dataType); + return new MachineLearningWorkspaceQuotaUpdate( + id, + updateWorkspaceQuotasType, + limit, + unit, + status, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// [Required] Additional attributes of the entity. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// A new instance for mocking. - public static MachineLearningDataVersionData MachineLearningDataVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningDataVersionProperties properties = null) + /// Initializes a new instance of . + /// Specifies the resource ID. + /// Region of the AML workspace in the id. + /// Specifies the resource type. + /// Name of the resource. + /// The maximum permitted quota of the resource. + /// An enum describing the unit of quota measurement. + /// A new instance for mocking. + public static MachineLearningResourceQuota MachineLearningResourceQuota(string id = null, string amlWorkspaceLocation = null, string resourceQuotaType = null, MachineLearningResourceName name = null, long? limit = null, MachineLearningQuotaUnit? unit = null) { - return new MachineLearningDataVersionData( + return new MachineLearningResourceQuota( id, + amlWorkspaceLocation, + resourceQuotaType, name, - resourceType, - systemData, - properties, + limit, + unit, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Blob reference for consumption details. - /// A new instance for mocking. - public static GetBlobReferenceSasResponseDto GetBlobReferenceSasResponseDto(GetBlobReferenceForConsumptionDto blobReferenceForConsumption = null) - { - return new GetBlobReferenceSasResponseDto(blobReferenceForConsumption, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Blob uri, example: https://blob.windows.core.net/Container/Path. - /// - /// Credential info to access storage account - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - /// The ARM id of the storage account. - /// A new instance for mocking. - public static GetBlobReferenceForConsumptionDto GetBlobReferenceForConsumptionDto(Uri blobUri = null, DataReferenceCredential credential = null, string storageAccountArmId = null) + /// Initializes a new instance of . + /// The name of the resource. + /// The localized name of the resource. + /// A new instance for mocking. + public static MachineLearningResourceName MachineLearningResourceName(string value = null, string localizedValue = null) { - return new GetBlobReferenceForConsumptionDto(blobUri, credential, storageAccountArmId, serializedAdditionalRawData: null); + return new MachineLearningResourceName(value, localizedValue, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningEnvironmentContainerData MachineLearningEnvironmentContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningEnvironmentContainerProperties properties = null) + /// The tags. + /// The location. + /// The identity of the resource. + /// The sku of the workspace. + /// + /// Compute properties + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , , , and . + /// + /// A new instance for mocking. + public static MachineLearningComputeData MachineLearningComputeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MachineLearningSku sku = null, MachineLearningComputeProperties properties = null) { - return new MachineLearningEnvironmentContainerData( + tags ??= new Dictionary(); + + return new MachineLearningComputeData( id, name, resourceType, systemData, + tags, + location, + identity, + sku, properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// Is the asset archived?. - /// The latest version inside this container. - /// The next auto incremental version. - /// Provisioning state for the environment container. - /// A new instance for mocking. - public static MachineLearningEnvironmentContainerProperties MachineLearningEnvironmentContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) + /// Initializes a new instance of . + /// The type of compute. + /// Location for the underlying compute. + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The description of the Machine Learning compute. + /// The time at which the compute was created. + /// The time at which the compute was last modified. + /// ARM resource id of the underlying compute. + /// Errors during provisioning. + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// A new instance for mocking. + public static MachineLearningComputeProperties MachineLearningComputeProperties(string computeType = null, string computeLocation = null, MachineLearningProvisioningState? provisioningState = null, string description = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, ResourceIdentifier resourceId = null, IEnumerable provisioningErrors = null, bool? isAttachedCompute = null, bool? disableLocalAuth = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); + provisioningErrors ??= new List(); - return new MachineLearningEnvironmentContainerProperties( + return new UnknownCompute( + computeType == null ? default : new ComputeType(computeType), + computeLocation, + provisioningState, description, - properties, - tags, - serializedAdditionalRawData: null, - isArchived, - latestVersion, - nextVersion, - provisioningState); + createdOn, + modifiedOn, + resourceId, + provisioningErrors?.ToList(), + isAttachedCompute, + disableLocalAuth, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// ID of the compute node. + /// Private IP address of the compute node. + /// Public IP address of the compute node. + /// SSH port number of the node. + /// State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. + /// ID of the Experiment running on the node, if any else null. + /// A new instance for mocking. + public static AmlComputeNodeInformation AmlComputeNodeInformation(string nodeId = null, IPAddress privateIPAddress = null, IPAddress publicIPAddress = null, int? port = null, MachineLearningNodeState? nodeState = null, string runId = null) + { + return new AmlComputeNodeInformation( + nodeId, + privateIPAddress, + publicIPAddress, + port, + nodeState, + runId, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// + /// + /// + /// + /// + /// + /// + /// A new instance for mocking. + public static MachineLearningWorkspaceNotebookAccessTokenResult MachineLearningWorkspaceNotebookAccessTokenResult(string notebookResourceId = null, string hostName = null, string publicDns = null, string accessToken = null, string tokenType = null, int? expiresIn = null, string refreshToken = null, string scope = null) + { + return new MachineLearningWorkspaceNotebookAccessTokenResult( + notebookResourceId, + hostName, + publicDns, + accessToken, + tokenType, + expiresIn, + refreshToken, + scope, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningEnvironmentVersionData MachineLearningEnvironmentVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningEnvironmentVersionProperties properties = null) + /// The tags. + /// The location. + /// The identity of the resource. + /// The sku of the workspace. + /// The private link resource group id. + /// The private link resource required member names. + /// The private link resource Private link DNS zone name. + /// A new instance for mocking. + public static MachineLearningPrivateLinkResource MachineLearningPrivateLinkResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MachineLearningSku sku = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) { - return new MachineLearningEnvironmentVersionData( + tags ??= new Dictionary(); + requiredMembers ??= new List(); + requiredZoneNames ??= new List(); + + return new MachineLearningPrivateLinkResource( id, name, resourceType, systemData, - properties, + tags, + location, + identity, + sku, + groupId, + requiredMembers?.ToList(), + requiredZoneNames?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). - /// Is the asset archived?. - /// Defines if image needs to be rebuilt based on base image changes. - /// Configuration settings for Docker build context. - /// - /// Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and C/C++ packages. - /// <see href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" /> - /// - /// - /// Environment type is either user managed or curated by the Azure ML service - /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/resource-curated-environments" /> - /// - /// - /// Name of the image that will be used for the environment. - /// <seealso href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" /> - /// - /// Defines configuration specific to inference. - /// The OS type of the environment. - /// Provisioning state for the environment version. - /// Stage in the environment lifecycle assigned to this environment. - /// A new instance for mocking. - public static MachineLearningEnvironmentVersionProperties MachineLearningEnvironmentVersionProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isAnonymous = null, bool? isArchived = null, AutoRebuildSetting? autoRebuild = null, MachineLearningBuildContext build = null, string condaFile = null, MachineLearningEnvironmentType? environmentType = null, string image = null, MachineLearningInferenceContainerProperties inferenceConfig = null, MachineLearningOperatingSystemType? osType = null, RegistryAssetProvisioningState? provisioningState = null, string stage = null) + /// Initializes a new instance of . + /// + /// A new instance for mocking. + public static MachineLearningWorkspaceGetStorageAccountKeysResult MachineLearningWorkspaceGetStorageAccountKeysResult(string userStorageKey = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); - - return new MachineLearningEnvironmentVersionProperties( - description, - properties, - tags, - serializedAdditionalRawData: null, - isAnonymous, - isArchived, - autoRebuild, - build, - condaFile, - environmentType, - image, - inferenceConfig, - osType, - provisioningState, - stage); + return new MachineLearningWorkspaceGetStorageAccountKeysResult(userStorageKey, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MarketplaceSubscriptionData MarketplaceSubscriptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MarketplaceSubscriptionProperties properties = null) + /// + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , , , , , and . + /// + /// A new instance for mocking. + public static MachineLearningWorkspaceConnectionData MachineLearningWorkspaceConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningWorkspaceConnectionProperties properties = null) { - return new MarketplaceSubscriptionData( + return new MachineLearningWorkspaceConnectionData( id, name, resourceType, @@ -678,37 +599,109 @@ public static MarketplaceSubscriptionData MarketplaceSubscriptionData(ResourceId serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Marketplace Plan associated with the Marketplace Subscription. - /// Current status of the Marketplace Subscription. - /// [Required] Target Marketplace Model ID to create a Marketplace Subscription for. - /// Provisioning State of the Marketplace Subscription. - /// A new instance for mocking. - public static MarketplaceSubscriptionProperties MarketplaceSubscriptionProperties(MarketplacePlan marketplacePlan = null, MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = null, string modelId = null, MarketplaceSubscriptionProvisioningState? provisioningState = null) + /// Initializes a new instance of . + /// Authentication type of the connection target. + /// Category of the connection. + /// + /// + /// Group based on connection category. + /// + /// + /// Store user metadata for this connection. + /// + /// Value details of the workspace connection. + /// format for the workspace connection value. + /// A new instance for mocking. + public static MachineLearningWorkspaceConnectionProperties MachineLearningWorkspaceConnectionProperties(string authType = null, MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, string target = null, IDictionary metadata = null, IEnumerable sharedUserList = null, string value = null, MachineLearningValueFormat? valueFormat = null) { - return new MarketplaceSubscriptionProperties(marketplacePlan, marketplaceSubscriptionStatus, modelId, provisioningState, serializedAdditionalRawData: null); + metadata ??= new Dictionary(); + sharedUserList ??= new List(); + + return new UnknownWorkspaceConnectionPropertiesV2( + authType == null ? default : new MachineLearningConnectionAuthType(authType), + category, + createdByWorkspaceArmId, + expiryOn, + group, + isSharedToAll, + target, + metadata, + sharedUserList?.ToList(), + value, + valueFormat, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The identifying name of the Offer of the Marketplace Plan. - /// The identifying name of the Plan of the Marketplace Plan. - /// The identifying name of the Publisher of the Marketplace Plan. - /// A new instance for mocking. - public static MarketplacePlan MarketplacePlan(string offerId = null, string planId = null, string publisherId = null) + /// Initializes a new instance of . + /// + /// A new instance for mocking. + public static MachineLearningFqdnEndpoints MachineLearningFqdnEndpoints(MachineLearningFqdnEndpointsProperties properties = null) { - return new MarketplacePlan(offerId, planId, publisherId, serializedAdditionalRawData: null); + return new MachineLearningFqdnEndpoints(properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// + /// + /// A new instance for mocking. + public static MachineLearningFqdnEndpointsProperties MachineLearningFqdnEndpointsProperties(string category = null, IEnumerable endpoints = null) + { + endpoints ??= new List(); + + return new MachineLearningFqdnEndpointsProperties(category, endpoints?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// + /// A new instance for mocking. + public static MachineLearningFqdnEndpoint MachineLearningFqdnEndpoint(string domainName = null, IEnumerable endpointDetails = null) + { + endpointDetails ??= new List(); + + return new MachineLearningFqdnEndpoint(domainName, endpointDetails?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// A new instance for mocking. + public static MachineLearningFqdnEndpointDetail MachineLearningFqdnEndpointDetail(int? port = null) + { + return new MachineLearningFqdnEndpointDetail(port, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Outbound Rule for the managed network of a machine learning workspace. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// A new instance for mocking. + public static MachineLearningOutboundRuleBasicData MachineLearningOutboundRuleBasicData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningOutboundRule properties = null) + { + return new MachineLearningOutboundRuleBasicData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningModelContainerData MachineLearningModelContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningModelContainerProperties properties = null) + /// A new instance for mocking. + public static MachineLearningCodeContainerData MachineLearningCodeContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningCodeContainerProperties properties = null) { - return new MachineLearningModelContainerData( + return new MachineLearningCodeContainerData( id, name, resourceType, @@ -717,24 +710,24 @@ public static MachineLearningModelContainerData MachineLearningModelContainerDat serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. - /// Provisioning state for the model container. - /// A new instance for mocking. - public static MachineLearningModelContainerProperties MachineLearningModelContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) + /// Provisioning state for the code container. + /// A new instance for mocking. + public static MachineLearningCodeContainerProperties MachineLearningCodeContainerProperties(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) { - properties ??= new Dictionary(); tags ??= new Dictionary(); + properties ??= new Dictionary(); - return new MachineLearningModelContainerProperties( + return new MachineLearningCodeContainerProperties( description, - properties, tags, + properties, serializedAdditionalRawData: null, isArchived, latestVersion, @@ -742,255 +735,152 @@ public static MachineLearningModelContainerProperties MachineLearningModelContai provisioningState); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningModelVersionData MachineLearningModelVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningModelVersionProperties properties = null) - { - return new MachineLearningModelVersionData( - id, - name, - resourceType, - systemData, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . + /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). + /// The asset property dictionary. /// Is the asset archived?. - /// Mapping of model flavors to their properties. - /// Name of the training job which produced this model. - /// The storage format for this entity. Used for NCD. - /// The URI path to the model contents. - /// Provisioning state for the model version. - /// Stage in the model lifecycle assigned to this model. - /// A new instance for mocking. - public static MachineLearningModelVersionProperties MachineLearningModelVersionProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isAnonymous = null, bool? isArchived = null, IDictionary flavors = null, string jobName = null, string modelType = null, Uri modelUri = null, RegistryAssetProvisioningState? provisioningState = null, string stage = null) + /// The latest version inside this container. + /// The next auto incremental version. + /// A new instance for mocking. + public static MachineLearningAssetContainer MachineLearningAssetContainer(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null) { - properties ??= new Dictionary(); tags ??= new Dictionary(); - flavors ??= new Dictionary(); + properties ??= new Dictionary(); - return new MachineLearningModelVersionProperties( + return new MachineLearningAssetContainer( description, - properties, tags, + properties, serializedAdditionalRawData: null, - isAnonymous, isArchived, - flavors, - jobName, - modelType, - modelUri, - provisioningState, - stage); + latestVersion, + nextVersion); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. /// [Required] Additional attributes of the entity. - /// Sku details required for ARM contract for Autoscaling. - /// A new instance for mocking. - public static MachineLearningBatchEndpointData MachineLearningBatchEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningBatchEndpointProperties properties = null, MachineLearningSku sku = null) + /// A new instance for mocking. + public static MachineLearningCodeVersionData MachineLearningCodeVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningCodeVersionProperties properties = null) { - tags ??= new Dictionary(); - - return new MachineLearningBatchEndpointData( + return new MachineLearningCodeVersionData( id, name, resourceType, systemData, - tags, - location, - identity, - kind, properties, - sku, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - /// Description of the inference endpoint. - /// - /// EndpointAuthKeys to set initially on an Endpoint. - /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. - /// - /// Property dictionary. Properties can be added, but not removed or altered. - /// Endpoint URI. - /// Endpoint Swagger URI. - /// Default values for Batch Endpoint. - /// Provisioning state for the endpoint. - /// A new instance for mocking. - public static MachineLearningBatchEndpointProperties MachineLearningBatchEndpointProperties(MachineLearningEndpointAuthMode authMode = default, string description = null, MachineLearningEndpointAuthKeys keys = null, IDictionary properties = null, Uri scoringUri = null, Uri swaggerUri = null, string defaultsDeploymentName = null, MachineLearningEndpointProvisioningState? provisioningState = null) + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Is the asset archived?. + /// If the name version are system generated (anonymous registration). + /// Uri where code is located. + /// Provisioning state for the code version. + /// A new instance for mocking. + public static MachineLearningCodeVersionProperties MachineLearningCodeVersionProperties(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, bool? isAnonymous = null, Uri codeUri = null, RegistryAssetProvisioningState? provisioningState = null) { + tags ??= new Dictionary(); properties ??= new Dictionary(); - return new MachineLearningBatchEndpointProperties( - authMode, + return new MachineLearningCodeVersionProperties( description, - keys, + tags, properties, - scoringUri, - swaggerUri, serializedAdditionalRawData: null, - defaultsDeploymentName != null ? new BatchEndpointDefaults(defaultsDeploymentName, serializedAdditionalRawData: null) : null, + isArchived, + isAnonymous, + codeUri, provisioningState); } - /// Initializes a new instance of . - /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - /// Description of the inference endpoint. - /// - /// EndpointAuthKeys to set initially on an Endpoint. - /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. - /// - /// Property dictionary. Properties can be added, but not removed or altered. - /// Endpoint URI. - /// Endpoint Swagger URI. - /// A new instance for mocking. - public static MachineLearningEndpointProperties MachineLearningEndpointProperties(MachineLearningEndpointAuthMode authMode = default, string description = null, MachineLearningEndpointAuthKeys keys = null, IDictionary properties = null, Uri scoringUri = null, Uri swaggerUri = null) + /// Initializes a new instance of . + /// Container level read, write, list SAS. + /// ID for this upload request. + /// TemporaryBlobReference is the only supported type. + /// A new instance for mocking. + public static PendingUploadResponseDto PendingUploadResponseDto(BlobReferenceForConsumptionDto blobReferenceForConsumption = null, string pendingUploadId = null, PendingUploadType? pendingUploadType = null) { - properties ??= new Dictionary(); + return new PendingUploadResponseDto(blobReferenceForConsumption, pendingUploadId, pendingUploadType, serializedAdditionalRawData: null); + } - return new MachineLearningEndpointProperties( - authMode, - description, - keys, - properties, - scoringUri, - swaggerUri, - serializedAdditionalRawData: null); + /// Initializes a new instance of . + /// + /// Blob URI path for client to upload data. + /// Example: https://blob.windows.core.net/Container/Path + /// + /// Arm ID of the storage account to use. + /// + /// Credential info to access storage account + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// A new instance for mocking. + public static BlobReferenceForConsumptionDto BlobReferenceForConsumptionDto(Uri blobUri = null, ResourceIdentifier storageAccountArmId = null, PendingUploadCredentialDto credential = null) + { + return new BlobReferenceForConsumptionDto(blobUri, storageAccountArmId, credential, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. /// [Required] Additional attributes of the entity. - /// Sku details required for ARM contract for Autoscaling. - /// A new instance for mocking. - public static MachineLearningBatchDeploymentData MachineLearningBatchDeploymentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningBatchDeploymentProperties properties = null, MachineLearningSku sku = null) + /// A new instance for mocking. + public static MachineLearningComponentContainerData MachineLearningComponentContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningComponentContainerProperties properties = null) { - tags ??= new Dictionary(); - - return new MachineLearningBatchDeploymentData( + return new MachineLearningComponentContainerData( id, name, resourceType, systemData, - tags, - location, - identity, - kind, properties, - sku, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Code configuration for the endpoint deployment. - /// Description of the endpoint deployment. - /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. - /// Environment variables configuration for the deployment. - /// Property dictionary. Properties can be added, but not removed or altered. - /// Compute target for batch inference operation. - /// - /// Properties relevant to different deployment types. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - /// - /// Error threshold, if the error count for the entire input goes above this value, - /// the batch inference will be aborted. Range is [-1, int.MaxValue]. - /// For FileDataset, this value is the count of file failures. - /// For TabularDataset, this value is the count of record failures. - /// If set to -1 (the lower bound), all failures during batch inference will be ignored. - /// - /// Logging level for batch inference operation. - /// Indicates maximum number of parallelism per instance. - /// - /// Size of the mini-batch passed to each batch invocation. - /// For FileDataset, this is the number of files per mini-batch. - /// For TabularDataset, this is the size of the records in bytes, per mini-batch. - /// - /// - /// Reference to the model asset for the endpoint deployment. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// Indicates how the output will be organized. - /// Customized output file name for append_row output action. - /// Provisioning state for the endpoint deployment. - /// - /// Indicates compute configuration for the job. - /// If not provided, will default to the defaults defined in ResourceConfiguration. - /// - /// - /// Retry Settings for the batch inference operation. - /// If not provided, will default to the defaults defined in BatchRetrySettings. - /// - /// A new instance for mocking. - public static MachineLearningBatchDeploymentProperties MachineLearningBatchDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary properties = null, string compute = null, BatchDeploymentConfiguration deploymentConfiguration = null, int? errorThreshold = null, MachineLearningBatchLoggingLevel? loggingLevel = null, int? maxConcurrencyPerInstance = null, long? miniBatchSize = null, MachineLearningAssetReferenceBase model = null, MachineLearningBatchOutputAction? outputAction = null, string outputFileName = null, MachineLearningDeploymentProvisioningState? provisioningState = null, MachineLearningDeploymentResourceConfiguration resources = null, MachineLearningBatchRetrySettings retrySettings = null) + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Is the asset archived?. + /// The latest version inside this container. + /// The next auto incremental version. + /// Provisioning state for the component container. + /// A new instance for mocking. + public static MachineLearningComponentContainerProperties MachineLearningComponentContainerProperties(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) { - environmentVariables ??= new Dictionary(); + tags ??= new Dictionary(); properties ??= new Dictionary(); - return new MachineLearningBatchDeploymentProperties( - codeConfiguration, + return new MachineLearningComponentContainerProperties( description, - environmentId, - environmentVariables, + tags, properties, serializedAdditionalRawData: null, - compute, - deploymentConfiguration, - errorThreshold, - loggingLevel, - maxConcurrencyPerInstance, - miniBatchSize, - model, - outputAction, - outputFileName, - provisioningState, - resources, - retrySettings); + isArchived, + latestVersion, + nextVersion, + provisioningState); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// [Required] Additional attributes of the entity. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// A new instance for mocking. - public static MachineLearningDatastoreData MachineLearningDatastoreData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningDatastoreProperties properties = null) + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningComponentVersionData MachineLearningComponentVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningComponentVersionProperties properties = null) { - return new MachineLearningDatastoreData( + return new MachineLearningComponentVersionData( id, name, resourceType, @@ -999,43 +889,44 @@ public static MachineLearningDatastoreData MachineLearningDatastoreData(Resource serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// - /// [Required] Account credentials. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// The asset property dictionary. + /// Is the asset archived?. + /// If the name version are system generated (anonymous registration). + /// + /// Defines Component definition details. + /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" /> /// - /// [Required] Storage type backing the datastore. - /// Readonly property to indicate if datastore is the workspace default datastore. - /// A new instance for mocking. - public static MachineLearningDatastoreProperties MachineLearningDatastoreProperties(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, string datastoreType = null, bool? isDefault = null) + /// Provisioning state for the component version. + /// A new instance for mocking. + public static MachineLearningComponentVersionProperties MachineLearningComponentVersionProperties(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, bool? isAnonymous = null, BinaryData componentSpec = null, RegistryAssetProvisioningState? provisioningState = null) { - properties ??= new Dictionary(); tags ??= new Dictionary(); + properties ??= new Dictionary(); - return new MachineLearningDatastoreProperties( + return new MachineLearningComponentVersionProperties( description, - properties, tags, + properties, serializedAdditionalRawData: null, - credentials, - datastoreType == null ? default : new DatastoreType(datastoreType), - isDefault); + isArchived, + isAnonymous, + componentSpec, + provisioningState); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningFeatureSetContainerData MachineLearningFeatureSetContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureSetContainerProperties properties = null) + /// A new instance for mocking. + public static MachineLearningDataContainerData MachineLearningDataContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningDataContainerProperties properties = null) { - return new MachineLearningFeatureSetContainerData( + return new MachineLearningDataContainerData( id, name, resourceType, @@ -1044,41 +935,45 @@ public static MachineLearningFeatureSetContainerData MachineLearningFeatureSetCo serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. - /// Provisioning state for the featureset container. - /// A new instance for mocking. - public static MachineLearningFeatureSetContainerProperties MachineLearningFeatureSetContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) + /// [Required] Specifies the type of data. + /// A new instance for mocking. + public static MachineLearningDataContainerProperties MachineLearningDataContainerProperties(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, MachineLearningDataType dataType = default) { - properties ??= new Dictionary(); tags ??= new Dictionary(); + properties ??= new Dictionary(); - return new MachineLearningFeatureSetContainerProperties( + return new MachineLearningDataContainerProperties( description, - properties, tags, + properties, serializedAdditionalRawData: null, isArchived, latestVersion, nextVersion, - provisioningState); + dataType); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningFeatureData MachineLearningFeatureData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureProperties properties = null) + /// + /// [Required] Additional attributes of the entity. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// A new instance for mocking. + public static MachineLearningDataVersionData MachineLearningDataVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningDataVersionProperties properties = null) { - return new MachineLearningFeatureData( + return new MachineLearningDataVersionData( id, name, resourceType, @@ -1087,16 +982,38 @@ public static MachineLearningFeatureData MachineLearningFeatureData(ResourceIden serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// Blob reference for consumption details. + /// A new instance for mocking. + public static GetBlobReferenceSasResponseDto GetBlobReferenceSasResponseDto(GetBlobReferenceForConsumptionDto blobReferenceForConsumption = null) + { + return new GetBlobReferenceSasResponseDto(blobReferenceForConsumption, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Blob uri, example: https://blob.windows.core.net/Container/Path. + /// The ARM id of the storage account. + /// + /// Credential info to access storage account + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + /// A new instance for mocking. + public static GetBlobReferenceForConsumptionDto GetBlobReferenceForConsumptionDto(Uri blobUri = null, string storageAccountArmId = null, DataReferenceCredential credential = null) + { + return new GetBlobReferenceForConsumptionDto(blobUri, storageAccountArmId, credential, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningFeatureSetVersionData MachineLearningFeatureSetVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureSetVersionProperties properties = null) + /// A new instance for mocking. + public static MachineLearningEnvironmentContainerData MachineLearningEnvironmentContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningEnvironmentContainerProperties properties = null) { - return new MachineLearningFeatureSetVersionData( + return new MachineLearningEnvironmentContainerData( id, name, resourceType, @@ -1105,58 +1022,41 @@ public static MachineLearningFeatureSetVersionData MachineLearningFeatureSetVers serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). + /// The asset property dictionary. /// Is the asset archived?. - /// Specifies list of entities. - /// Specifies the materialization settings. - /// Provisioning state for the featureset version container. - /// Specifies the feature spec details. - /// Specifies the asset stage. - /// A new instance for mocking. - public static MachineLearningFeatureSetVersionProperties MachineLearningFeatureSetVersionProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isAnonymous = null, bool? isArchived = null, IEnumerable entities = null, MaterializationSettings materializationSettings = null, RegistryAssetProvisioningState? provisioningState = null, string specificationPath = null, string stage = null) + /// The latest version inside this container. + /// The next auto incremental version. + /// Provisioning state for the environment container. + /// A new instance for mocking. + public static MachineLearningEnvironmentContainerProperties MachineLearningEnvironmentContainerProperties(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) { - properties ??= new Dictionary(); tags ??= new Dictionary(); - entities ??= new List(); + properties ??= new Dictionary(); - return new MachineLearningFeatureSetVersionProperties( + return new MachineLearningEnvironmentContainerProperties( description, - properties, tags, + properties, serializedAdditionalRawData: null, - isAnonymous, isArchived, - entities?.ToList(), - materializationSettings, - provisioningState, - specificationPath != null ? new FeaturesetSpecification(specificationPath, serializedAdditionalRawData: null) : null, - stage); - } - - /// Initializes a new instance of . - /// List of jobs submitted as part of the backfill request. - /// A new instance for mocking. - public static FeaturesetVersionBackfillResponse FeaturesetVersionBackfillResponse(IEnumerable jobIds = null) - { - jobIds ??= new List(); - - return new FeaturesetVersionBackfillResponse(jobIds?.ToList(), serializedAdditionalRawData: null); + latestVersion, + nextVersion, + provisioningState); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningFeatureStoreEntityContainerData MachineLearningFeatureStoreEntityContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureStoreEntityContainerProperties properties = null) + /// A new instance for mocking. + public static MachineLearningEnvironmentVersionData MachineLearningEnvironmentVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningEnvironmentVersionProperties properties = null) { - return new MachineLearningFeatureStoreEntityContainerData( + return new MachineLearningEnvironmentVersionData( id, name, resourceType, @@ -1165,41 +1065,64 @@ public static MachineLearningFeatureStoreEntityContainerData MachineLearningFeat serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Is the asset archived?. - /// The latest version inside this container. - /// The next auto incremental version. - /// Provisioning state for the featurestore entity container. - /// A new instance for mocking. - public static MachineLearningFeatureStoreEntityContainerProperties MachineLearningFeatureStoreEntityContainerProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) + /// If the name version are system generated (anonymous registration). + /// + /// Environment type is either user managed or curated by the Azure ML service + /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/resource-curated-environments" /> + /// + /// + /// Name of the image that will be used for the environment. + /// <seealso href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" /> + /// + /// + /// Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and C/C++ packages. + /// <see href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" /> + /// + /// Configuration settings for Docker build context. + /// The OS type of the environment. + /// Defines configuration specific to inference. + /// Defines if image needs to be rebuilt based on base image changes. + /// Provisioning state for the environment version. + /// Stage in the environment lifecycle assigned to this environment. + /// A new instance for mocking. + public static MachineLearningEnvironmentVersionProperties MachineLearningEnvironmentVersionProperties(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, bool? isAnonymous = null, MachineLearningEnvironmentType? environmentType = null, string image = null, string condaFile = null, MachineLearningBuildContext build = null, MachineLearningOperatingSystemType? osType = null, MachineLearningInferenceContainerProperties inferenceConfig = null, AutoRebuildSetting? autoRebuild = null, RegistryAssetProvisioningState? provisioningState = null, string stage = null) { - properties ??= new Dictionary(); tags ??= new Dictionary(); + properties ??= new Dictionary(); - return new MachineLearningFeatureStoreEntityContainerProperties( + return new MachineLearningEnvironmentVersionProperties( description, - properties, tags, + properties, serializedAdditionalRawData: null, isArchived, - latestVersion, - nextVersion, - provisioningState); + isAnonymous, + environmentType, + image, + condaFile, + build, + osType, + inferenceConfig, + autoRebuild, + provisioningState, + stage); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningFeaturestoreEntityVersionData MachineLearningFeaturestoreEntityVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureStoreEntityVersionProperties properties = null) + /// A new instance for mocking. + public static MachineLearningModelContainerData MachineLearningModelContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningModelContainerProperties properties = null) { - return new MachineLearningFeaturestoreEntityVersionData( + return new MachineLearningModelContainerData( id, name, resourceType, @@ -1208,48 +1131,41 @@ public static MachineLearningFeaturestoreEntityVersionData MachineLearningFeatur serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// If the name version are system generated (anonymous registration). + /// The asset property dictionary. /// Is the asset archived?. - /// Specifies index columns. - /// Provisioning state for the featurestore entity version. - /// Specifies the asset stage. - /// A new instance for mocking. - public static MachineLearningFeatureStoreEntityVersionProperties MachineLearningFeatureStoreEntityVersionProperties(string description = null, IDictionary properties = null, IDictionary tags = null, bool? isAnonymous = null, bool? isArchived = null, IEnumerable indexColumns = null, RegistryAssetProvisioningState? provisioningState = null, string stage = null) + /// The latest version inside this container. + /// The next auto incremental version. + /// Provisioning state for the model container. + /// A new instance for mocking. + public static MachineLearningModelContainerProperties MachineLearningModelContainerProperties(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) { - properties ??= new Dictionary(); tags ??= new Dictionary(); - indexColumns ??= new List(); + properties ??= new Dictionary(); - return new MachineLearningFeatureStoreEntityVersionProperties( + return new MachineLearningModelContainerProperties( description, - properties, tags, + properties, serializedAdditionalRawData: null, - isAnonymous, isArchived, - indexColumns?.ToList(), - provisioningState, - stage); + latestVersion, + nextVersion, + provisioningState); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// [Required] Additional attributes of the entity. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - /// A new instance for mocking. - public static MachineLearningJobData MachineLearningJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningJobProperties properties = null) + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningModelVersionData MachineLearningModelVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningModelVersionProperties properties = null) { - return new MachineLearningJobData( + return new MachineLearningModelVersionData( id, name, resourceType, @@ -1258,305 +1174,282 @@ public static MachineLearningJobData MachineLearningJobData(ResourceIdentifier i serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. - /// Display name of job. - /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - /// - /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. - /// Defaults to AmlToken if null. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// + /// The asset property dictionary. /// Is the asset archived?. - /// [Required] Specifies the type of job. - /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. - /// A new instance for mocking. - public static MachineLearningJobProperties MachineLearningJobProperties(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, string jobType = null, NotificationSetting notificationSetting = null, IDictionary services = null, MachineLearningJobStatus? status = null) + /// If the name version are system generated (anonymous registration). + /// Mapping of model flavors to their properties. + /// The storage format for this entity. Used for NCD. + /// The URI path to the model contents. + /// Name of the training job which produced this model. + /// Provisioning state for the model version. + /// Stage in the model lifecycle assigned to this model. + /// A new instance for mocking. + public static MachineLearningModelVersionProperties MachineLearningModelVersionProperties(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, bool? isAnonymous = null, IDictionary flavors = null, string modelType = null, Uri modelUri = null, string jobName = null, RegistryAssetProvisioningState? provisioningState = null, string stage = null) { - properties ??= new Dictionary(); tags ??= new Dictionary(); - services ??= new Dictionary(); + properties ??= new Dictionary(); + flavors ??= new Dictionary(); - return new MachineLearningJobProperties( + return new MachineLearningModelVersionProperties( description, - properties, tags, + properties, serializedAdditionalRawData: null, - componentId, - computeId, - displayName, - experimentName, - identity, isArchived, - jobType == null ? default : new JobType(jobType), - notificationSetting, - services, - status); - } - - /// Initializes a new instance of . - /// Url for endpoint. - /// Any error in the service. - /// Endpoint type. - /// - /// Nodes that user would like to start the service on. - /// If Nodes is not set or set to null, the service will only be started on leader node. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - /// Port for endpoint. - /// Additional properties to set on the endpoint. - /// Status of endpoint. - /// A new instance for mocking. - public static MachineLearningJobService MachineLearningJobService(string endpoint = null, string errorMessage = null, string jobServiceType = null, JobNodes nodes = null, int? port = null, IDictionary properties = null, string status = null) - { - properties ??= new Dictionary(); - - return new MachineLearningJobService( - endpoint, - errorMessage, - jobServiceType, - nodes, - port, - properties, - status, - serializedAdditionalRawData: null); + isAnonymous, + flavors, + modelType, + modelUri, + jobName, + provisioningState, + stage); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. /// [Required] Additional attributes of the entity. + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Managed service identity (system assigned and/or user assigned identities). /// Sku details required for ARM contract for Autoscaling. - /// A new instance for mocking. - public static MachineLearningOnlineEndpointData MachineLearningOnlineEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningOnlineEndpointProperties properties = null, MachineLearningSku sku = null) + /// A new instance for mocking. + public static MachineLearningBatchEndpointData MachineLearningBatchEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, MachineLearningBatchEndpointProperties properties = null, string kind = null, ManagedServiceIdentity identity = null, MachineLearningSku sku = null) { tags ??= new Dictionary(); - return new MachineLearningOnlineEndpointData( + return new MachineLearningBatchEndpointData( id, name, resourceType, systemData, tags, location, - identity, - kind, properties, + kind, + identity, sku, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + /// Initializes a new instance of . /// Description of the inference endpoint. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Endpoint URI. + /// Endpoint Swagger URI. + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. /// /// EndpointAuthKeys to set initially on an Endpoint. /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. /// + /// Default values for Batch Endpoint. + /// Provisioning state for the endpoint. + /// A new instance for mocking. + public static MachineLearningBatchEndpointProperties MachineLearningBatchEndpointProperties(string description = null, IDictionary properties = null, Uri scoringUri = null, Uri swaggerUri = null, MachineLearningEndpointAuthMode authMode = default, MachineLearningEndpointAuthKeys keys = null, string defaultsDeploymentName = null, MachineLearningEndpointProvisioningState? provisioningState = null) + { + properties ??= new Dictionary(); + + return new MachineLearningBatchEndpointProperties( + description, + properties, + scoringUri, + swaggerUri, + authMode, + keys, + serializedAdditionalRawData: null, + defaultsDeploymentName != null ? new BatchEndpointDefaults(defaultsDeploymentName, serializedAdditionalRawData: null) : null, + provisioningState); + } + + /// Initializes a new instance of . + /// Description of the inference endpoint. /// Property dictionary. Properties can be added, but not removed or altered. /// Endpoint URI. /// Endpoint Swagger URI. - /// - /// ARM resource ID of the compute if it exists. - /// optional + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + /// + /// EndpointAuthKeys to set initially on an Endpoint. + /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. /// - /// Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50. - /// Provisioning state for the endpoint. - /// Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. - /// Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. - /// A new instance for mocking. - public static MachineLearningOnlineEndpointProperties MachineLearningOnlineEndpointProperties(MachineLearningEndpointAuthMode authMode = default, string description = null, MachineLearningEndpointAuthKeys keys = null, IDictionary properties = null, Uri scoringUri = null, Uri swaggerUri = null, string compute = null, IDictionary mirrorTraffic = null, MachineLearningEndpointProvisioningState? provisioningState = null, MachineLearningPublicNetworkAccessType? publicNetworkAccess = null, IDictionary traffic = null) + /// A new instance for mocking. + public static MachineLearningEndpointProperties MachineLearningEndpointProperties(string description = null, IDictionary properties = null, Uri scoringUri = null, Uri swaggerUri = null, MachineLearningEndpointAuthMode authMode = default, MachineLearningEndpointAuthKeys keys = null) { properties ??= new Dictionary(); - mirrorTraffic ??= new Dictionary(); - traffic ??= new Dictionary(); - return new MachineLearningOnlineEndpointProperties( - authMode, + return new MachineLearningEndpointProperties( description, - keys, properties, scoringUri, swaggerUri, - serializedAdditionalRawData: null, - compute, - mirrorTraffic, - provisioningState, - publicNetworkAccess, - traffic); + authMode, + keys, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// Managed service identity (system assigned and/or user assigned identities). + /// [Required] Additional attributes of the entity. /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - /// - /// [Required] Additional attributes of the entity. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// + /// Managed service identity (system assigned and/or user assigned identities). /// Sku details required for ARM contract for Autoscaling. - /// A new instance for mocking. - public static MachineLearningOnlineDeploymentData MachineLearningOnlineDeploymentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningOnlineDeploymentProperties properties = null, MachineLearningSku sku = null) + /// A new instance for mocking. + public static MachineLearningBatchDeploymentData MachineLearningBatchDeploymentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, MachineLearningBatchDeploymentProperties properties = null, string kind = null, ManagedServiceIdentity identity = null, MachineLearningSku sku = null) { tags ??= new Dictionary(); - return new MachineLearningOnlineDeploymentData( + return new MachineLearningBatchDeploymentData( id, name, resourceType, systemData, tags, location, - identity, - kind, properties, + kind, + identity, sku, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Code configuration for the endpoint deployment. + /// Initializes a new instance of . /// Description of the endpoint deployment. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Code configuration for the endpoint deployment. /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. - /// Property dictionary. Properties can be added, but not removed or altered. - /// If true, enables Application Insights logging. - /// The mdc configuration, we disable mdc when it's null. - /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. - /// [Required] The compute type of the endpoint. - /// Compute instance type. - /// Liveness probe monitors the health of the container regularly. - /// The URI path to the model. - /// The path to mount the model in custom container. - /// Provisioning state for the endpoint deployment. - /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. - /// Request settings for the deployment. - /// - /// Scale settings for the deployment. - /// If it is null or not provided, - /// it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - /// and to DefaultScaleSettings for ManagedOnlineDeployment. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// Compute target for batch inference operation. + /// + /// Properties relevant to different deployment types. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . /// - /// A new instance for mocking. - public static MachineLearningOnlineDeploymentProperties MachineLearningOnlineDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary properties = null, bool? appInsightsEnabled = null, DataCollector dataCollector = null, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = null, string endpointComputeType = null, string instanceType = null, MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, MachineLearningDeploymentProvisioningState? provisioningState = null, MachineLearningProbeSettings readinessProbe = null, MachineLearningOnlineRequestSettings requestSettings = null, MachineLearningOnlineScaleSettings scaleSettings = null) + /// + /// Error threshold, if the error count for the entire input goes above this value, + /// the batch inference will be aborted. Range is [-1, int.MaxValue]. + /// For FileDataset, this value is the count of file failures. + /// For TabularDataset, this value is the count of record failures. + /// If set to -1 (the lower bound), all failures during batch inference will be ignored. + /// + /// + /// Retry Settings for the batch inference operation. + /// If not provided, will default to the defaults defined in BatchRetrySettings. + /// + /// + /// Size of the mini-batch passed to each batch invocation. + /// For FileDataset, this is the number of files per mini-batch. + /// For TabularDataset, this is the size of the records in bytes, per mini-batch. + /// + /// Logging level for batch inference operation. + /// + /// Reference to the model asset for the endpoint deployment. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Indicates maximum number of parallelism per instance. + /// Indicates how the output will be organized. + /// Customized output file name for append_row output action. + /// + /// Indicates compute configuration for the job. + /// If not provided, will default to the defaults defined in ResourceConfiguration. + /// + /// Provisioning state for the endpoint deployment. + /// A new instance for mocking. + public static MachineLearningBatchDeploymentProperties MachineLearningBatchDeploymentProperties(string description = null, IDictionary properties = null, MachineLearningCodeConfiguration codeConfiguration = null, string environmentId = null, IDictionary environmentVariables = null, string compute = null, BatchDeploymentConfiguration deploymentConfiguration = null, int? errorThreshold = null, MachineLearningBatchRetrySettings retrySettings = null, long? miniBatchSize = null, MachineLearningBatchLoggingLevel? loggingLevel = null, MachineLearningAssetReferenceBase model = null, int? maxConcurrencyPerInstance = null, MachineLearningBatchOutputAction? outputAction = null, string outputFileName = null, MachineLearningDeploymentResourceConfiguration resources = null, MachineLearningDeploymentProvisioningState? provisioningState = null) { - environmentVariables ??= new Dictionary(); properties ??= new Dictionary(); + environmentVariables ??= new Dictionary(); - return new MachineLearningOnlineDeploymentProperties( - codeConfiguration, + return new MachineLearningBatchDeploymentProperties( description, + properties, + codeConfiguration, environmentId, environmentVariables, - properties, serializedAdditionalRawData: null, - appInsightsEnabled, - dataCollector, - egressPublicNetworkAccess, - endpointComputeType == null ? default : new MachineLearningEndpointComputeType(endpointComputeType), - instanceType, - livenessProbe, + compute, + deploymentConfiguration, + errorThreshold, + retrySettings, + miniBatchSize, + loggingLevel, model, - modelMountPath, - provisioningState, - readinessProbe, - requestSettings, - scaleSettings); + maxConcurrencyPerInstance, + outputAction, + outputFileName, + resources, + provisioningState); } - /// Initializes a new instance of . - /// The retrieved online deployment logs. - /// A new instance for mocking. - public static MachineLearningDeploymentLogs MachineLearningDeploymentLogs(string content = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// A new instance for mocking. + public static MachineLearningDatastoreData MachineLearningDatastoreData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningDatastoreProperties properties = null) { - return new MachineLearningDeploymentLogs(content, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Gets or sets the Sku Capacity. - /// The resource type name. - /// Gets or sets the Sku. - /// A new instance for mocking. - public static MachineLearningSkuDetail MachineLearningSkuDetail(MachineLearningSkuCapacity capacity = null, string resourceType = null, MachineLearningSkuSetting sku = null) - { - return new MachineLearningSkuDetail(capacity, resourceType, sku, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Gets or sets the default capacity. - /// Gets or sets the maximum. - /// Gets or sets the minimum. - /// Gets or sets the type of the scale. - /// A new instance for mocking. - public static MachineLearningSkuCapacity MachineLearningSkuCapacity(int? @default = null, int? maximum = null, int? minimum = null, MachineLearningSkuScaleType? scaleType = null) - { - return new MachineLearningSkuCapacity(@default, maximum, minimum, scaleType, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - /// A new instance for mocking. - public static MachineLearningSkuSetting MachineLearningSkuSetting(string name = null, MachineLearningSkuTier? tier = null) - { - return new MachineLearningSkuSetting(name, tier, serializedAdditionalRawData: null); + return new MachineLearningDatastoreData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// [Required] Specification for which type of key to generate. Primary or Secondary. - /// The value the key is set to. - /// A new instance for mocking. - public static MachineLearningEndpointKeyRegenerateContent MachineLearningEndpointKeyRegenerateContent(MachineLearningKeyType keyType = default, string keyValue = null) + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// [Required] Storage type backing the datastore. + /// Readonly property to indicate if datastore is the workspace default datastore. + /// + /// [Required] Account credentials. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// A new instance for mocking. + public static MachineLearningDatastoreProperties MachineLearningDatastoreProperties(string description = null, IDictionary tags = null, IDictionary properties = null, string datastoreType = null, bool? isDefault = null, MachineLearningDatastoreCredentials credentials = null) { - return new MachineLearningEndpointKeyRegenerateContent(keyType, keyValue, serializedAdditionalRawData: null); - } + tags ??= new Dictionary(); + properties ??= new Dictionary(); - /// Initializes a new instance of . - /// Access token for endpoint authentication. - /// Access token expiry time (UTC). - /// Refresh access token after time (UTC). - /// Access token type. - /// A new instance for mocking. - public static MachineLearningEndpointAuthToken MachineLearningEndpointAuthToken(string accessToken = null, DateTimeOffset? expireOn = null, DateTimeOffset? refreshOn = null, string tokenType = null) - { - return new MachineLearningEndpointAuthToken(accessToken, expireOn, refreshOn, tokenType, serializedAdditionalRawData: null); + return new MachineLearningDatastoreProperties( + description, + tags, + properties, + serializedAdditionalRawData: null, + datastoreType == null ? default : new DatastoreType(datastoreType), + isDefault, + credentials); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// [Required] Additional attributes of the entity. - /// A new instance for mocking. - public static MachineLearningScheduleData MachineLearningScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningScheduleProperties properties = null) + /// A new instance for mocking. + public static MachineLearningFeatureSetContainerData MachineLearningFeatureSetContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureSetContainerProperties properties = null) { - return new MachineLearningScheduleData( + return new MachineLearningFeatureSetContainerData( id, name, resourceType, @@ -1565,423 +1458,162 @@ public static MachineLearningScheduleData MachineLearningScheduleData(ResourceId serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// - /// [Required] Specifies the action of the schedule - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// Display name of schedule. - /// Is the schedule enabled?. - /// Provisioning state for the schedule. - /// - /// [Required] Specifies the trigger details - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// A new instance for mocking. - public static MachineLearningScheduleProperties MachineLearningScheduleProperties(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningScheduleAction action = null, string displayName = null, bool? isEnabled = null, MachineLearningScheduleProvisioningStatus? provisioningState = null, MachineLearningTriggerBase trigger = null) + /// The asset property dictionary. + /// Is the asset archived?. + /// The latest version inside this container. + /// The next auto incremental version. + /// Provisioning state for the featureset container. + /// A new instance for mocking. + public static MachineLearningFeatureSetContainerProperties MachineLearningFeatureSetContainerProperties(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) { - properties ??= new Dictionary(); tags ??= new Dictionary(); + properties ??= new Dictionary(); - return new MachineLearningScheduleProperties( + return new MachineLearningFeatureSetContainerProperties( description, - properties, tags, + properties, serializedAdditionalRawData: null, - action, - displayName, - isEnabled, - provisioningState, - trigger); + isArchived, + latestVersion, + nextVersion, + provisioningState); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. /// [Required] Additional attributes of the entity. - /// Sku details required for ARM contract for Autoscaling. - /// A new instance for mocking. - public static ServerlessEndpointData ServerlessEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, ServerlessEndpointProperties properties = null, MachineLearningSku sku = null) + /// A new instance for mocking. + public static MachineLearningFeatureData MachineLearningFeatureData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureProperties properties = null) { - tags ??= new Dictionary(); - - return new ServerlessEndpointData( + return new MachineLearningFeatureData( id, name, resourceType, systemData, - tags, - location, - identity, - kind, properties, - sku, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// [Required] Specifies the authentication mode for the Serverless endpoint. - /// Specifies the content safety options. If omitted, the default content safety settings will be configured. - /// The current state of the ServerlessEndpoint. - /// The inference uri to target when making requests against the serverless endpoint. - /// The MarketplaceSubscription Azure ID associated to this ServerlessEndpoint. - /// The model settings (model id) for the model being serviced on the ServerlessEndpoint. - /// Provisioning state for the endpoint. - /// A new instance for mocking. - public static ServerlessEndpointProperties ServerlessEndpointProperties(ServerlessInferenceEndpointAuthMode authMode = default, ContentSafetyStatus? contentSafetyStatus = null, ServerlessEndpointState? endpointState = null, ServerlessInferenceEndpoint inferenceEndpoint = null, string marketplaceSubscriptionId = null, string modelId = null, MachineLearningEndpointProvisioningState? provisioningState = null) - { - return new ServerlessEndpointProperties( - authMode, - contentSafetyStatus.HasValue ? new ContentSafety(contentSafetyStatus.Value, serializedAdditionalRawData: null) : null, - endpointState, - inferenceEndpoint, - marketplaceSubscriptionId, - modelId != null ? new ModelSettings(modelId, serializedAdditionalRawData: null) : null, - provisioningState, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Specifies any required headers to target this serverless endpoint. - /// [Required] The inference uri to target when making requests against the Serverless Endpoint. - /// A new instance for mocking. - public static ServerlessInferenceEndpoint ServerlessInferenceEndpoint(IReadOnlyDictionary headers = null, Uri uri = null) - { - headers ??= new Dictionary(); - - return new ServerlessInferenceEndpoint(headers, uri, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - /// Sku details required for ARM contract for Autoscaling. - /// Discovery URL for the Registry. - /// IntellectualPropertyPublisher for the registry. - /// ResourceId of the managed RG if the registry has system created resources. - /// Managed resource group specific settings. - /// MLFlow Registry URI for the Registry. - /// Private endpoint connections info used for pending connections in private link portal. - /// - /// Is the Registry accessible from the internet? - /// Possible values: "Enabled" or "Disabled" - /// - /// Details of each region the registry is in. - /// A new instance for mocking. - public static MachineLearningRegistryData MachineLearningRegistryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningSku sku = null, Uri discoveryUri = null, string intellectualPropertyPublisher = null, ResourceIdentifier managedResourceId = null, IEnumerable managedResourceGroupAssignedIdentities = null, Uri mlFlowRegistryUri = null, IEnumerable registryPrivateEndpointConnections = null, string publicNetworkAccess = null, IEnumerable regionDetails = null) + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningFeatureSetVersionData MachineLearningFeatureSetVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureSetVersionProperties properties = null) { - tags ??= new Dictionary(); - managedResourceGroupAssignedIdentities ??= new List(); - registryPrivateEndpointConnections ??= new List(); - regionDetails ??= new List(); - - return new MachineLearningRegistryData( + return new MachineLearningFeatureSetVersionData( id, name, resourceType, systemData, - tags, - location, - identity, - kind, - sku, - discoveryUri, - intellectualPropertyPublisher, - managedResourceId != null ? new ArmResourceId(managedResourceId, serializedAdditionalRawData: null) : null, - managedResourceGroupAssignedIdentities != null ? new ManagedResourceGroupSettings(managedResourceGroupAssignedIdentities?.ToList(), serializedAdditionalRawData: null) : null, - mlFlowRegistryUri, - registryPrivateEndpointConnections?.ToList(), - publicNetworkAccess, - regionDetails?.ToList(), + properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Identity principal Id. - /// A new instance for mocking. - public static ManagedResourceGroupAssignedIdentities ManagedResourceGroupAssignedIdentities(Guid? principalId = null) + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Is the asset archived?. + /// If the name version are system generated (anonymous registration). + /// Specifies the feature spec details. + /// Specifies the materialization settings. + /// Specifies the asset stage. + /// Specifies list of entities. + /// Provisioning state for the featureset version container. + /// A new instance for mocking. + public static MachineLearningFeatureSetVersionProperties MachineLearningFeatureSetVersionProperties(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, bool? isAnonymous = null, string specificationPath = null, MaterializationSettings materializationSettings = null, string stage = null, IEnumerable entities = null, RegistryAssetProvisioningState? provisioningState = null) { - return new ManagedResourceGroupAssignedIdentities(principalId, serializedAdditionalRawData: null); - } + tags ??= new Dictionary(); + properties ??= new Dictionary(); + entities ??= new List(); - /// Initializes a new instance of . - /// The ARM identifier for Private Endpoint. - /// The subnetId that the private endpoint is connected to. - /// A new instance for mocking. - public static RegistryPrivateEndpoint RegistryPrivateEndpoint(ResourceIdentifier id = null, ResourceIdentifier subnetArmId = null) - { - return new RegistryPrivateEndpoint(id, serializedAdditionalRawData: null, subnetArmId); + return new MachineLearningFeatureSetVersionProperties( + description, + tags, + properties, + serializedAdditionalRawData: null, + isArchived, + isAnonymous, + specificationPath != null ? new FeaturesetSpecification(specificationPath, serializedAdditionalRawData: null) : null, + materializationSettings, + stage, + entities?.ToList(), + provisioningState); } - /// Initializes a new instance of . - /// The ARM identifier for Private Endpoint. - /// A new instance for mocking. - public static PrivateEndpointBase PrivateEndpointBase(ResourceIdentifier id = null) + /// Initializes a new instance of . + /// List of jobs submitted as part of the backfill request. + /// A new instance for mocking. + public static FeaturesetVersionBackfillResponse FeaturesetVersionBackfillResponse(IEnumerable jobIds = null) { - return new PrivateEndpointBase(id, serializedAdditionalRawData: null); - } + jobIds ??= new List(); - /// Initializes a new instance of . - /// Specifies the feature ID. - /// Specifies the feature name. - /// Describes the feature for user experience. - /// A new instance for mocking. - public static MachineLearningUserFeature MachineLearningUserFeature(string id = null, string displayName = null, string description = null) - { - return new MachineLearningUserFeature(id, displayName, description, serializedAdditionalRawData: null); + return new FeaturesetVersionBackfillResponse(jobIds?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The tags. - /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// - /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. - /// The flag to indicate whether to allow public access when behind VNet. - /// The flag to indicate whether we will do role assignment for the workspace MSI on resource group level. - /// ARM id of the application insights associated with this workspace. - /// - /// - /// ARM id of the container registry associated with this workspace. - /// The description of this workspace. - /// Url for the discovery service to identify regional endpoints for machine learning experimentation services. - /// - /// - /// Flag to tell if simplified CMK should be enabled for this workspace. - /// Flag to tell if SoftwareBillOfMaterials should be enabled for this workspace. - /// - /// - /// Settings for feature store type workspace. - /// The friendly name for this workspace. This name in mutable. - /// The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service. - /// - /// The compute name for image build. - /// The list of IPv4 addresses that are allowed to access the workspace. - /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. - /// - /// Managed Network settings for a machine learning workspace. - /// The URI associated with this workspace that machine learning flow must point at to set up tracking. - /// The notebook info of Azure ML workspace. - /// The user assigned identity resource id that represents the workspace identity. - /// The list of private endpoint connections in the workspace. - /// Count of private connections in the workspace. - /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. - /// Whether requests from Public Network are allowed. - /// Settings for serverless compute in a workspace. - /// The service managed resource settings. - /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. - /// The list of shared private link resources in this workspace. - /// Retention time in days after workspace get soft deleted. - /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. - /// - /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. - /// The auth mode used for accessing the system datastores of the workspace. - /// The tenant id associated with this workspace. - /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. - /// WorkspaceHub's configuration object. - /// The immutable id associated with this workspace. - /// A new instance for mocking. - public static MachineLearningWorkspaceData MachineLearningWorkspaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningSku sku = null, bool? allowPublicAccessWhenBehindVnet = null, bool? allowRoleAssignmentOnRG = null, string applicationInsights = null, IEnumerable associatedWorkspaces = null, IEnumerable containerRegistries = null, string containerRegistry = null, string description = null, Uri discoveryUri = null, bool? enableDataIsolation = null, bool? enableServiceSideCMKEncryption = null, bool? enableSimplifiedCmk = null, bool? enableSoftwareBillOfMaterials = null, MachineLearningEncryptionSetting encryption = null, IEnumerable existingWorkspaces = null, FeatureStoreSettings featureStoreSettings = null, string friendlyName = null, bool? isHbiWorkspace = null, ResourceIdentifier hubResourceId = null, string imageBuildCompute = null, IEnumerable ipAllowlist = null, string keyVault = null, IEnumerable keyVaults = null, ManagedNetworkSettings managedNetwork = null, Uri mlFlowTrackingUri = null, MachineLearningNotebookResourceInfo notebookInfo = null, string primaryUserAssignedIdentity = null, IEnumerable privateEndpointConnections = null, int? privateLinkCount = null, MachineLearningProvisioningState? provisioningState = null, MachineLearningPublicNetworkAccessType? publicNetworkAccessType = null, ServerlessComputeSettings serverlessComputeSettings = null, int? cosmosDbCollectionsThroughput = null, string serviceProvisionedResourceGroup = null, IEnumerable sharedPrivateLinkResources = null, int? softDeleteRetentionInDays = null, string storageAccount = null, IEnumerable storageAccounts = null, bool? isStorageHnsEnabled = null, string systemDatastoresAuthMode = null, Guid? tenantId = null, bool? isV1LegacyMode = null, WorkspaceHubConfig workspaceHubConfig = null, string workspaceId = null) + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningFeatureStoreEntityContainerData MachineLearningFeatureStoreEntityContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureStoreEntityContainerProperties properties = null) { - tags ??= new Dictionary(); - associatedWorkspaces ??= new List(); - containerRegistries ??= new List(); - existingWorkspaces ??= new List(); - ipAllowlist ??= new List(); - keyVaults ??= new List(); - privateEndpointConnections ??= new List(); - sharedPrivateLinkResources ??= new List(); - storageAccounts ??= new List(); - - return new MachineLearningWorkspaceData( + return new MachineLearningFeatureStoreEntityContainerData( id, name, resourceType, systemData, - tags, - location, - identity, - kind, - sku, - allowPublicAccessWhenBehindVnet, - allowRoleAssignmentOnRG, - applicationInsights, - associatedWorkspaces?.ToList(), - containerRegistries?.ToList(), - containerRegistry, - description, - discoveryUri, - enableDataIsolation, - enableServiceSideCMKEncryption, - enableSimplifiedCmk, - enableSoftwareBillOfMaterials, - encryption, - existingWorkspaces?.ToList(), - featureStoreSettings, - friendlyName, - isHbiWorkspace, - hubResourceId, - imageBuildCompute, - ipAllowlist?.ToList(), - keyVault, - keyVaults?.ToList(), - managedNetwork, - mlFlowTrackingUri, - notebookInfo, - primaryUserAssignedIdentity, - privateEndpointConnections?.ToList(), - privateLinkCount, - provisioningState, - publicNetworkAccessType, - serverlessComputeSettings, - cosmosDbCollectionsThroughput != null ? new ServiceManagedResourcesSettings(new CosmosDbSettings(cosmosDbCollectionsThroughput, serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null, - serviceProvisionedResourceGroup, - sharedPrivateLinkResources?.ToList(), - softDeleteRetentionInDays, - storageAccount, - storageAccounts?.ToList(), - isStorageHnsEnabled, - systemDatastoresAuthMode, - tenantId, - isV1LegacyMode, - workspaceHubConfig, - workspaceId, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Isolation mode for the managed network of a machine learning workspace. - /// - /// - /// Dictionary of <OutboundRule> - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// Status of the Provisioning for the managed network of a machine learning workspace. - /// - /// A new instance for mocking. - public static ManagedNetworkSettings ManagedNetworkSettings(IsolationMode? isolationMode = null, string networkId = null, IDictionary outboundRules = null, ManagedNetworkProvisionStatus status = null, IEnumerable changeableIsolationModes = null) - { - outboundRules ??= new Dictionary(); - changeableIsolationModes ??= new List(); - - return new ManagedNetworkSettings( - isolationMode, - networkId, - outboundRules, - status, - changeableIsolationModes?.ToList(), + properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Category of a managed network Outbound Rule of a machine learning workspace. - /// - /// Type of a managed network Outbound Rule of a machine learning workspace. - /// Type of a managed network Outbound Rule of a machine learning workspace. - /// A new instance for mocking. - public static MachineLearningOutboundRule MachineLearningOutboundRule(OutboundRuleCategory? category = null, IEnumerable parentRuleNames = null, OutboundRuleStatus? status = null, string outboundRuleType = null) - { - parentRuleNames ??= new List(); - - return new UnknownOutboundRule(category, parentRuleNames?.ToList(), status, outboundRuleType == null ? default : new OutboundRuleType(outboundRuleType), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// - /// The error that occurs when preparing notebook. - /// the data plane resourceId that used to initialize notebook component. - /// A new instance for mocking. - public static MachineLearningNotebookResourceInfo MachineLearningNotebookResourceInfo(string fqdn = null, bool? isPrivateLinkEnabled = null, MachineLearningNotebookPreparationError notebookPreparationError = null, string resourceId = null) - { - return new MachineLearningNotebookResourceInfo(fqdn, isPrivateLinkEnabled, notebookPreparationError, resourceId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// - /// A new instance for mocking. - public static MachineLearningNotebookPreparationError MachineLearningNotebookPreparationError(string errorMessage = null, int? statusCode = null) - { - return new MachineLearningNotebookPreparationError(errorMessage, statusCode, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. - /// The Private Endpoint resource. - /// The connection state. - /// The current provisioning state. - /// A new instance for mocking. - public static MachineLearningPrivateEndpointConnectionData MachineLearningPrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MachineLearningSku sku = null, MachineLearningPrivateEndpoint privateEndpoint = null, MachineLearningPrivateLinkServiceConnectionState connectionState = null, MachineLearningPrivateEndpointConnectionProvisioningState? provisioningState = null) + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Is the asset archived?. + /// The latest version inside this container. + /// The next auto incremental version. + /// Provisioning state for the featurestore entity container. + /// A new instance for mocking. + public static MachineLearningFeatureStoreEntityContainerProperties MachineLearningFeatureStoreEntityContainerProperties(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, string latestVersion = null, string nextVersion = null, RegistryAssetProvisioningState? provisioningState = null) { tags ??= new Dictionary(); + properties ??= new Dictionary(); - return new MachineLearningPrivateEndpointConnectionData( - id, - name, - resourceType, - systemData, + return new MachineLearningFeatureStoreEntityContainerProperties( + description, tags, - location, - identity, - sku, - privateEndpoint, - connectionState, - provisioningState, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// e.g. /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}. - /// The subnetId that the private endpoint is connected to. - /// A new instance for mocking. - public static MachineLearningPrivateEndpoint MachineLearningPrivateEndpoint(ResourceIdentifier id = null, ResourceIdentifier subnetArmId = null) - { - return new MachineLearningPrivateEndpoint(id, subnetArmId, serializedAdditionalRawData: null); + properties, + serializedAdditionalRawData: null, + isArchived, + latestVersion, + nextVersion, + provisioningState); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , and . - /// - /// A new instance for mocking. - public static MachineLearningWorkspaceConnectionData MachineLearningWorkspaceConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningWorkspaceConnectionProperties properties = null) + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningFeaturestoreEntityVersionData MachineLearningFeaturestoreEntityVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningFeatureStoreEntityVersionProperties properties = null) { - return new MachineLearningWorkspaceConnectionData( + return new MachineLearningFeaturestoreEntityVersionData( id, name, resourceType, @@ -1990,56 +1622,48 @@ public static MachineLearningWorkspaceConnectionData MachineLearningWorkspaceCon serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Authentication type of the connection target. - /// Category of the connection. - /// - /// - /// - /// Group based on connection category. - /// - /// Store user metadata for this connection. - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static MachineLearningWorkspaceConnectionProperties MachineLearningWorkspaceConnectionProperties(string authType = null, MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, string error = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, IDictionary metadata = null, ManagedPERequirement? peRequirement = null, ManagedPEStatus? peStatus = null, IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = null) + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Is the asset archived?. + /// If the name version are system generated (anonymous registration). + /// Specifies index columns. + /// Specifies the asset stage. + /// Provisioning state for the featurestore entity version. + /// A new instance for mocking. + public static MachineLearningFeatureStoreEntityVersionProperties MachineLearningFeatureStoreEntityVersionProperties(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isArchived = null, bool? isAnonymous = null, IEnumerable indexColumns = null, string stage = null, RegistryAssetProvisioningState? provisioningState = null) { - metadata ??= new Dictionary(); - sharedUserList ??= new List(); + tags ??= new Dictionary(); + properties ??= new Dictionary(); + indexColumns ??= new List(); - return new UnknownWorkspaceConnectionPropertiesV2( - authType == null ? default : new MachineLearningConnectionAuthType(authType), - category, - createdByWorkspaceArmId, - error, - expiryOn, - group, - isSharedToAll, - metadata, - peRequirement, - peStatus, - sharedUserList?.ToList(), - target, - useWorkspaceManagedIdentity, - serializedAdditionalRawData: null); + return new MachineLearningFeatureStoreEntityVersionProperties( + description, + tags, + properties, + serializedAdditionalRawData: null, + isArchived, + isAnonymous, + indexColumns?.ToList(), + stage, + provisioningState); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// [Required] Additional attributes of the entity. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . /// - /// A new instance for mocking. - public static EndpointDeploymentResourcePropertiesBasicResourceData EndpointDeploymentResourcePropertiesBasicResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EndpointDeploymentResourceProperties properties = null) + /// A new instance for mocking. + public static MachineLearningJobData MachineLearningJobData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningJobProperties properties = null) { - return new EndpointDeploymentResourcePropertiesBasicResourceData( + return new MachineLearningJobData( id, name, resourceType, @@ -2048,454 +1672,451 @@ public static EndpointDeploymentResourcePropertiesBasicResourceData EndpointDepl serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The failure reason if the creation failed. - /// Read-only provision state status property. - /// Kind of the deployment. - /// A new instance for mocking. - public static EndpointDeploymentResourceProperties EndpointDeploymentResourceProperties(string failureReason = null, DefaultResourceProvisioningState? provisioningState = null, string endpointDeploymentResourcePropertiesType = null) - { - return new UnknownEndpointDeploymentResourceProperties(failureReason, provisioningState, endpointDeploymentResourcePropertiesType, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The capabilities. - /// - /// The capabilities for finetune models. - /// Deployment model format. - /// If the model is default version. - /// Model lifecycle status. - /// The max capacity. - /// Deployment model name. - /// The list of Model Sku. - /// Metadata pertaining to creation and last modification of the resource. - /// Optional. Deployment model version. If version is not specified, a default version will be assigned. The default version is different for different models and might change when there is new version available for a model. Default version for a model could be found from list models API. - /// A new instance for mocking. - public static EndpointModelProperties EndpointModelProperties(IReadOnlyDictionary capabilities = null, EndpointModelDeprecationProperties deprecation = null, IReadOnlyDictionary finetuneCapabilities = null, string format = null, bool? isDefaultVersion = null, ModelLifecycleStatus? lifecycleStatus = null, int? maxCapacity = null, string name = null, IEnumerable skus = null, SystemData systemData = null, string version = null) - { - capabilities ??= new Dictionary(); - finetuneCapabilities ??= new Dictionary(); - skus ??= new List(); - - return new EndpointModelProperties( - capabilities, - deprecation, - finetuneCapabilities, - format, - isDefaultVersion, - lifecycleStatus, - maxCapacity, - name, - skus?.ToList(), - systemData, - version, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The datetime of deprecation of the fineTune Model. - /// The datetime of deprecation of the inference Model. - /// A new instance for mocking. - public static EndpointModelDeprecationProperties EndpointModelDeprecationProperties(DateTimeOffset? fineTune = null, DateTimeOffset? inference = null) + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// [Required] Specifies the type of job. + /// Display name of job. + /// Status of the job. + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// ARM resource ID of the compute resource. + /// Is the asset archived?. + /// + /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + /// Defaults to AmlToken if null. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// ARM resource ID of the component resource. + /// Notification setting for the job. + /// A new instance for mocking. + public static MachineLearningJobProperties MachineLearningJobProperties(string description = null, IDictionary tags = null, IDictionary properties = null, string jobType = null, string displayName = null, MachineLearningJobStatus? status = null, string experimentName = null, IDictionary services = null, ResourceIdentifier computeId = null, bool? isArchived = null, MachineLearningIdentityConfiguration identity = null, ResourceIdentifier componentId = null, NotificationSetting notificationSetting = null) { - return new EndpointModelDeprecationProperties(fineTune, inference, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// The list of ARM id for the connection support this SKU. - /// The datetime of deprecation of the model SKU. - /// The name of the model SKU. - /// - /// The usage name of the model SKU. - /// A new instance for mocking. - public static EndpointModelSkuProperties EndpointModelSkuProperties(EndpointModelSkuCapacityProperties capacity = null, IEnumerable connectionIds = null, DateTimeOffset? deprecationOn = null, string name = null, IEnumerable rateLimits = null, string usageName = null) - { - connectionIds ??= new List(); - rateLimits ??= new List(); - - return new EndpointModelSkuProperties( - capacity, - connectionIds?.ToList(), - deprecationOn, - name, - rateLimits?.ToList(), - usageName, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The default capacity. - /// The maximum capacity. - /// A new instance for mocking. - public static EndpointModelSkuCapacityProperties EndpointModelSkuCapacityProperties(int? @default = null, int? maximum = null) - { - return new EndpointModelSkuCapacityProperties(@default, maximum, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The count value of Call Rate Limit. - /// The renewal period in seconds of Call Rate Limit. - /// The call rate limit for the model. - /// A new instance for mocking. - public static EndpointModelSkuRateLimitProperties EndpointModelSkuRateLimitProperties(float? count = null, float? renewalPeriod = null, IEnumerable rules = null) - { - rules ??= new List(); + tags ??= new Dictionary(); + properties ??= new Dictionary(); + services ??= new Dictionary(); - return new EndpointModelSkuRateLimitProperties(count, renewalPeriod, rules?.ToList(), serializedAdditionalRawData: null); + return new MachineLearningJobProperties( + description, + tags, + properties, + serializedAdditionalRawData: null, + jobType == null ? default : new JobType(jobType), + displayName, + status, + experimentName, + services, + computeId, + isArchived, + identity, + componentId, + notificationSetting); } - /// Initializes a new instance of . - /// - /// If the dynamic throttling is enabled. - /// - /// - /// - /// - /// A new instance for mocking. - public static EndpointModelSkuRateLimitRuleProperties EndpointModelSkuRateLimitRuleProperties(float? count = null, bool? dynamicThrottlingEnabled = null, string key = null, IEnumerable matchPatterns = null, float? minCount = null, float? renewalPeriod = null) + /// Initializes a new instance of . + /// Endpoint type. + /// Port for endpoint. + /// Url for endpoint. + /// Status of endpoint. + /// Any error in the service. + /// Additional properties to set on the endpoint. + /// + /// Nodes that user would like to start the service on. + /// If Nodes is not set or set to null, the service will only be started on leader node. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// A new instance for mocking. + public static MachineLearningJobService MachineLearningJobService(string jobServiceType = null, int? port = null, string endpoint = null, string status = null, string errorMessage = null, IDictionary properties = null, JobNodes nodes = null) { - matchPatterns ??= new List(); + properties ??= new Dictionary(); - return new EndpointModelSkuRateLimitRuleProperties( - count, - dynamicThrottlingEnabled, - key, - matchPatterns?.ToList(), - minCount, - renewalPeriod, + return new MachineLearningJobService( + jobServiceType, + port, + endpoint, + status, + errorMessage, + properties, + nodes, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// - /// A new instance for mocking. - public static EndpointModelSkuRateLimitRulePatternProperties EndpointModelSkuRateLimitRulePatternProperties(string method = null, string path = null) - { - return new EndpointModelSkuRateLimitRulePatternProperties(method, path, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// RAI Custom Blocklist properties. - /// A new instance for mocking. - public static RaiBlocklistPropertiesBasicResourceData RaiBlocklistPropertiesBasicResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string raiBlocklistDescription = null) + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MarketplaceSubscriptionData MarketplaceSubscriptionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MarketplaceSubscriptionProperties properties = null) { - return new RaiBlocklistPropertiesBasicResourceData( + return new MarketplaceSubscriptionData( id, name, resourceType, systemData, - raiBlocklistDescription != null ? new RaiBlocklistProperties(raiBlocklistDescription, serializedAdditionalRawData: null) : null, + properties, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// RAI Custom Blocklist Item properties. - /// A new instance for mocking. - public static RaiBlocklistItemPropertiesBasicResourceData RaiBlocklistItemPropertiesBasicResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RaiBlocklistItemProperties properties = null) + /// Initializes a new instance of . + /// [Required] Target Marketplace Model ID to create a Marketplace Subscription for. + /// Marketplace Plan associated with the Marketplace Subscription. + /// Current status of the Marketplace Subscription. + /// Provisioning State of the Marketplace Subscription. + /// A new instance for mocking. + public static MarketplaceSubscriptionProperties MarketplaceSubscriptionProperties(string modelId = null, MarketplacePlan marketplacePlan = null, MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = null, MarketplaceSubscriptionProvisioningState? provisioningState = null) { - return new RaiBlocklistItemPropertiesBasicResourceData( - id, - name, - resourceType, - systemData, - properties, - serializedAdditionalRawData: null); + return new MarketplaceSubscriptionProperties(modelId, marketplacePlan, marketplaceSubscriptionStatus, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The identifying name of the Publisher of the Marketplace Plan. + /// The identifying name of the Offer of the Marketplace Plan. + /// The identifying name of the Plan of the Marketplace Plan. + /// A new instance for mocking. + public static MarketplacePlan MarketplacePlan(string publisherId = null, string offerId = null, string planId = null) + { + return new MarketplacePlan(publisherId, offerId, planId, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// Azure OpenAI Content Filters properties. - /// A new instance for mocking. - public static RaiPolicyPropertiesBasicResourceData RaiPolicyPropertiesBasicResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RaiPolicyProperties properties = null) + /// The tags. + /// The location. + /// [Required] Additional attributes of the entity. + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Managed service identity (system assigned and/or user assigned identities). + /// Sku details required for ARM contract for Autoscaling. + /// A new instance for mocking. + public static MachineLearningOnlineEndpointData MachineLearningOnlineEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, MachineLearningOnlineEndpointProperties properties = null, string kind = null, ManagedServiceIdentity identity = null, MachineLearningSku sku = null) { - return new RaiPolicyPropertiesBasicResourceData( + tags ??= new Dictionary(); + + return new MachineLearningOnlineEndpointData( id, name, resourceType, systemData, + tags, + location, properties, + kind, + identity, + sku, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// A new instance for mocking. - public static MachineLearningWorkspaceDiagnoseResult MachineLearningWorkspaceDiagnoseResult(MachineLearningDiagnoseResultValue value = null) - { - return new MachineLearningWorkspaceDiagnoseResult(value, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static MachineLearningDiagnoseResultValue MachineLearningDiagnoseResultValue(IEnumerable userDefinedRouteResults = null, IEnumerable networkSecurityRuleResults = null, IEnumerable resourceLockResults = null, IEnumerable dnsResolutionResults = null, IEnumerable storageAccountResults = null, IEnumerable keyVaultResults = null, IEnumerable containerRegistryResults = null, IEnumerable applicationInsightsResults = null, IEnumerable otherResults = null) + /// Initializes a new instance of . + /// Description of the inference endpoint. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Endpoint URI. + /// Endpoint Swagger URI. + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + /// + /// EndpointAuthKeys to set initially on an Endpoint. + /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + /// + /// Provisioning state for the endpoint. + /// + /// ARM resource ID of the compute if it exists. + /// optional + /// + /// Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. + /// Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. + /// Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50. + /// A new instance for mocking. + public static MachineLearningOnlineEndpointProperties MachineLearningOnlineEndpointProperties(string description = null, IDictionary properties = null, Uri scoringUri = null, Uri swaggerUri = null, MachineLearningEndpointAuthMode authMode = default, MachineLearningEndpointAuthKeys keys = null, MachineLearningEndpointProvisioningState? provisioningState = null, string compute = null, MachineLearningPublicNetworkAccessType? publicNetworkAccess = null, IDictionary traffic = null, IDictionary mirrorTraffic = null) { - userDefinedRouteResults ??= new List(); - networkSecurityRuleResults ??= new List(); - resourceLockResults ??= new List(); - dnsResolutionResults ??= new List(); - storageAccountResults ??= new List(); - keyVaultResults ??= new List(); - containerRegistryResults ??= new List(); - applicationInsightsResults ??= new List(); - otherResults ??= new List(); - - return new MachineLearningDiagnoseResultValue( - userDefinedRouteResults?.ToList(), - networkSecurityRuleResults?.ToList(), - resourceLockResults?.ToList(), - dnsResolutionResults?.ToList(), - storageAccountResults?.ToList(), - keyVaultResults?.ToList(), - containerRegistryResults?.ToList(), - applicationInsightsResults?.ToList(), - otherResults?.ToList(), - serializedAdditionalRawData: null); - } + properties ??= new Dictionary(); + traffic ??= new Dictionary(); + mirrorTraffic ??= new Dictionary(); - /// Initializes a new instance of . - /// Code for workspace setup error. - /// Level of workspace setup error. - /// Message of workspace setup error. - /// A new instance for mocking. - public static MachineLearningDiagnoseResult MachineLearningDiagnoseResult(string code = null, MachineLearningDiagnoseResultLevel? level = null, string message = null) - { - return new MachineLearningDiagnoseResult(code, level, message, serializedAdditionalRawData: null); + return new MachineLearningOnlineEndpointProperties( + description, + properties, + scoringUri, + swaggerUri, + authMode, + keys, + serializedAdditionalRawData: null, + provisioningState, + compute, + publicNetworkAccess, + traffic, + mirrorTraffic); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. + /// The tags. + /// The location. /// - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . + /// [Required] Additional attributes of the entity. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . /// - /// A new instance for mocking. - public static EndpointResourcePropertiesBasicResourceData EndpointResourcePropertiesBasicResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, EndpointResourceProperties properties = null) + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Managed service identity (system assigned and/or user assigned identities). + /// Sku details required for ARM contract for Autoscaling. + /// A new instance for mocking. + public static MachineLearningOnlineDeploymentData MachineLearningOnlineDeploymentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, MachineLearningOnlineDeploymentProperties properties = null, string kind = null, ManagedServiceIdentity identity = null, MachineLearningSku sku = null) { - return new EndpointResourcePropertiesBasicResourceData( + tags ??= new Dictionary(); + + return new MachineLearningOnlineDeploymentData( id, name, resourceType, systemData, + tags, + location, properties, + kind, + identity, + sku, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Byo resource id for creating the built-in model service endpoints. - /// Deployments info. - /// Type of the endpoint. - /// Uri of the endpoint. - /// The failure reason if the creation failed. - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace + /// Initializes a new instance of . + /// Description of the endpoint deployment. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Code configuration for the endpoint deployment. + /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// Environment variables configuration for the deployment. + /// [Required] The compute type of the endpoint. + /// + /// Scale settings for the deployment. + /// If it is null or not provided, + /// it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + /// and to DefaultScaleSettings for ManagedOnlineDeployment. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . /// - /// Name of the endpoint. - /// Read-only provision state status property. - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - /// A new instance for mocking. - public static EndpointResourceProperties EndpointResourceProperties(ResourceIdentifier associatedResourceId = null, IEnumerable deployments = null, string endpointType = null, Uri endpointUri = null, string failureReason = null, AzureLocation? location = null, string name = null, DefaultResourceProvisioningState? provisioningState = null, bool? shouldCreateAiServicesEndpoint = null) - { - deployments ??= new List(); - - return new UnknownEndpointResourceProperties( - associatedResourceId, - deployments?.ToList(), - endpointType == null ? default : new EndpointType(endpointType), - endpointUri, - failureReason, - location, - name, + /// Request settings for the deployment. + /// The path to mount the model in custom container. + /// If true, enables Application Insights logging. + /// Liveness probe monitors the health of the container regularly. + /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. + /// Provisioning state for the endpoint deployment. + /// Compute instance type. + /// The URI path to the model. + /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + /// The mdc configuration, we disable mdc when it's null. + /// A new instance for mocking. + public static MachineLearningOnlineDeploymentProperties MachineLearningOnlineDeploymentProperties(string description = null, IDictionary properties = null, MachineLearningCodeConfiguration codeConfiguration = null, string environmentId = null, IDictionary environmentVariables = null, string endpointComputeType = null, MachineLearningOnlineScaleSettings scaleSettings = null, MachineLearningOnlineRequestSettings requestSettings = null, string modelMountPath = null, bool? appInsightsEnabled = null, MachineLearningProbeSettings livenessProbe = null, MachineLearningProbeSettings readinessProbe = null, MachineLearningDeploymentProvisioningState? provisioningState = null, string instanceType = null, string model = null, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = null, DataCollector dataCollector = null) + { + properties ??= new Dictionary(); + environmentVariables ??= new Dictionary(); + + return new MachineLearningOnlineDeploymentProperties( + description, + properties, + codeConfiguration, + environmentId, + environmentVariables, + serializedAdditionalRawData: null, + endpointComputeType == null ? default : new MachineLearningEndpointComputeType(endpointComputeType), + scaleSettings, + requestSettings, + modelMountPath, + appInsightsEnabled, + livenessProbe, + readinessProbe, provisioningState, - shouldCreateAiServicesEndpoint, - serializedAdditionalRawData: null); + instanceType, + model, + egressPublicNetworkAccess, + dataCollector); } - /// Initializes a new instance of . - /// Dictionary of Keys for the endpoint. - /// A new instance for mocking. - public static EndpointKeys EndpointKeys(AccountApiKeys keys = null) + /// Initializes a new instance of . + /// The retrieved online deployment logs. + /// A new instance for mocking. + public static MachineLearningDeploymentLogs MachineLearningDeploymentLogs(string content = null) { - return new EndpointKeys(keys, serializedAdditionalRawData: null); + return new MachineLearningDeploymentLogs(content, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// - /// A new instance for mocking. - public static AccountApiKeys AccountApiKeys(string key1 = null, string key2 = null) - { - return new AccountApiKeys(key1, key2, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The access key of the workspace app insights. - /// - /// - /// The arm Id key of the workspace storage. - /// The access key of the workspace storage. - /// A new instance for mocking. - public static MachineLearningWorkspaceGetKeysResult MachineLearningWorkspaceGetKeysResult(string appInsightsInstrumentationKey = null, MachineLearningContainerRegistryCredentials containerRegistryCredentials = null, MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys = null, string userStorageResourceId = null, string userStorageKey = null) - { - return new MachineLearningWorkspaceGetKeysResult( - appInsightsInstrumentationKey, - containerRegistryCredentials, - notebookAccessKeys, - userStorageResourceId, - userStorageKey, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The location of the workspace ACR. - /// - /// The username of the workspace ACR. - /// A new instance for mocking. - public static MachineLearningContainerRegistryCredentials MachineLearningContainerRegistryCredentials(AzureLocation? location = null, IEnumerable passwords = null, string username = null) - { - passwords ??= new List(); - - return new MachineLearningContainerRegistryCredentials(location, passwords?.ToList(), username, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// - /// A new instance for mocking. - public static MachineLearningPasswordDetail MachineLearningPasswordDetail(string name = null, string value = null) + /// Initializes a new instance of . + /// The resource type name. + /// Gets or sets the Sku. + /// Gets or sets the Sku Capacity. + /// A new instance for mocking. + public static MachineLearningSkuDetail MachineLearningSkuDetail(string resourceType = null, MachineLearningSkuSetting sku = null, MachineLearningSkuCapacity capacity = null) { - return new MachineLearningPasswordDetail(name, value, serializedAdditionalRawData: null); + return new MachineLearningSkuDetail(resourceType, sku, capacity, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The primary access key of the Notebook. - /// The secondary access key of the Notebook. - /// A new instance for mocking. - public static MachineLearningWorkspaceGetNotebookKeysResult MachineLearningWorkspaceGetNotebookKeysResult(string primaryAccessKey = null, string secondaryAccessKey = null) + /// Initializes a new instance of . + /// [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. + /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + /// A new instance for mocking. + public static MachineLearningSkuSetting MachineLearningSkuSetting(string name = null, MachineLearningSkuTier? tier = null) { - return new MachineLearningWorkspaceGetNotebookKeysResult(primaryAccessKey, secondaryAccessKey, serializedAdditionalRawData: null); + return new MachineLearningSkuSetting(name, tier, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// - /// - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static MachineLearningWorkspaceNotebookAccessTokenResult MachineLearningWorkspaceNotebookAccessTokenResult(string accessToken = null, int? expiresIn = null, string hostName = null, string notebookResourceId = null, string publicDns = null, string refreshToken = null, string scope = null, string tokenType = null) + /// Initializes a new instance of . + /// Gets or sets the minimum. + /// Gets or sets the maximum. + /// Gets or sets the default capacity. + /// Gets or sets the type of the scale. + /// A new instance for mocking. + public static MachineLearningSkuCapacity MachineLearningSkuCapacity(int? minimum = null, int? maximum = null, int? @default = null, MachineLearningSkuScaleType? scaleType = null) { - return new MachineLearningWorkspaceNotebookAccessTokenResult( - accessToken, - expiresIn, - hostName, - notebookResourceId, - publicDns, - refreshToken, - scope, - tokenType, - serializedAdditionalRawData: null); + return new MachineLearningSkuCapacity(minimum, maximum, @default, scaleType, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The access key of the storage. - /// A new instance for mocking. - public static MachineLearningWorkspaceGetStorageAccountKeysResult MachineLearningWorkspaceGetStorageAccountKeysResult(string userStorageKey = null) + /// Initializes a new instance of . + /// [Required] Specification for which type of key to generate. Primary or Secondary. + /// The value the key is set to. + /// A new instance for mocking. + public static MachineLearningEndpointKeyRegenerateContent MachineLearningEndpointKeyRegenerateContent(MachineLearningKeyType keyType = default, string keyValue = null) { - return new MachineLearningWorkspaceGetStorageAccountKeysResult(userStorageKey, serializedAdditionalRawData: null); + return new MachineLearningEndpointKeyRegenerateContent(keyType, keyValue, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// A new instance for mocking. - public static MachineLearningFqdnEndpoints MachineLearningFqdnEndpoints(MachineLearningFqdnEndpointsProperties properties = null) + /// Initializes a new instance of . + /// Access token for endpoint authentication. + /// Access token type. + /// Access token expiry time (UTC). + /// Refresh access token after time (UTC). + /// A new instance for mocking. + public static MachineLearningEndpointAuthToken MachineLearningEndpointAuthToken(string accessToken = null, string tokenType = null, DateTimeOffset? expireOn = null, DateTimeOffset? refreshOn = null) { - return new MachineLearningFqdnEndpoints(properties, serializedAdditionalRawData: null); + return new MachineLearningEndpointAuthToken(accessToken, tokenType, expireOn, refreshOn, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// - /// A new instance for mocking. - public static MachineLearningFqdnEndpointsProperties MachineLearningFqdnEndpointsProperties(string category = null, IEnumerable endpoints = null) + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// [Required] Additional attributes of the entity. + /// A new instance for mocking. + public static MachineLearningScheduleData MachineLearningScheduleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningScheduleProperties properties = null) { - endpoints ??= new List(); - - return new MachineLearningFqdnEndpointsProperties(category, endpoints?.ToList(), serializedAdditionalRawData: null); + return new MachineLearningScheduleData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// - /// A new instance for mocking. - public static MachineLearningFqdnEndpoint MachineLearningFqdnEndpoint(string domainName = null, IEnumerable endpointDetails = null) + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Display name of schedule. + /// Is the schedule enabled?. + /// + /// [Required] Specifies the trigger details + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// [Required] Specifies the action of the schedule + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Provisioning state for the schedule. + /// A new instance for mocking. + public static MachineLearningScheduleProperties MachineLearningScheduleProperties(string description = null, IDictionary tags = null, IDictionary properties = null, string displayName = null, bool? isEnabled = null, MachineLearningTriggerBase trigger = null, MachineLearningScheduleAction action = null, MachineLearningScheduleProvisioningStatus? provisioningState = null) { - endpointDetails ??= new List(); - - return new MachineLearningFqdnEndpoint(domainName, endpointDetails?.ToList(), serializedAdditionalRawData: null); - } + tags ??= new Dictionary(); + properties ??= new Dictionary(); - /// Initializes a new instance of . - /// - /// A new instance for mocking. - public static MachineLearningFqdnEndpointDetail MachineLearningFqdnEndpointDetail(int? port = null) - { - return new MachineLearningFqdnEndpointDetail(port, serializedAdditionalRawData: null); + return new MachineLearningScheduleProperties( + description, + tags, + properties, + serializedAdditionalRawData: null, + displayName, + isEnabled, + trigger, + action, + provisioningState); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// Outbound Rule for the managed network of a machine learning workspace. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// A new instance for mocking. - public static MachineLearningOutboundRuleBasicData MachineLearningOutboundRuleBasicData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineLearningOutboundRule properties = null) + /// The tags. + /// The location. + /// [Required] Additional attributes of the entity. + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Managed service identity (system assigned and/or user assigned identities). + /// Sku details required for ARM contract for Autoscaling. + /// A new instance for mocking. + public static ServerlessEndpointData ServerlessEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ServerlessEndpointProperties properties = null, string kind = null, ManagedServiceIdentity identity = null, MachineLearningSku sku = null) { - return new MachineLearningOutboundRuleBasicData( + tags ??= new Dictionary(); + + return new ServerlessEndpointData( id, name, resourceType, systemData, + tags, + location, properties, + kind, + identity, + sku, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// The model settings (model id) for the model being serviced on the ServerlessEndpoint. + /// [Required] Specifies the authentication mode for the Serverless endpoint. + /// The inference uri to target when making requests against the serverless endpoint. + /// Provisioning state for the endpoint. + /// The current state of the ServerlessEndpoint. + /// The MarketplaceSubscription Azure ID associated to this ServerlessEndpoint. + /// Specifies the content safety options. If omitted, the default content safety settings will be configured. + /// A new instance for mocking. + public static ServerlessEndpointProperties ServerlessEndpointProperties(string modelId = null, ServerlessInferenceEndpointAuthMode authMode = default, ServerlessInferenceEndpoint inferenceEndpoint = null, MachineLearningEndpointProvisioningState? provisioningState = null, ServerlessEndpointState? endpointState = null, string marketplaceSubscriptionId = null, ContentSafetyStatus? contentSafetyStatus = null) + { + return new ServerlessEndpointProperties( + modelId != null ? new ModelSettings(modelId, serializedAdditionalRawData: null) : null, + authMode, + inferenceEndpoint, + provisioningState, + endpointState, + marketplaceSubscriptionId, + contentSafetyStatus.HasValue ? new ContentSafety(contentSafetyStatus.Value, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// [Required] The inference uri to target when making requests against the Serverless Endpoint. + /// Specifies any required headers to target this serverless endpoint. + /// A new instance for mocking. + public static ServerlessInferenceEndpoint ServerlessInferenceEndpoint(Uri uri = null, IReadOnlyDictionary headers = null) + { + headers ??= new Dictionary(); + + return new ServerlessInferenceEndpoint(uri, headers, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -2503,18 +2124,26 @@ public static MachineLearningOutboundRuleBasicData MachineLearningOutboundRuleBa /// The tags. /// The location. /// Managed service identity (system assigned and/or user assigned identities). - /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. - /// The private link resource group id. - /// The private link resource required member names. - /// The private link resource Private link DNS zone name. - /// A new instance for mocking. - public static MachineLearningPrivateLinkResource MachineLearningPrivateLinkResource(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, MachineLearningSku sku = null, string groupId = null, IEnumerable requiredMembers = null, IEnumerable requiredZoneNames = null) + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Sku details required for ARM contract for Autoscaling. + /// Discovery URL for the Registry. + /// IntellectualPropertyPublisher for the registry. + /// ResourceId of the managed RG if the registry has system created resources. + /// MLFlow Registry URI for the Registry. + /// Private endpoint connections info used for pending connections in private link portal. + /// + /// Is the Registry accessible from the internet? + /// Possible values: "Enabled" or "Disabled" + /// + /// Details of each region the registry is in. + /// A new instance for mocking. + public static MachineLearningRegistryData MachineLearningRegistryData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string kind = null, MachineLearningSku sku = null, Uri discoveryUri = null, string intellectualPropertyPublisher = null, ResourceIdentifier managedResourceId = null, Uri mlFlowRegistryUri = null, IEnumerable registryPrivateEndpointConnections = null, string publicNetworkAccess = null, IEnumerable regionDetails = null) { tags ??= new Dictionary(); - requiredMembers ??= new List(); - requiredZoneNames ??= new List(); + registryPrivateEndpointConnections ??= new List(); + regionDetails ??= new List(); - return new MachineLearningPrivateLinkResource( + return new MachineLearningRegistryData( id, name, resourceType, @@ -2522,20 +2151,44 @@ public static MachineLearningPrivateLinkResource MachineLearningPrivateLinkResou tags, location, identity, + kind, sku, - groupId, - requiredMembers?.ToList(), - requiredZoneNames?.ToList(), + discoveryUri, + intellectualPropertyPublisher, + managedResourceId != null ? new ArmResourceId(managedResourceId, serializedAdditionalRawData: null) : null, + mlFlowRegistryUri, + registryPrivateEndpointConnections?.ToList(), + publicNetworkAccess, + regionDetails?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Location for the underlying compute. - /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - /// The description of the Machine Learning compute. - /// The time at which the compute was created. - /// The time at which the compute was last modified. - /// ARM resource id of the underlying compute. + /// Initializes a new instance of . + /// The ARM identifier for Private Endpoint. + /// The subnetId that the private endpoint is connected to. + /// A new instance for mocking. + public static RegistryPrivateEndpoint RegistryPrivateEndpoint(ResourceIdentifier id = null, ResourceIdentifier subnetArmId = null) + { + return new RegistryPrivateEndpoint(id, serializedAdditionalRawData: null, subnetArmId); + } + + /// Initializes a new instance of . + /// Specifies the feature ID. + /// Specifies the feature name. + /// Describes the feature for user experience. + /// A new instance for mocking. + public static MachineLearningUserFeature MachineLearningUserFeature(string id = null, string displayName = null, string description = null) + { + return new MachineLearningUserFeature(id, displayName, description, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Location for the underlying compute. + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The description of the Machine Learning compute. + /// The time at which the compute was created. + /// The time at which the compute was last modified. + /// ARM resource id of the underlying compute. /// Errors during provisioning. /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. @@ -2739,31 +2392,10 @@ public static MachineLearningComputeInstanceSshSettings MachineLearningComputeIn /// Specifies the current operating system image version this compute instance is running on. /// Specifies the latest available operating system image version. /// Specifies whether this compute instance is running on the latest operating system image. - /// Metadata about the os patching. /// A new instance for mocking. - public static ImageMetadata ImageMetadata(string currentImageVersion = null, string latestImageVersion = null, bool? isLatestOSImageVersion = null, OSPatchingStatus osPatchingStatus = null) - { - return new ImageMetadata(currentImageVersion, latestImageVersion, isLatestOSImageVersion, osPatchingStatus, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The os patching status. - /// Time of the latest os patching. - /// Specifies whether this compute instance is pending for reboot to finish os patching. - /// Time of scheduled reboot. - /// Collection of errors encountered when doing os patching. - /// A new instance for mocking. - public static OSPatchingStatus OSPatchingStatus(PatchStatus? patchStatus = null, DateTimeOffset? latestPatchOn = null, bool? rebootPending = null, DateTimeOffset? scheduledRebootOn = null, IEnumerable osPatchingErrors = null) + public static ImageMetadata ImageMetadata(string currentImageVersion = null, string latestImageVersion = null, bool? isLatestOSImageVersion = null) { - osPatchingErrors ??= new List(); - - return new OSPatchingStatus( - patchStatus, - latestPatchOn, - rebootPending, - scheduledRebootOn, - osPatchingErrors?.ToList(), - serializedAdditionalRawData: null); + return new ImageMetadata(currentImageVersion, latestImageVersion, isLatestOSImageVersion, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -2871,6 +2503,32 @@ public static MachineLearningComputeInstanceDataDisk MachineLearningComputeInsta return new MachineLearningComputeInstanceDataDisk(caching, diskSizeGB, lun, storageAccountType, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Source of the ComputeInstance data mount. + /// Data source type. + /// name of the ComputeInstance data mount. + /// Mount Action. + /// who this data mount created by. + /// Path of this data mount. + /// Mount state. + /// The time when the disk mounted. + /// Error of this data mount. + /// A new instance for mocking. + public static MachineLearningComputeInstanceDataMount MachineLearningComputeInstanceDataMount(string source = null, MachineLearningSourceType? sourceType = null, string mountName = null, MachineLearningMountAction? mountAction = null, string createdBy = null, string mountPath = null, MachineLearningMountState? mountState = null, DateTimeOffset? mountedOn = null, string error = null) + { + return new MachineLearningComputeInstanceDataMount( + source, + sourceType, + mountName, + mountAction, + createdBy, + mountPath, + mountState, + mountedOn, + error, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Location for the underlying compute. /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. @@ -3112,1670 +2770,1222 @@ public static MachineLearningDatabricksComputeSecrets MachineLearningDatabricksC return new MachineLearningDatabricksComputeSecrets(ComputeType.Databricks, serializedAdditionalRawData: null, databricksAccessToken); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. - /// Display name of job. - /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - /// - /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. - /// Defaults to AmlToken if null. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// Is the asset archived?. - /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. - /// - /// The ARM resource ID of the Environment specification for the job. - /// This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated environment version when running the job. - /// - /// Environment variables included in the job. - /// - /// Mapping of output data bindings used in the job. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - /// Queue settings for the job. - /// Compute Resource configuration for the job. - /// - /// [Required] This represents scenario which can be one of Tables/NLP/Image - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , and . - /// - /// A new instance for mocking. - public static AutoMLJob AutoMLJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, NotificationSetting notificationSetting = null, IDictionary services = null, MachineLearningJobStatus? status = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary outputs = null, JobTier? queueJobTier = null, MachineLearningJobResourceConfiguration resources = null, AutoMLVertical taskDetails = null) + /// Initializes a new instance of . + /// The action enum for networking rule. + /// Optional, if provided, the ServiceTag property will be ignored. + /// + /// + /// + /// A new instance for mocking. + public static ServiceTagDestination ServiceTagDestination(NetworkingRuleAction? action = null, IEnumerable addressPrefixes = null, string portRanges = null, string protocol = null, string serviceTag = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); - services ??= new Dictionary(); - environmentVariables ??= new Dictionary(); - outputs ??= new Dictionary(); + addressPrefixes ??= new List(); - return new AutoMLJob( - description, - properties, - tags, - serializedAdditionalRawData: null, - componentId, - computeId, - displayName, - experimentName, - identity, - isArchived, - JobType.AutoML, - notificationSetting, - services, - status, - environmentId, - environmentVariables, - outputs, - queueJobTier != null ? new JobQueueSettings(queueJobTier, serializedAdditionalRawData: null) : null, - resources, - taskDetails); + return new ServiceTagDestination( + action, + addressPrefixes?.ToList(), + portRanges, + protocol, + serviceTag, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// - /// [Required] Account credentials. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// Readonly property to indicate if datastore is the workspace default datastore. - /// Storage account name. - /// Storage account container name. - /// Azure cloud endpoint for the storage account. - /// Protocol used to communicate with the storage account. - /// Indicates which identity to use to authenticate service data access to customer's storage. - /// Azure Resource Group name. - /// Azure Subscription Id. - /// A new instance for mocking. - public static MachineLearningAzureBlobDatastore MachineLearningAzureBlobDatastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, bool? isDefault = null, string accountName = null, string containerName = null, string endpoint = null, string protocol = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null, string resourceGroup = null, string subscriptionId = null) + /// Initializes a new instance of . + /// Category of the connection. + /// + /// + /// Group based on connection category. + /// + /// + /// Store user metadata for this connection. + /// + /// Value details of the workspace connection. + /// format for the workspace connection value. + /// + /// A new instance for mocking. + public static MachineLearningPatAuthTypeWorkspaceConnection MachineLearningPatAuthTypeWorkspaceConnection(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, string target = null, IDictionary metadata = null, IEnumerable sharedUserList = null, string value = null, MachineLearningValueFormat? valueFormat = null, string credentialsPat = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); + metadata ??= new Dictionary(); + sharedUserList ??= new List(); - return new MachineLearningAzureBlobDatastore( - description, - properties, - tags, + return new MachineLearningPatAuthTypeWorkspaceConnection( + MachineLearningConnectionAuthType.Pat, + category, + createdByWorkspaceArmId, + expiryOn, + group, + isSharedToAll, + target, + metadata, + sharedUserList?.ToList(), + value, + valueFormat, serializedAdditionalRawData: null, - credentials, - DatastoreType.AzureBlob, - isDefault, - accountName, - containerName, - endpoint, - protocol, - serviceDataAccessAuthIdentity, - resourceGroup, - subscriptionId); + credentialsPat != null ? new WorkspaceConnectionPersonalAccessToken(credentialsPat, serializedAdditionalRawData: null) : null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// - /// [Required] Account credentials. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// Readonly property to indicate if datastore is the workspace default datastore. - /// Indicates which identity to use to authenticate service data access to customer's storage. - /// [Required] Azure Data Lake store name. - /// Azure Resource Group name. - /// Azure Subscription Id. - /// A new instance for mocking. - public static MachineLearningAzureDataLakeGen1Datastore MachineLearningAzureDataLakeGen1Datastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, bool? isDefault = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null, string storeName = null, string resourceGroup = null, string subscriptionId = null) + /// Initializes a new instance of . + /// Category of the connection. + /// + /// + /// Group based on connection category. + /// + /// + /// Store user metadata for this connection. + /// + /// Value details of the workspace connection. + /// format for the workspace connection value. + /// + /// A new instance for mocking. + public static MachineLearningSasAuthTypeWorkspaceConnection MachineLearningSasAuthTypeWorkspaceConnection(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, string target = null, IDictionary metadata = null, IEnumerable sharedUserList = null, string value = null, MachineLearningValueFormat? valueFormat = null, string credentialsSas = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); + metadata ??= new Dictionary(); + sharedUserList ??= new List(); - return new MachineLearningAzureDataLakeGen1Datastore( - description, - properties, - tags, + return new MachineLearningSasAuthTypeWorkspaceConnection( + MachineLearningConnectionAuthType.Sas, + category, + createdByWorkspaceArmId, + expiryOn, + group, + isSharedToAll, + target, + metadata, + sharedUserList?.ToList(), + value, + valueFormat, serializedAdditionalRawData: null, - credentials, - DatastoreType.AzureDataLakeGen1, - isDefault, - serviceDataAccessAuthIdentity, - storeName, - resourceGroup, - subscriptionId); + credentialsSas != null ? new WorkspaceConnectionSharedAccessSignature(credentialsSas, serializedAdditionalRawData: null) : null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// - /// [Required] Account credentials. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// Readonly property to indicate if datastore is the workspace default datastore. - /// [Required] Storage account name. - /// Azure cloud endpoint for the storage account. - /// [Required] The name of the Data Lake Gen2 filesystem. - /// Protocol used to communicate with the storage account. - /// Indicates which identity to use to authenticate service data access to customer's storage. - /// Azure Resource Group name. - /// Azure Subscription Id. - /// A new instance for mocking. - public static MachineLearningAzureDataLakeGen2Datastore MachineLearningAzureDataLakeGen2Datastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, bool? isDefault = null, string accountName = null, string endpoint = null, string filesystem = null, string protocol = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null, string resourceGroup = null, string subscriptionId = null) + /// Initializes a new instance of . + /// Category of the connection. + /// + /// + /// Group based on connection category. + /// + /// + /// Store user metadata for this connection. + /// + /// Value details of the workspace connection. + /// format for the workspace connection value. + /// + /// A new instance for mocking. + public static MachineLearningUsernamePasswordAuthTypeWorkspaceConnection MachineLearningUsernamePasswordAuthTypeWorkspaceConnection(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, string target = null, IDictionary metadata = null, IEnumerable sharedUserList = null, string value = null, MachineLearningValueFormat? valueFormat = null, MachineLearningWorkspaceConnectionUsernamePassword credentials = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); + metadata ??= new Dictionary(); + sharedUserList ??= new List(); - return new MachineLearningAzureDataLakeGen2Datastore( - description, - properties, - tags, + return new MachineLearningUsernamePasswordAuthTypeWorkspaceConnection( + MachineLearningConnectionAuthType.UsernamePassword, + category, + createdByWorkspaceArmId, + expiryOn, + group, + isSharedToAll, + target, + metadata, + sharedUserList?.ToList(), + value, + valueFormat, serializedAdditionalRawData: null, - credentials, - DatastoreType.AzureDataLakeGen2, - isDefault, - accountName, - endpoint, - filesystem, - protocol, - serviceDataAccessAuthIdentity, - resourceGroup, - subscriptionId); + credentials); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// - /// [Required] Account credentials. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// Readonly property to indicate if datastore is the workspace default datastore. - /// [Required] Storage account name. - /// Azure cloud endpoint for the storage account. - /// [Required] The name of the Azure file share that the datastore points to. - /// Protocol used to communicate with the storage account. - /// Indicates which identity to use to authenticate service data access to customer's storage. - /// Azure Resource Group name. - /// Azure Subscription Id. - /// A new instance for mocking. - public static MachineLearningAzureFileDatastore MachineLearningAzureFileDatastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, bool? isDefault = null, string accountName = null, string endpoint = null, string fileShareName = null, string protocol = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null, string resourceGroup = null, string subscriptionId = null) + /// Initializes a new instance of . + /// Category of the connection. + /// + /// + /// Group based on connection category. + /// + /// + /// Store user metadata for this connection. + /// + /// Value details of the workspace connection. + /// format for the workspace connection value. + /// A new instance for mocking. + public static MachineLearningNoneAuthTypeWorkspaceConnection MachineLearningNoneAuthTypeWorkspaceConnection(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, string target = null, IDictionary metadata = null, IEnumerable sharedUserList = null, string value = null, MachineLearningValueFormat? valueFormat = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); + metadata ??= new Dictionary(); + sharedUserList ??= new List(); - return new MachineLearningAzureFileDatastore( - description, - properties, - tags, - serializedAdditionalRawData: null, - credentials, - DatastoreType.AzureFile, - isDefault, - accountName, - endpoint, - fileShareName, - protocol, - serviceDataAccessAuthIdentity, - resourceGroup, - subscriptionId); + return new MachineLearningNoneAuthTypeWorkspaceConnection( + MachineLearningConnectionAuthType.None, + category, + createdByWorkspaceArmId, + expiryOn, + group, + isSharedToAll, + target, + metadata, + sharedUserList?.ToList(), + value, + valueFormat, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. - /// Display name of job. - /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - /// - /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. - /// Defaults to AmlToken if null. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// Is the asset archived?. - /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. - /// ARM resource ID of the code asset. - /// [Required] The command to execute on startup of the job. eg. "python train.py". - /// - /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// [Required] The ARM resource ID of the Environment specification for the job. - /// Environment variables included in the job. - /// - /// Mapping of input data bindings used in the job. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// Command Job limit. - /// - /// Mapping of output data bindings used in the job. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - /// Input parameters. - /// Queue settings for the job. - /// Compute Resource configuration for the job. - /// A new instance for mocking. - public static MachineLearningCommandJob MachineLearningCommandJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, NotificationSetting notificationSetting = null, IDictionary services = null, MachineLearningJobStatus? status = null, ResourceIdentifier codeId = null, string command = null, MachineLearningDistributionConfiguration distribution = null, ResourceIdentifier environmentId = null, IDictionary environmentVariables = null, IDictionary inputs = null, MachineLearningCommandJobLimits limits = null, IDictionary outputs = null, BinaryData parameters = null, JobTier? queueJobTier = null, MachineLearningJobResourceConfiguration resources = null) + /// Initializes a new instance of . + /// Category of the connection. + /// + /// + /// Group based on connection category. + /// + /// + /// Store user metadata for this connection. + /// + /// Value details of the workspace connection. + /// format for the workspace connection value. + /// + /// A new instance for mocking. + public static MachineLearningManagedIdentityAuthTypeWorkspaceConnection MachineLearningManagedIdentityAuthTypeWorkspaceConnection(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, string target = null, IDictionary metadata = null, IEnumerable sharedUserList = null, string value = null, MachineLearningValueFormat? valueFormat = null, MachineLearningWorkspaceConnectionManagedIdentity credentials = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); - services ??= new Dictionary(); - environmentVariables ??= new Dictionary(); - inputs ??= new Dictionary(); - outputs ??= new Dictionary(); + metadata ??= new Dictionary(); + sharedUserList ??= new List(); - return new MachineLearningCommandJob( - description, - properties, - tags, + return new MachineLearningManagedIdentityAuthTypeWorkspaceConnection( + MachineLearningConnectionAuthType.ManagedIdentity, + category, + createdByWorkspaceArmId, + expiryOn, + group, + isSharedToAll, + target, + metadata, + sharedUserList?.ToList(), + value, + valueFormat, serializedAdditionalRawData: null, - componentId, - computeId, - displayName, - experimentName, - identity, - isArchived, - JobType.Command, - notificationSetting, - services, - status, - codeId, - command, - distribution, - environmentId, - environmentVariables, - inputs, - limits, - outputs, - parameters, - queueJobTier != null ? new JobQueueSettings(queueJobTier, serializedAdditionalRawData: null) : null, - resources); + credentials); } - /// Initializes a new instance of . - /// DockerCredential user password. - /// DockerCredential user name. - /// A new instance for mocking. - public static DockerCredential DockerCredential(string password = null, string userName = null) + /// Initializes a new instance of . + /// Category of the connection. + /// + /// + /// Group based on connection category. + /// + /// + /// Store user metadata for this connection. + /// + /// Value details of the workspace connection. + /// format for the workspace connection value. + /// A new instance for mocking. + public static AadAuthTypeWorkspaceConnectionProperties AadAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, string target = null, IDictionary metadata = null, IEnumerable sharedUserList = null, string value = null, MachineLearningValueFormat? valueFormat = null) { - return new DockerCredential(DataReferenceCredentialType.DockerCredentials, serializedAdditionalRawData: null, password, userName); + metadata ??= new Dictionary(); + sharedUserList ??= new List(); + + return new AadAuthTypeWorkspaceConnectionProperties( + MachineLearningConnectionAuthType.Aad, + category, + createdByWorkspaceArmId, + expiryOn, + group, + isSharedToAll, + target, + metadata, + sharedUserList?.ToList(), + value, + valueFormat, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. - /// Display name of job. - /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - /// - /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. - /// Defaults to AmlToken if null. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// Is the asset archived?. - /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. - /// - /// [Required] - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// Instance types and other resources for the job. - /// Queue settings for the job. - /// - /// [Required] - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - /// A new instance for mocking. - public static FineTuningJob FineTuningJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, NotificationSetting notificationSetting = null, IDictionary services = null, MachineLearningJobStatus? status = null, FineTuningVertical fineTuningDetails = null, IEnumerable resourcesInstanceTypes = null, JobTier? queueJobTier = null, IDictionary outputs = null) + /// Initializes a new instance of . + /// Category of the connection. + /// + /// + /// Group based on connection category. + /// + /// + /// Store user metadata for this connection. + /// + /// Value details of the workspace connection. + /// format for the workspace connection value. + /// + /// A new instance for mocking. + public static AccessKeyAuthTypeWorkspaceConnectionProperties AccessKeyAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, string target = null, IDictionary metadata = null, IEnumerable sharedUserList = null, string value = null, MachineLearningValueFormat? valueFormat = null, WorkspaceConnectionAccessKey credentials = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); - services ??= new Dictionary(); - resourcesInstanceTypes ??= new List(); - outputs ??= new Dictionary(); + metadata ??= new Dictionary(); + sharedUserList ??= new List(); - return new FineTuningJob( - description, - properties, - tags, - serializedAdditionalRawData: null, - componentId, - computeId, - displayName, - experimentName, - identity, - isArchived, - JobType.FineTuning, - notificationSetting, - services, - status, - fineTuningDetails, - resourcesInstanceTypes != null ? new JobResources(resourcesInstanceTypes?.ToList(), serializedAdditionalRawData: null) : null, - queueJobTier != null ? new JobQueueSettings(queueJobTier, serializedAdditionalRawData: null) : null, - outputs); + return new AccessKeyAuthTypeWorkspaceConnectionProperties( + MachineLearningConnectionAuthType.AccessKey, + category, + createdByWorkspaceArmId, + expiryOn, + group, + isSharedToAll, + target, + metadata, + sharedUserList?.ToList(), + value, + valueFormat, + serializedAdditionalRawData: null, + credentials); } - /// Initializes a new instance of . - /// Code configuration for the endpoint deployment. - /// Description of the endpoint deployment. - /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. - /// Environment variables configuration for the deployment. - /// Property dictionary. Properties can be added, but not removed or altered. - /// If true, enables Application Insights logging. - /// The mdc configuration, we disable mdc when it's null. - /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. - /// Compute instance type. - /// Liveness probe monitors the health of the container regularly. - /// The URI path to the model. - /// The path to mount the model in custom container. - /// Provisioning state for the endpoint deployment. - /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. - /// Request settings for the deployment. - /// - /// Scale settings for the deployment. - /// If it is null or not provided, - /// it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - /// and to DefaultScaleSettings for ManagedOnlineDeployment. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// The resource requirements for the container (cpu and memory). - /// A new instance for mocking. - public static MachineLearningKubernetesOnlineDeployment MachineLearningKubernetesOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary properties = null, bool? appInsightsEnabled = null, DataCollector dataCollector = null, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = null, string instanceType = null, MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, MachineLearningDeploymentProvisioningState? provisioningState = null, MachineLearningProbeSettings readinessProbe = null, MachineLearningOnlineRequestSettings requestSettings = null, MachineLearningOnlineScaleSettings scaleSettings = null, MachineLearningContainerResourceRequirements containerResourceRequirements = null) + /// Initializes a new instance of . + /// Category of the connection. + /// + /// + /// Group based on connection category. + /// + /// + /// Store user metadata for this connection. + /// + /// Value details of the workspace connection. + /// format for the workspace connection value. + /// + /// A new instance for mocking. + public static AccountKeyAuthTypeWorkspaceConnectionProperties AccountKeyAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, string target = null, IDictionary metadata = null, IEnumerable sharedUserList = null, string value = null, MachineLearningValueFormat? valueFormat = null, string credentialsKey = null) { - environmentVariables ??= new Dictionary(); - properties ??= new Dictionary(); + metadata ??= new Dictionary(); + sharedUserList ??= new List(); - return new MachineLearningKubernetesOnlineDeployment( - codeConfiguration, - description, - environmentId, - environmentVariables, - properties, + return new AccountKeyAuthTypeWorkspaceConnectionProperties( + MachineLearningConnectionAuthType.AccountKey, + category, + createdByWorkspaceArmId, + expiryOn, + group, + isSharedToAll, + target, + metadata, + sharedUserList?.ToList(), + value, + valueFormat, serializedAdditionalRawData: null, - appInsightsEnabled, - dataCollector, - egressPublicNetworkAccess, - MachineLearningEndpointComputeType.Kubernetes, - instanceType, - livenessProbe, - model, - modelMountPath, - provisioningState, - readinessProbe, - requestSettings, - scaleSettings, - containerResourceRequirements); + credentialsKey != null ? new WorkspaceConnectionAccountKey(credentialsKey, serializedAdditionalRawData: null) : null); } - /// Initializes a new instance of . - /// ManagedIdentityCredential identity type. - /// ClientId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. - /// PrincipalId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. - /// Full arm scope for the Id. For ManagedIdentityType = SystemManaged, this field is null. - /// TenantId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. - /// A new instance for mocking. - public static ManagedIdentityCredential ManagedIdentityCredential(string managedIdentityType = null, string userManagedIdentityClientId = null, string userManagedIdentityPrincipalId = null, string userManagedIdentityResourceId = null, string userManagedIdentityTenantId = null) + /// Initializes a new instance of . + /// Category of the connection. + /// + /// + /// Group based on connection category. + /// + /// + /// Store user metadata for this connection. + /// + /// Value details of the workspace connection. + /// format for the workspace connection value. + /// Api key object for workspace connection credential. + /// A new instance for mocking. + public static ApiKeyAuthWorkspaceConnectionProperties ApiKeyAuthWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, string target = null, IDictionary metadata = null, IEnumerable sharedUserList = null, string value = null, MachineLearningValueFormat? valueFormat = null, string credentialsKey = null) { - return new ManagedIdentityCredential( - DataReferenceCredentialType.ManagedIdentity, + metadata ??= new Dictionary(); + sharedUserList ??= new List(); + + return new ApiKeyAuthWorkspaceConnectionProperties( + MachineLearningConnectionAuthType.ApiKey, + category, + createdByWorkspaceArmId, + expiryOn, + group, + isSharedToAll, + target, + metadata, + sharedUserList?.ToList(), + value, + valueFormat, serializedAdditionalRawData: null, - managedIdentityType, - userManagedIdentityClientId, - userManagedIdentityPrincipalId, - userManagedIdentityResourceId, - userManagedIdentityTenantId); + credentialsKey != null ? new WorkspaceConnectionApiKey(credentialsKey, serializedAdditionalRawData: null) : null); } - /// Initializes a new instance of . - /// Code configuration for the endpoint deployment. - /// Description of the endpoint deployment. - /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. - /// Environment variables configuration for the deployment. - /// Property dictionary. Properties can be added, but not removed or altered. - /// If true, enables Application Insights logging. - /// The mdc configuration, we disable mdc when it's null. - /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. - /// Compute instance type. - /// Liveness probe monitors the health of the container regularly. - /// The URI path to the model. - /// The path to mount the model in custom container. - /// Provisioning state for the endpoint deployment. - /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. - /// Request settings for the deployment. - /// - /// Scale settings for the deployment. - /// If it is null or not provided, - /// it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - /// and to DefaultScaleSettings for ManagedOnlineDeployment. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// A new instance for mocking. - public static MachineLearningManagedOnlineDeployment MachineLearningManagedOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration = null, string description = null, string environmentId = null, IDictionary environmentVariables = null, IDictionary properties = null, bool? appInsightsEnabled = null, DataCollector dataCollector = null, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = null, string instanceType = null, MachineLearningProbeSettings livenessProbe = null, string model = null, string modelMountPath = null, MachineLearningDeploymentProvisioningState? provisioningState = null, MachineLearningProbeSettings readinessProbe = null, MachineLearningOnlineRequestSettings requestSettings = null, MachineLearningOnlineScaleSettings scaleSettings = null) + /// Initializes a new instance of . + /// Category of the connection. + /// + /// + /// Group based on connection category. + /// + /// + /// Store user metadata for this connection. + /// + /// Value details of the workspace connection. + /// format for the workspace connection value. + /// Custom Keys credential object. + /// A new instance for mocking. + public static CustomKeysWorkspaceConnectionProperties CustomKeysWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, string target = null, IDictionary metadata = null, IEnumerable sharedUserList = null, string value = null, MachineLearningValueFormat? valueFormat = null, IDictionary credentialsKeys = null) { - environmentVariables ??= new Dictionary(); - properties ??= new Dictionary(); + metadata ??= new Dictionary(); + sharedUserList ??= new List(); + credentialsKeys ??= new Dictionary(); - return new MachineLearningManagedOnlineDeployment( - codeConfiguration, - description, - environmentId, - environmentVariables, - properties, + return new CustomKeysWorkspaceConnectionProperties( + MachineLearningConnectionAuthType.CustomKeys, + category, + createdByWorkspaceArmId, + expiryOn, + group, + isSharedToAll, + target, + metadata, + sharedUserList?.ToList(), + value, + valueFormat, serializedAdditionalRawData: null, - appInsightsEnabled, - dataCollector, - egressPublicNetworkAccess, - MachineLearningEndpointComputeType.Managed, - instanceType, - livenessProbe, - model, - modelMountPath, - provisioningState, - readinessProbe, - requestSettings, - scaleSettings); + credentialsKeys != null ? new CustomKeys(credentialsKeys, serializedAdditionalRawData: null) : null); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. + /// Initializes a new instance of . + /// Category of the connection. + /// + /// + /// Group based on connection category. + /// + /// + /// Store user metadata for this connection. + /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// - /// [Required] Account credentials. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// Readonly property to indicate if datastore is the workspace default datastore. - /// - /// [Required] OneLake artifact backing the datastore. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . + /// ClientId and ClientSecret are required. Other properties are optional + /// depending on each OAuth2 provider's implementation. /// - /// OneLake endpoint to use for the datastore. - /// [Required] OneLake workspace name. - /// Indicates which identity to use to authenticate service data access to customer's storage. - /// A new instance for mocking. - public static OneLakeDatastore OneLakeDatastore(string description = null, IDictionary properties = null, IDictionary tags = null, MachineLearningDatastoreCredentials credentials = null, bool? isDefault = null, OneLakeArtifact artifact = null, string endpoint = null, string oneLakeWorkspaceName = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null) + /// A new instance for mocking. + public static OAuth2AuthTypeWorkspaceConnectionProperties OAuth2AuthTypeWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, string target = null, IDictionary metadata = null, IEnumerable sharedUserList = null, string value = null, MachineLearningValueFormat? valueFormat = null, WorkspaceConnectionOAuth2 credentials = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); + metadata ??= new Dictionary(); + sharedUserList ??= new List(); - return new OneLakeDatastore( - description, - properties, - tags, + return new OAuth2AuthTypeWorkspaceConnectionProperties( + MachineLearningConnectionAuthType.OAuth2, + category, + createdByWorkspaceArmId, + expiryOn, + group, + isSharedToAll, + target, + metadata, + sharedUserList?.ToList(), + value, + valueFormat, serializedAdditionalRawData: null, - credentials, - DatastoreType.OneLake, - isDefault, - artifact, - endpoint, - oneLakeWorkspaceName, - serviceDataAccessAuthIdentity); + credentials); } - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. - /// Display name of job. - /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - /// - /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. - /// Defaults to AmlToken if null. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// Is the asset archived?. - /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. - /// - /// Inputs for the pipeline job. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// Jobs construct the Pipeline Job. - /// - /// Outputs for the pipeline job - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - /// Pipeline settings, for things like ContinueRunOnStepFailure etc. - /// ARM resource ID of source job. - /// A new instance for mocking. - public static MachineLearningPipelineJob MachineLearningPipelineJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, NotificationSetting notificationSetting = null, IDictionary services = null, MachineLearningJobStatus? status = null, IDictionary inputs = null, IDictionary jobs = null, IDictionary outputs = null, BinaryData settings = null, ResourceIdentifier sourceJobId = null) + /// Initializes a new instance of . + /// Category of the connection. + /// + /// + /// Group based on connection category. + /// + /// + /// Store user metadata for this connection. + /// + /// Value details of the workspace connection. + /// format for the workspace connection value. + /// + /// A new instance for mocking. + public static ServicePrincipalAuthTypeWorkspaceConnectionProperties ServicePrincipalAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, string target = null, IDictionary metadata = null, IEnumerable sharedUserList = null, string value = null, MachineLearningValueFormat? valueFormat = null, WorkspaceConnectionServicePrincipal credentials = null) { - properties ??= new Dictionary(); - tags ??= new Dictionary(); - services ??= new Dictionary(); - inputs ??= new Dictionary(); - jobs ??= new Dictionary(); - outputs ??= new Dictionary(); + metadata ??= new Dictionary(); + sharedUserList ??= new List(); - return new MachineLearningPipelineJob( - description, - properties, - tags, + return new ServicePrincipalAuthTypeWorkspaceConnectionProperties( + MachineLearningConnectionAuthType.ServicePrincipal, + category, + createdByWorkspaceArmId, + expiryOn, + group, + isSharedToAll, + target, + metadata, + sharedUserList?.ToList(), + value, + valueFormat, serializedAdditionalRawData: null, - componentId, - computeId, - displayName, - experimentName, - identity, - isArchived, - JobType.Pipeline, - notificationSetting, - services, - status, - inputs, - jobs, - outputs, - settings, - sourceJobId); - } - - /// Initializes a new instance of . - /// Full SAS Uri, including the storage, container/blob path and SAS token. - /// A new instance for mocking. - public static SasCredential SasCredential(Uri sasUri = null) - { - return new SasCredential(DataReferenceCredentialType.Sas, serializedAdditionalRawData: null, sasUri); - } - - /// Initializes a new instance of . - /// Full SAS Uri, including the storage, container/blob path and SAS token. - /// A new instance for mocking. - public static SasCredentialDto SasCredentialDto(Uri sasUri = null) - { - return new SasCredentialDto(PendingUploadCredentialType.Sas, serializedAdditionalRawData: null, sasUri); + credentials); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. + /// The asset property dictionary. /// Display name of job. + /// Status of the job. /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// ARM resource ID of the compute resource. + /// Is the asset archived?. /// /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. /// Defaults to AmlToken if null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// Is the asset archived?. + /// ARM resource ID of the component resource. /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. - /// Archive files used in the job. - /// Arguments for the job. - /// [Required] arm-id of the code asset. - /// Spark configured properties. - /// - /// [Required] The entry to execute on startup of the job. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// Compute Resource configuration for the job. + /// + /// The ARM resource ID of the Environment specification for the job. + /// This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated environment version when running the job. /// - /// The ARM resource ID of the Environment specification for the job. /// Environment variables included in the job. - /// Files used in the job. - /// - /// Mapping of input data bindings used in the job. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . + /// + /// [Required] This represents scenario which can be one of Tables/NLP/Image + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , , , and . /// - /// Jar files used in the job. /// /// Mapping of output data bindings used in the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , and . /// - /// Python files used in the job. /// Queue settings for the job. - /// Compute Resource configuration for the job. - /// A new instance for mocking. - public static SparkJob SparkJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, NotificationSetting notificationSetting = null, IDictionary services = null, MachineLearningJobStatus? status = null, IEnumerable archives = null, string args = null, ResourceIdentifier codeId = null, IDictionary conf = null, SparkJobEntry entry = null, ResourceIdentifier environmentId = null, IDictionary environmentVariables = null, IEnumerable files = null, IDictionary inputs = null, IEnumerable jars = null, IDictionary outputs = null, IEnumerable pyFiles = null, JobTier? queueJobTier = null, SparkResourceConfiguration resources = null) + /// A new instance for mocking. + public static AutoMLJob AutoMLJob(string description = null, IDictionary tags = null, IDictionary properties = null, string displayName = null, MachineLearningJobStatus? status = null, string experimentName = null, IDictionary services = null, ResourceIdentifier computeId = null, bool? isArchived = null, MachineLearningIdentityConfiguration identity = null, ResourceIdentifier componentId = null, NotificationSetting notificationSetting = null, MachineLearningJobResourceConfiguration resources = null, string environmentId = null, IDictionary environmentVariables = null, AutoMLVertical taskDetails = null, IDictionary outputs = null, JobTier? queueJobTier = null) { - properties ??= new Dictionary(); tags ??= new Dictionary(); + properties ??= new Dictionary(); services ??= new Dictionary(); - archives ??= new List(); - conf ??= new Dictionary(); environmentVariables ??= new Dictionary(); - files ??= new List(); - inputs ??= new Dictionary(); - jars ??= new List(); outputs ??= new Dictionary(); - pyFiles ??= new List(); - return new SparkJob( + return new AutoMLJob( description, - properties, tags, + properties, serializedAdditionalRawData: null, - componentId, - computeId, + JobType.AutoML, displayName, + status, experimentName, - identity, + services, + computeId, isArchived, - JobType.Spark, + identity, + componentId, notificationSetting, - services, - status, - archives?.ToList(), - args, - codeId, - conf, - entry, + resources, environmentId, environmentVariables, - files?.ToList(), - inputs, - jars?.ToList(), + taskDetails, outputs, - pyFiles?.ToList(), - queueJobTier != null ? new JobQueueSettings(queueJobTier, serializedAdditionalRawData: null) : null, - resources); + queueJobTier != null ? new JobQueueSettings(queueJobTier, serializedAdditionalRawData: null) : null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. - /// Display name of job. - /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - /// - /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. - /// Defaults to AmlToken if null. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// Is the asset archived?. - /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. - /// - /// Early termination policies enable canceling poor-performing runs before they complete - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// - /// Mapping of input data bindings used in the job. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// Sweep Job limit. - /// [Required] Optimization objective. - /// - /// Mapping of output data bindings used in the job. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - /// Queue settings for the job. - /// - /// [Required] The hyperparameter sampling algorithm - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The asset property dictionary. + /// Readonly property to indicate if datastore is the workspace default datastore. + /// + /// [Required] Account credentials. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . /// - /// [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. - /// [Required] Trial component definition. - /// A new instance for mocking. - public static MachineLearningSweepJob MachineLearningSweepJob(string description = null, IDictionary properties = null, IDictionary tags = null, ResourceIdentifier componentId = null, ResourceIdentifier computeId = null, string displayName = null, string experimentName = null, MachineLearningIdentityConfiguration identity = null, bool? isArchived = null, NotificationSetting notificationSetting = null, IDictionary services = null, MachineLearningJobStatus? status = null, MachineLearningEarlyTerminationPolicy earlyTermination = null, IDictionary inputs = null, MachineLearningSweepJobLimits limits = null, MachineLearningObjective objective = null, IDictionary outputs = null, JobTier? queueJobTier = null, SamplingAlgorithm samplingAlgorithm = null, BinaryData searchSpace = null, MachineLearningTrialComponent trial = null) + /// Storage account name. + /// Storage account container name. + /// Azure cloud endpoint for the storage account. + /// Protocol used to communicate with the storage account. + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Azure Subscription Id. + /// Azure Resource Group name. + /// A new instance for mocking. + public static MachineLearningAzureBlobDatastore MachineLearningAzureBlobDatastore(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isDefault = null, MachineLearningDatastoreCredentials credentials = null, string accountName = null, string containerName = null, string endpoint = null, string protocol = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null, string subscriptionId = null, string resourceGroup = null) { - properties ??= new Dictionary(); tags ??= new Dictionary(); - services ??= new Dictionary(); - inputs ??= new Dictionary(); - outputs ??= new Dictionary(); + properties ??= new Dictionary(); - return new MachineLearningSweepJob( + return new MachineLearningAzureBlobDatastore( description, - properties, tags, + properties, serializedAdditionalRawData: null, - componentId, - computeId, - displayName, - experimentName, - identity, - isArchived, - JobType.Sweep, - notificationSetting, - services, - status, - earlyTermination, - inputs, - limits, - objective, - outputs, - queueJobTier != null ? new JobQueueSettings(queueJobTier, serializedAdditionalRawData: null) : null, - samplingAlgorithm, - searchSpace, - trial); + DatastoreType.AzureBlob, + isDefault, + credentials, + accountName, + containerName, + endpoint, + protocol, + serviceDataAccessAuthIdentity, + subscriptionId, + resourceGroup); } - /// Initializes a new instance of . - /// Log verbosity for the job. - /// - /// Target column name: This is prediction values column. - /// Also known as label column name in context of classification tasks. - /// - /// [Required] Training data input. - /// - /// Primary metric for Text-Classification-Multilabel task. - /// Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Readonly property to indicate if datastore is the workspace default datastore. + /// + /// [Required] Account credentials. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . /// - /// Featurization inputs needed for AutoML job. - /// Execution constraints for AutoMLJob. - /// Validation data inputs. - /// A new instance for mocking. - public static TextClassificationMultilabel TextClassificationMultilabel(MachineLearningLogVerbosity? logVerbosity = null, string targetColumnName = null, MachineLearningTableJobInput trainingData = null, ClassificationMultilabelPrimaryMetric? primaryMetric = null, string featurizationDatasetLanguage = null, NlpVerticalLimitSettings limitSettings = null, MachineLearningTableJobInput validationData = null) + /// [Required] Azure Data Lake store name. + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Azure Subscription Id. + /// Azure Resource Group name. + /// A new instance for mocking. + public static MachineLearningAzureDataLakeGen1Datastore MachineLearningAzureDataLakeGen1Datastore(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isDefault = null, MachineLearningDatastoreCredentials credentials = null, string storeName = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null, string subscriptionId = null, string resourceGroup = null) { - return new TextClassificationMultilabel( - logVerbosity, - targetColumnName, - TaskType.TextClassificationMultilabel, - trainingData, + tags ??= new Dictionary(); + properties ??= new Dictionary(); + + return new MachineLearningAzureDataLakeGen1Datastore( + description, + tags, + properties, serializedAdditionalRawData: null, - primaryMetric, - featurizationDatasetLanguage != null ? new NlpVerticalFeaturizationSettings(featurizationDatasetLanguage, serializedAdditionalRawData: null) : null, - limitSettings, - validationData); + DatastoreType.AzureDataLakeGen1, + isDefault, + credentials, + storeName, + serviceDataAccessAuthIdentity, + subscriptionId, + resourceGroup); } - /// Initializes a new instance of . - /// Log verbosity for the job. - /// - /// Target column name: This is prediction values column. - /// Also known as label column name in context of classification tasks. - /// - /// [Required] Training data input. - /// - /// Primary metric for Text-NER task. - /// Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Readonly property to indicate if datastore is the workspace default datastore. + /// + /// [Required] Account credentials. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . /// - /// Featurization inputs needed for AutoML job. - /// Execution constraints for AutoMLJob. - /// Validation data inputs. - /// A new instance for mocking. - public static TextNer TextNer(MachineLearningLogVerbosity? logVerbosity = null, string targetColumnName = null, MachineLearningTableJobInput trainingData = null, ClassificationPrimaryMetric? primaryMetric = null, string featurizationDatasetLanguage = null, NlpVerticalLimitSettings limitSettings = null, MachineLearningTableJobInput validationData = null) + /// [Required] The name of the Data Lake Gen2 filesystem. + /// [Required] Storage account name. + /// Azure cloud endpoint for the storage account. + /// Protocol used to communicate with the storage account. + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Azure Subscription Id. + /// Azure Resource Group name. + /// A new instance for mocking. + public static MachineLearningAzureDataLakeGen2Datastore MachineLearningAzureDataLakeGen2Datastore(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isDefault = null, MachineLearningDatastoreCredentials credentials = null, string filesystem = null, string accountName = null, string endpoint = null, string protocol = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null, string subscriptionId = null, string resourceGroup = null) { - return new TextNer( - logVerbosity, - targetColumnName, - TaskType.TextNER, - trainingData, + tags ??= new Dictionary(); + properties ??= new Dictionary(); + + return new MachineLearningAzureDataLakeGen2Datastore( + description, + tags, + properties, serializedAdditionalRawData: null, - primaryMetric, - featurizationDatasetLanguage != null ? new NlpVerticalFeaturizationSettings(featurizationDatasetLanguage, serializedAdditionalRawData: null) : null, - limitSettings, - validationData); + DatastoreType.AzureDataLakeGen2, + isDefault, + credentials, + filesystem, + accountName, + endpoint, + protocol, + serviceDataAccessAuthIdentity, + subscriptionId, + resourceGroup); } - /// Initializes a new instance of . - /// Category of the connection. - /// - /// - /// - /// Group based on connection category. - /// - /// Store user metadata for this connection. - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static AadAuthTypeWorkspaceConnectionProperties AadAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, string error = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, IDictionary metadata = null, ManagedPERequirement? peRequirement = null, ManagedPEStatus? peStatus = null, IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = null) + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Readonly property to indicate if datastore is the workspace default datastore. + /// + /// [Required] Account credentials. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// [Required] Storage account name. + /// [Required] The name of the Azure file share that the datastore points to. + /// Azure cloud endpoint for the storage account. + /// Protocol used to communicate with the storage account. + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Azure Subscription Id. + /// Azure Resource Group name. + /// A new instance for mocking. + public static MachineLearningAzureFileDatastore MachineLearningAzureFileDatastore(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isDefault = null, MachineLearningDatastoreCredentials credentials = null, string accountName = null, string fileShareName = null, string endpoint = null, string protocol = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null, string subscriptionId = null, string resourceGroup = null) { - metadata ??= new Dictionary(); - sharedUserList ??= new List(); + tags ??= new Dictionary(); + properties ??= new Dictionary(); - return new AadAuthTypeWorkspaceConnectionProperties( - MachineLearningConnectionAuthType.Aad, - category, - createdByWorkspaceArmId, - error, - expiryOn, - group, - isSharedToAll, - metadata, - peRequirement, - peStatus, - sharedUserList?.ToList(), - target, - useWorkspaceManagedIdentity, - serializedAdditionalRawData: null); + return new MachineLearningAzureFileDatastore( + description, + tags, + properties, + serializedAdditionalRawData: null, + DatastoreType.AzureFile, + isDefault, + credentials, + accountName, + fileShareName, + endpoint, + protocol, + serviceDataAccessAuthIdentity, + subscriptionId, + resourceGroup); } - /// Initializes a new instance of . - /// Category of the connection. - /// - /// - /// - /// Group based on connection category. - /// - /// Store user metadata for this connection. - /// - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static AccessKeyAuthTypeWorkspaceConnectionProperties AccessKeyAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, string error = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, IDictionary metadata = null, ManagedPERequirement? peRequirement = null, ManagedPEStatus? peStatus = null, IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = null, WorkspaceConnectionAccessKey credentials = null) + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Display name of job. + /// Status of the job. + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// ARM resource ID of the compute resource. + /// Is the asset archived?. + /// + /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + /// Defaults to AmlToken if null. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// ARM resource ID of the component resource. + /// Notification setting for the job. + /// Compute Resource configuration for the job. + /// ARM resource ID of the code asset. + /// [Required] The command to execute on startup of the job. eg. "python train.py". + /// [Required] The ARM resource ID of the Environment specification for the job. + /// + /// Mapping of input data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// + /// Mapping of output data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , and . + /// + /// + /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Command Job limit. + /// Environment variables included in the job. + /// Input parameters. + /// Queue settings for the job. + /// A new instance for mocking. + public static MachineLearningCommandJob MachineLearningCommandJob(string description = null, IDictionary tags = null, IDictionary properties = null, string displayName = null, MachineLearningJobStatus? status = null, string experimentName = null, IDictionary services = null, ResourceIdentifier computeId = null, bool? isArchived = null, MachineLearningIdentityConfiguration identity = null, ResourceIdentifier componentId = null, NotificationSetting notificationSetting = null, MachineLearningJobResourceConfiguration resources = null, ResourceIdentifier codeId = null, string command = null, ResourceIdentifier environmentId = null, IDictionary inputs = null, IDictionary outputs = null, MachineLearningDistributionConfiguration distribution = null, MachineLearningCommandJobLimits limits = null, IDictionary environmentVariables = null, BinaryData parameters = null, JobTier? queueJobTier = null) { - metadata ??= new Dictionary(); - sharedUserList ??= new List(); + tags ??= new Dictionary(); + properties ??= new Dictionary(); + services ??= new Dictionary(); + inputs ??= new Dictionary(); + outputs ??= new Dictionary(); + environmentVariables ??= new Dictionary(); - return new AccessKeyAuthTypeWorkspaceConnectionProperties( - MachineLearningConnectionAuthType.AccessKey, - category, - createdByWorkspaceArmId, - error, - expiryOn, - group, - isSharedToAll, - metadata, - peRequirement, - peStatus, - sharedUserList?.ToList(), - target, - useWorkspaceManagedIdentity, + return new MachineLearningCommandJob( + description, + tags, + properties, serializedAdditionalRawData: null, - credentials); - } + JobType.Command, + displayName, + status, + experimentName, + services, + computeId, + isArchived, + identity, + componentId, + notificationSetting, + resources, + codeId, + command, + environmentId, + inputs, + outputs, + distribution, + limits, + environmentVariables, + parameters, + queueJobTier != null ? new JobQueueSettings(queueJobTier, serializedAdditionalRawData: null) : null); + } - /// Initializes a new instance of . - /// Category of the connection. - /// - /// - /// - /// Group based on connection category. - /// - /// Store user metadata for this connection. - /// - /// - /// - /// - /// - /// Account key object for workspace connection credential. - /// A new instance for mocking. - public static AccountKeyAuthTypeWorkspaceConnectionProperties AccountKeyAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, string error = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, IDictionary metadata = null, ManagedPERequirement? peRequirement = null, ManagedPEStatus? peStatus = null, IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = null, string credentialsKey = null) + /// Initializes a new instance of . + /// DockerCredential user name. + /// DockerCredential user password. + /// A new instance for mocking. + public static DockerCredential DockerCredential(string userName = null, string password = null) { - metadata ??= new Dictionary(); - sharedUserList ??= new List(); - - return new AccountKeyAuthTypeWorkspaceConnectionProperties( - MachineLearningConnectionAuthType.AccountKey, - category, - createdByWorkspaceArmId, - error, - expiryOn, - group, - isSharedToAll, - metadata, - peRequirement, - peStatus, - sharedUserList?.ToList(), - target, - useWorkspaceManagedIdentity, - serializedAdditionalRawData: null, - credentialsKey != null ? new WorkspaceConnectionAccountKey(credentialsKey, serializedAdditionalRawData: null) : null); + return new DockerCredential(DataReferenceCredentialType.DockerCredentials, serializedAdditionalRawData: null, userName, password); } - /// Initializes a new instance of . - /// Category of the connection. - /// - /// - /// - /// Group based on connection category. - /// - /// Store user metadata for this connection. - /// - /// - /// - /// - /// - /// Api key object for workspace connection credential. - /// A new instance for mocking. - public static ApiKeyAuthWorkspaceConnectionProperties ApiKeyAuthWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, string error = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, IDictionary metadata = null, ManagedPERequirement? peRequirement = null, ManagedPEStatus? peStatus = null, IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = null, string credentialsKey = null) + /// Initializes a new instance of . + /// Description of the endpoint deployment. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Code configuration for the endpoint deployment. + /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// Environment variables configuration for the deployment. + /// + /// Scale settings for the deployment. + /// If it is null or not provided, + /// it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + /// and to DefaultScaleSettings for ManagedOnlineDeployment. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Request settings for the deployment. + /// The path to mount the model in custom container. + /// If true, enables Application Insights logging. + /// Liveness probe monitors the health of the container regularly. + /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. + /// Provisioning state for the endpoint deployment. + /// Compute instance type. + /// The URI path to the model. + /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + /// The mdc configuration, we disable mdc when it's null. + /// The resource requirements for the container (cpu and memory). + /// A new instance for mocking. + public static MachineLearningKubernetesOnlineDeployment MachineLearningKubernetesOnlineDeployment(string description = null, IDictionary properties = null, MachineLearningCodeConfiguration codeConfiguration = null, string environmentId = null, IDictionary environmentVariables = null, MachineLearningOnlineScaleSettings scaleSettings = null, MachineLearningOnlineRequestSettings requestSettings = null, string modelMountPath = null, bool? appInsightsEnabled = null, MachineLearningProbeSettings livenessProbe = null, MachineLearningProbeSettings readinessProbe = null, MachineLearningDeploymentProvisioningState? provisioningState = null, string instanceType = null, string model = null, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = null, DataCollector dataCollector = null, MachineLearningContainerResourceRequirements containerResourceRequirements = null) { - metadata ??= new Dictionary(); - sharedUserList ??= new List(); + properties ??= new Dictionary(); + environmentVariables ??= new Dictionary(); - return new ApiKeyAuthWorkspaceConnectionProperties( - MachineLearningConnectionAuthType.ApiKey, - category, - createdByWorkspaceArmId, - error, - expiryOn, - group, - isSharedToAll, - metadata, - peRequirement, - peStatus, - sharedUserList?.ToList(), - target, - useWorkspaceManagedIdentity, + return new MachineLearningKubernetesOnlineDeployment( + description, + properties, + codeConfiguration, + environmentId, + environmentVariables, serializedAdditionalRawData: null, - credentialsKey != null ? new WorkspaceConnectionApiKey(credentialsKey, serializedAdditionalRawData: null) : null); + MachineLearningEndpointComputeType.Kubernetes, + scaleSettings, + requestSettings, + modelMountPath, + appInsightsEnabled, + livenessProbe, + readinessProbe, + provisioningState, + instanceType, + model, + egressPublicNetworkAccess, + dataCollector, + containerResourceRequirements); } - /// Initializes a new instance of . - /// The failure reason if the creation failed. - /// Read-only provision state status property. - /// Model used for the endpoint deployment. - /// The name of RAI policy. - /// Deployment model version upgrade option. - /// A new instance for mocking. - public static ContentSafetyEndpointDeploymentResourceProperties ContentSafetyEndpointDeploymentResourceProperties(string failureReason = null, DefaultResourceProvisioningState? provisioningState = null, EndpointDeploymentModel model = null, string raiPolicyName = null, DeploymentModelVersionUpgradeOption? versionUpgradeOption = null) + /// Initializes a new instance of . + /// ManagedIdentityCredential identity type. + /// Full arm scope for the Id. For ManagedIdentityType = SystemManaged, this field is null. + /// ClientId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. + /// PrincipalId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. + /// TenantId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. + /// A new instance for mocking. + public static ManagedIdentityCredential ManagedIdentityCredential(string managedIdentityType = null, string userManagedIdentityResourceId = null, string userManagedIdentityClientId = null, string userManagedIdentityPrincipalId = null, string userManagedIdentityTenantId = null) { - return new ContentSafetyEndpointDeploymentResourceProperties( - failureReason, - provisioningState, - "Azure.ContentSafety", + return new ManagedIdentityCredential( + DataReferenceCredentialType.ManagedIdentity, serializedAdditionalRawData: null, - model, - raiPolicyName, - versionUpgradeOption); - } - - /// Initializes a new instance of . - /// Byo resource id for creating the built-in model service endpoints. - /// Deployments info. - /// Uri of the endpoint. - /// The failure reason if the creation failed. - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace - /// - /// Name of the endpoint. - /// Read-only provision state status property. - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - /// A new instance for mocking. - public static ContentSafetyEndpointResourceProperties ContentSafetyEndpointResourceProperties(ResourceIdentifier associatedResourceId = null, IEnumerable deployments = null, Uri endpointUri = null, string failureReason = null, AzureLocation? location = null, string name = null, DefaultResourceProvisioningState? provisioningState = null, bool? shouldCreateAiServicesEndpoint = null) - { - deployments ??= new List(); - - return new ContentSafetyEndpointResourceProperties( - associatedResourceId, - deployments?.ToList(), - EndpointType.AzureContentSafety, - endpointUri, - failureReason, - location, - name, - provisioningState, - shouldCreateAiServicesEndpoint, - serializedAdditionalRawData: null); + managedIdentityType, + userManagedIdentityResourceId, + userManagedIdentityClientId, + userManagedIdentityPrincipalId, + userManagedIdentityTenantId); } - /// Initializes a new instance of . - /// Category of the connection. - /// - /// - /// - /// Group based on connection category. - /// - /// Store user metadata for this connection. - /// - /// - /// - /// - /// - /// Custom Keys credential object. - /// A new instance for mocking. - public static CustomKeysWorkspaceConnectionProperties CustomKeysWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, string error = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, IDictionary metadata = null, ManagedPERequirement? peRequirement = null, ManagedPEStatus? peStatus = null, IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = null, IDictionary credentialsKeys = null) + /// Initializes a new instance of . + /// Description of the endpoint deployment. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Code configuration for the endpoint deployment. + /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// Environment variables configuration for the deployment. + /// + /// Scale settings for the deployment. + /// If it is null or not provided, + /// it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + /// and to DefaultScaleSettings for ManagedOnlineDeployment. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Request settings for the deployment. + /// The path to mount the model in custom container. + /// If true, enables Application Insights logging. + /// Liveness probe monitors the health of the container regularly. + /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. + /// Provisioning state for the endpoint deployment. + /// Compute instance type. + /// The URI path to the model. + /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + /// The mdc configuration, we disable mdc when it's null. + /// A new instance for mocking. + public static MachineLearningManagedOnlineDeployment MachineLearningManagedOnlineDeployment(string description = null, IDictionary properties = null, MachineLearningCodeConfiguration codeConfiguration = null, string environmentId = null, IDictionary environmentVariables = null, MachineLearningOnlineScaleSettings scaleSettings = null, MachineLearningOnlineRequestSettings requestSettings = null, string modelMountPath = null, bool? appInsightsEnabled = null, MachineLearningProbeSettings livenessProbe = null, MachineLearningProbeSettings readinessProbe = null, MachineLearningDeploymentProvisioningState? provisioningState = null, string instanceType = null, string model = null, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = null, DataCollector dataCollector = null) { - metadata ??= new Dictionary(); - sharedUserList ??= new List(); - credentialsKeys ??= new Dictionary(); + properties ??= new Dictionary(); + environmentVariables ??= new Dictionary(); - return new CustomKeysWorkspaceConnectionProperties( - MachineLearningConnectionAuthType.CustomKeys, - category, - createdByWorkspaceArmId, - error, - expiryOn, - group, - isSharedToAll, - metadata, - peRequirement, - peStatus, - sharedUserList?.ToList(), - target, - useWorkspaceManagedIdentity, + return new MachineLearningManagedOnlineDeployment( + description, + properties, + codeConfiguration, + environmentId, + environmentVariables, serializedAdditionalRawData: null, - credentialsKeys != null ? new CustomKeys(credentialsKeys, serializedAdditionalRawData: null) : null); + MachineLearningEndpointComputeType.Managed, + scaleSettings, + requestSettings, + modelMountPath, + appInsightsEnabled, + livenessProbe, + readinessProbe, + provisioningState, + instanceType, + model, + egressPublicNetworkAccess, + dataCollector); } - /// Initializes a new instance of . - /// Category of a managed network Outbound Rule of a machine learning workspace. - /// - /// Type of a managed network Outbound Rule of a machine learning workspace. - /// - /// A new instance for mocking. - public static FqdnOutboundRule FqdnOutboundRule(OutboundRuleCategory? category = null, IEnumerable parentRuleNames = null, OutboundRuleStatus? status = null, string destination = null) + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Readonly property to indicate if datastore is the workspace default datastore. + /// + /// [Required] Account credentials. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + /// + /// [Required] OneLake artifact backing the datastore. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// [Required] OneLake workspace name. + /// OneLake endpoint to use for the datastore. + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// A new instance for mocking. + public static OneLakeDatastore OneLakeDatastore(string description = null, IDictionary tags = null, IDictionary properties = null, bool? isDefault = null, MachineLearningDatastoreCredentials credentials = null, OneLakeArtifact artifact = null, string oneLakeWorkspaceName = null, string endpoint = null, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = null) { - parentRuleNames ??= new List(); + tags ??= new Dictionary(); + properties ??= new Dictionary(); - return new FqdnOutboundRule( - category, - parentRuleNames?.ToList(), - status, - OutboundRuleType.Fqdn, + return new OneLakeDatastore( + description, + tags, + properties, serializedAdditionalRawData: null, - destination); + DatastoreType.OneLake, + isDefault, + credentials, + artifact, + oneLakeWorkspaceName, + endpoint, + serviceDataAccessAuthIdentity); } - /// Initializes a new instance of . - /// Category of the connection. - /// - /// - /// - /// Group based on connection category. - /// - /// Store user metadata for this connection. - /// - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static MachineLearningManagedIdentityAuthTypeWorkspaceConnection MachineLearningManagedIdentityAuthTypeWorkspaceConnection(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, string error = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, IDictionary metadata = null, ManagedPERequirement? peRequirement = null, ManagedPEStatus? peStatus = null, IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = null, MachineLearningWorkspaceConnectionManagedIdentity credentials = null) + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Display name of job. + /// Status of the job. + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// ARM resource ID of the compute resource. + /// Is the asset archived?. + /// + /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + /// Defaults to AmlToken if null. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// ARM resource ID of the component resource. + /// Notification setting for the job. + /// Pipeline settings, for things like ContinueRunOnStepFailure etc. + /// Jobs construct the Pipeline Job. + /// + /// Inputs for the pipeline job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// + /// Outputs for the pipeline job + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , and . + /// + /// ARM resource ID of source job. + /// A new instance for mocking. + public static MachineLearningPipelineJob MachineLearningPipelineJob(string description = null, IDictionary tags = null, IDictionary properties = null, string displayName = null, MachineLearningJobStatus? status = null, string experimentName = null, IDictionary services = null, ResourceIdentifier computeId = null, bool? isArchived = null, MachineLearningIdentityConfiguration identity = null, ResourceIdentifier componentId = null, NotificationSetting notificationSetting = null, BinaryData settings = null, IDictionary jobs = null, IDictionary inputs = null, IDictionary outputs = null, ResourceIdentifier sourceJobId = null) { - metadata ??= new Dictionary(); - sharedUserList ??= new List(); + tags ??= new Dictionary(); + properties ??= new Dictionary(); + services ??= new Dictionary(); + jobs ??= new Dictionary(); + inputs ??= new Dictionary(); + outputs ??= new Dictionary(); - return new MachineLearningManagedIdentityAuthTypeWorkspaceConnection( - MachineLearningConnectionAuthType.ManagedIdentity, - category, - createdByWorkspaceArmId, - error, - expiryOn, - group, - isSharedToAll, - metadata, - peRequirement, - peStatus, - sharedUserList?.ToList(), - target, - useWorkspaceManagedIdentity, + return new MachineLearningPipelineJob( + description, + tags, + properties, serializedAdditionalRawData: null, - credentials); + JobType.Pipeline, + displayName, + status, + experimentName, + services, + computeId, + isArchived, + identity, + componentId, + notificationSetting, + settings, + jobs, + inputs, + outputs, + sourceJobId); } - /// Initializes a new instance of . - /// The failure reason if the creation failed. - /// Read-only provision state status property. - /// Enum to determine endpoint compute type. - /// - /// A new instance for mocking. - public static ManagedOnlineEndpointDeploymentResourceProperties ManagedOnlineEndpointDeploymentResourceProperties(string failureReason = null, DefaultResourceProvisioningState? provisioningState = null, MachineLearningEndpointComputeType? endpointComputeType = null, string model = null) + /// Initializes a new instance of . + /// Full SAS Uri, including the storage, container/blob path and SAS token. + /// A new instance for mocking. + public static SasCredential SasCredential(Uri sasUri = null) { - return new ManagedOnlineEndpointDeploymentResourceProperties( - failureReason, - provisioningState, - "managedOnlineEndpoint", - serializedAdditionalRawData: null, - endpointComputeType, - model); - } - - /// Initializes a new instance of . - /// Byo resource id for creating the built-in model service endpoints. - /// Deployments info. - /// Uri of the endpoint. - /// The failure reason if the creation failed. - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace - /// - /// Name of the endpoint. - /// Read-only provision state status property. - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - /// Enum to determine endpoint authentication mode. - /// - /// - /// Dictionary of <integer>. - /// - /// Dictionary of <integer>. - /// A new instance for mocking. - public static ManagedOnlineEndpointResourceProperties ManagedOnlineEndpointResourceProperties(ResourceIdentifier associatedResourceId = null, IEnumerable deployments = null, Uri endpointUri = null, string failureReason = null, AzureLocation? location = null, string name = null, DefaultResourceProvisioningState? provisioningState = null, bool? shouldCreateAiServicesEndpoint = null, MachineLearningEndpointAuthMode? authMode = null, string compute = null, string description = null, IDictionary mirrorTraffic = null, Uri scoringUri = null, IDictionary traffic = null) - { - deployments ??= new List(); - mirrorTraffic ??= new Dictionary(); - traffic ??= new Dictionary(); - - return new ManagedOnlineEndpointResourceProperties( - associatedResourceId, - deployments?.ToList(), - EndpointType.ManagedOnlineEndpoint, - endpointUri, - failureReason, - location, - name, - provisioningState, - shouldCreateAiServicesEndpoint, - serializedAdditionalRawData: null, - authMode, - compute, - description, - mirrorTraffic, - scoringUri, - traffic); + return new SasCredential(DataReferenceCredentialType.Sas, serializedAdditionalRawData: null, sasUri); } - /// Initializes a new instance of . - /// Category of the connection. - /// - /// - /// - /// Group based on connection category. - /// - /// Store user metadata for this connection. - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static MachineLearningNoneAuthTypeWorkspaceConnection MachineLearningNoneAuthTypeWorkspaceConnection(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, string error = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, IDictionary metadata = null, ManagedPERequirement? peRequirement = null, ManagedPEStatus? peStatus = null, IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = null) + /// Initializes a new instance of . + /// Full SAS Uri, including the storage, container/blob path and SAS token. + /// A new instance for mocking. + public static SasCredentialDto SasCredentialDto(Uri sasUri = null) { - metadata ??= new Dictionary(); - sharedUserList ??= new List(); - - return new MachineLearningNoneAuthTypeWorkspaceConnection( - MachineLearningConnectionAuthType.None, - category, - createdByWorkspaceArmId, - error, - expiryOn, - group, - isSharedToAll, - metadata, - peRequirement, - peStatus, - sharedUserList?.ToList(), - target, - useWorkspaceManagedIdentity, - serializedAdditionalRawData: null); + return new SasCredentialDto(PendingUploadCredentialType.Sas, serializedAdditionalRawData: null, sasUri); } - /// Initializes a new instance of . - /// Category of the connection. - /// - /// - /// - /// Group based on connection category. - /// - /// Store user metadata for this connection. - /// - /// - /// - /// - /// - /// - /// ClientId and ClientSecret are required. Other properties are optional - /// depending on each OAuth2 provider's implementation. + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Display name of job. + /// Status of the job. + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. /// - /// A new instance for mocking. - public static OAuth2AuthTypeWorkspaceConnectionProperties OAuth2AuthTypeWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, string error = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, IDictionary metadata = null, ManagedPERequirement? peRequirement = null, ManagedPEStatus? peStatus = null, IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = null, WorkspaceConnectionOAuth2 credentials = null) + /// ARM resource ID of the compute resource. + /// Is the asset archived?. + /// + /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + /// Defaults to AmlToken if null. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// ARM resource ID of the component resource. + /// Notification setting for the job. + /// Compute Resource configuration for the job. + /// Arguments for the job. + /// [Required] arm-id of the code asset. + /// + /// [Required] The entry to execute on startup of the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// The ARM resource ID of the Environment specification for the job. + /// + /// Mapping of input data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// + /// Mapping of output data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , and . + /// + /// Python files used in the job. + /// Jar files used in the job. + /// Files used in the job. + /// Archive files used in the job. + /// Spark configured properties. + /// Queue settings for the job. + /// Environment variables included in the job. + /// A new instance for mocking. + public static SparkJob SparkJob(string description = null, IDictionary tags = null, IDictionary properties = null, string displayName = null, MachineLearningJobStatus? status = null, string experimentName = null, IDictionary services = null, ResourceIdentifier computeId = null, bool? isArchived = null, MachineLearningIdentityConfiguration identity = null, ResourceIdentifier componentId = null, NotificationSetting notificationSetting = null, SparkResourceConfiguration resources = null, string args = null, ResourceIdentifier codeId = null, SparkJobEntry entry = null, ResourceIdentifier environmentId = null, IDictionary inputs = null, IDictionary outputs = null, IEnumerable pyFiles = null, IEnumerable jars = null, IEnumerable files = null, IEnumerable archives = null, IDictionary conf = null, JobTier? queueJobTier = null, IDictionary environmentVariables = null) { - metadata ??= new Dictionary(); - sharedUserList ??= new List(); + tags ??= new Dictionary(); + properties ??= new Dictionary(); + services ??= new Dictionary(); + inputs ??= new Dictionary(); + outputs ??= new Dictionary(); + pyFiles ??= new List(); + jars ??= new List(); + files ??= new List(); + archives ??= new List(); + conf ??= new Dictionary(); + environmentVariables ??= new Dictionary(); - return new OAuth2AuthTypeWorkspaceConnectionProperties( - MachineLearningConnectionAuthType.OAuth2, - category, - createdByWorkspaceArmId, - error, - expiryOn, - group, - isSharedToAll, - metadata, - peRequirement, - peStatus, - sharedUserList?.ToList(), - target, - useWorkspaceManagedIdentity, + return new SparkJob( + description, + tags, + properties, serializedAdditionalRawData: null, - credentials); + JobType.Spark, + displayName, + status, + experimentName, + services, + computeId, + isArchived, + identity, + componentId, + notificationSetting, + resources, + args, + codeId, + entry, + environmentId, + inputs, + outputs, + pyFiles?.ToList(), + jars?.ToList(), + files?.ToList(), + archives?.ToList(), + conf, + queueJobTier != null ? new JobQueueSettings(queueJobTier, serializedAdditionalRawData: null) : null, + environmentVariables); } - /// Initializes a new instance of . - /// The failure reason if the creation failed. - /// Read-only provision state status property. - /// Model used for the endpoint deployment. - /// The name of RAI policy. - /// Deployment model version upgrade option. - /// A new instance for mocking. - public static OpenAIEndpointDeploymentResourceProperties OpenAIEndpointDeploymentResourceProperties(string failureReason = null, DefaultResourceProvisioningState? provisioningState = null, EndpointDeploymentModel model = null, string raiPolicyName = null, DeploymentModelVersionUpgradeOption? versionUpgradeOption = null) - { - return new OpenAIEndpointDeploymentResourceProperties( - failureReason, - provisioningState, - "Azure.OpenAI", - serializedAdditionalRawData: null, - model, - raiPolicyName, - versionUpgradeOption); - } - - /// Initializes a new instance of . - /// Byo resource id for creating the built-in model service endpoints. - /// Deployments info. - /// Uri of the endpoint. - /// The failure reason if the creation failed. - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace + /// Initializes a new instance of . + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. + /// Display name of job. + /// Status of the job. + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. /// - /// Name of the endpoint. - /// Read-only provision state status property. - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - /// A new instance for mocking. - public static OpenAIEndpointResourceProperties OpenAIEndpointResourceProperties(ResourceIdentifier associatedResourceId = null, IEnumerable deployments = null, Uri endpointUri = null, string failureReason = null, AzureLocation? location = null, string name = null, DefaultResourceProvisioningState? provisioningState = null, bool? shouldCreateAiServicesEndpoint = null) - { - deployments ??= new List(); - - return new OpenAIEndpointResourceProperties( - associatedResourceId, - deployments?.ToList(), - EndpointType.AzureOpenAI, - endpointUri, - failureReason, - location, - name, - provisioningState, - shouldCreateAiServicesEndpoint, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Category of the connection. - /// - /// - /// - /// Group based on connection category. - /// - /// Store user metadata for this connection. - /// - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static MachineLearningPatAuthTypeWorkspaceConnection MachineLearningPatAuthTypeWorkspaceConnection(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, string error = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, IDictionary metadata = null, ManagedPERequirement? peRequirement = null, ManagedPEStatus? peStatus = null, IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = null, string credentialsPat = null) + /// ARM resource ID of the compute resource. + /// Is the asset archived?. + /// + /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + /// Defaults to AmlToken if null. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// ARM resource ID of the component resource. + /// Notification setting for the job. + /// [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. + /// + /// [Required] The hyperparameter sampling algorithm + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Sweep Job limit. + /// + /// Early termination policies enable canceling poor-performing runs before they complete + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// [Required] Optimization objective. + /// [Required] Trial component definition. + /// + /// Mapping of input data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + /// + /// Mapping of output data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , and . + /// + /// Queue settings for the job. + /// A new instance for mocking. + public static MachineLearningSweepJob MachineLearningSweepJob(string description = null, IDictionary tags = null, IDictionary properties = null, string displayName = null, MachineLearningJobStatus? status = null, string experimentName = null, IDictionary services = null, ResourceIdentifier computeId = null, bool? isArchived = null, MachineLearningIdentityConfiguration identity = null, ResourceIdentifier componentId = null, NotificationSetting notificationSetting = null, BinaryData searchSpace = null, SamplingAlgorithm samplingAlgorithm = null, MachineLearningSweepJobLimits limits = null, MachineLearningEarlyTerminationPolicy earlyTermination = null, MachineLearningObjective objective = null, MachineLearningTrialComponent trial = null, IDictionary inputs = null, IDictionary outputs = null, JobTier? queueJobTier = null) { - metadata ??= new Dictionary(); - sharedUserList ??= new List(); + tags ??= new Dictionary(); + properties ??= new Dictionary(); + services ??= new Dictionary(); + inputs ??= new Dictionary(); + outputs ??= new Dictionary(); - return new MachineLearningPatAuthTypeWorkspaceConnection( - MachineLearningConnectionAuthType.Pat, - category, - createdByWorkspaceArmId, - error, - expiryOn, - group, - isSharedToAll, - metadata, - peRequirement, - peStatus, - sharedUserList?.ToList(), - target, - useWorkspaceManagedIdentity, + return new MachineLearningSweepJob( + description, + tags, + properties, serializedAdditionalRawData: null, - credentialsPat != null ? new WorkspaceConnectionPersonalAccessToken(credentialsPat, serializedAdditionalRawData: null) : null); - } - - /// Initializes a new instance of . - /// Category of a managed network Outbound Rule of a machine learning workspace. - /// - /// Type of a managed network Outbound Rule of a machine learning workspace. - /// Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace. - /// - /// A new instance for mocking. - public static PrivateEndpointOutboundRule PrivateEndpointOutboundRule(OutboundRuleCategory? category = null, IEnumerable parentRuleNames = null, OutboundRuleStatus? status = null, PrivateEndpointDestination destination = null, IEnumerable fqdns = null) - { - parentRuleNames ??= new List(); - fqdns ??= new List(); - - return new PrivateEndpointOutboundRule( - category, - parentRuleNames?.ToList(), + JobType.Sweep, + displayName, status, - OutboundRuleType.PrivateEndpoint, - serializedAdditionalRawData: null, - destination, - fqdns?.ToList()); - } - - /// Initializes a new instance of . - /// Category of the connection. - /// - /// - /// - /// Group based on connection category. - /// - /// Store user metadata for this connection. - /// - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static MachineLearningSasAuthTypeWorkspaceConnection MachineLearningSasAuthTypeWorkspaceConnection(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, string error = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, IDictionary metadata = null, ManagedPERequirement? peRequirement = null, ManagedPEStatus? peStatus = null, IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = null, string credentialsSas = null) - { - metadata ??= new Dictionary(); - sharedUserList ??= new List(); - - return new MachineLearningSasAuthTypeWorkspaceConnection( - MachineLearningConnectionAuthType.Sas, - category, - createdByWorkspaceArmId, - error, - expiryOn, - group, - isSharedToAll, - metadata, - peRequirement, - peStatus, - sharedUserList?.ToList(), - target, - useWorkspaceManagedIdentity, - serializedAdditionalRawData: null, - credentialsSas != null ? new WorkspaceConnectionSharedAccessSignature(credentialsSas, serializedAdditionalRawData: null) : null); + experimentName, + services, + computeId, + isArchived, + identity, + componentId, + notificationSetting, + searchSpace, + samplingAlgorithm, + limits, + earlyTermination, + objective, + trial, + inputs, + outputs, + queueJobTier != null ? new JobQueueSettings(queueJobTier, serializedAdditionalRawData: null) : null); } - /// Initializes a new instance of . - /// Byo resource id for creating the built-in model service endpoints. - /// Deployments info. - /// Uri of the endpoint. - /// The failure reason if the creation failed. - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace + /// Initializes a new instance of . + /// Log verbosity for the job. + /// [Required] Training data input. + /// + /// Target column name: This is prediction values column. + /// Also known as label column name in context of classification tasks. /// - /// Name of the endpoint. - /// Read-only provision state status property. - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - /// - /// - /// - /// State of the Serverless Endpoint. - /// - /// - /// Anything. - /// - /// - /// A new instance for mocking. - public static ServerlessEndpointResourceProperties ServerlessEndpointResourceProperties(ResourceIdentifier associatedResourceId = null, IEnumerable deployments = null, Uri endpointUri = null, string failureReason = null, AzureLocation? location = null, string name = null, DefaultResourceProvisioningState? provisioningState = null, bool? shouldCreateAiServicesEndpoint = null, ServerlessInferenceEndpointAuthMode? authMode = null, ServerlessEndpointCapacityReservation capacityReservation = null, ContentSafetyStatus? contentSafetyStatus = null, ServerlessEndpointState? endpointState = null, ServerlessEndpointInferenceEndpoint inferenceEndpoint = null, string marketplaceSubscriptionId = null, BinaryData metadata = null, string modelId = null, ServerlessOffer offer = null) - { - deployments ??= new List(); - - return new ServerlessEndpointResourceProperties( - associatedResourceId, - deployments?.ToList(), - EndpointType.ServerlessEndpoint, - endpointUri, - failureReason, - location, - name, - provisioningState, - shouldCreateAiServicesEndpoint, - serializedAdditionalRawData: null, - authMode, - capacityReservation, - contentSafetyStatus.HasValue ? new ServerlessEndpointContentSafety(contentSafetyStatus.Value, serializedAdditionalRawData: null) : null, - endpointState, - inferenceEndpoint, - marketplaceSubscriptionId, - metadata, - modelId != null ? new ServerlessEndpointModelSettings(modelId, serializedAdditionalRawData: null) : null, - offer); - } - - /// Initializes a new instance of . - /// Dictionary of <string>. - /// - /// A new instance for mocking. - public static ServerlessEndpointInferenceEndpoint ServerlessEndpointInferenceEndpoint(IReadOnlyDictionary headers = null, Uri uri = null) - { - headers ??= new Dictionary(); - - return new ServerlessEndpointInferenceEndpoint(headers, uri, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Category of the connection. - /// - /// - /// - /// Group based on connection category. - /// - /// Store user metadata for this connection. - /// - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static ServicePrincipalAuthTypeWorkspaceConnectionProperties ServicePrincipalAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, string error = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, IDictionary metadata = null, ManagedPERequirement? peRequirement = null, ManagedPEStatus? peStatus = null, IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = null, WorkspaceConnectionServicePrincipal credentials = null) - { - metadata ??= new Dictionary(); - sharedUserList ??= new List(); - - return new ServicePrincipalAuthTypeWorkspaceConnectionProperties( - MachineLearningConnectionAuthType.ServicePrincipal, - category, - createdByWorkspaceArmId, - error, - expiryOn, - group, - isSharedToAll, - metadata, - peRequirement, - peStatus, - sharedUserList?.ToList(), - target, - useWorkspaceManagedIdentity, - serializedAdditionalRawData: null, - credentials); - } - - /// Initializes a new instance of . - /// The action enum for networking rule. - /// Optional, if provided, the ServiceTag property will be ignored. - /// - /// - /// - /// A new instance for mocking. - public static ServiceTagDestination ServiceTagDestination(NetworkingRuleAction? action = null, IEnumerable addressPrefixes = null, string portRanges = null, string protocol = null, string serviceTag = null) - { - addressPrefixes ??= new List(); - - return new ServiceTagDestination( - action, - addressPrefixes?.ToList(), - portRanges, - protocol, - serviceTag, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Category of a managed network Outbound Rule of a machine learning workspace. - /// - /// Type of a managed network Outbound Rule of a machine learning workspace. - /// Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. - /// A new instance for mocking. - public static ServiceTagOutboundRule ServiceTagOutboundRule(OutboundRuleCategory? category = null, IEnumerable parentRuleNames = null, OutboundRuleStatus? status = null, ServiceTagDestination destination = null) + /// + /// Primary metric for Text-Classification-Multilabel task. + /// Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. + /// + /// Execution constraints for AutoMLJob. + /// Featurization inputs needed for AutoML job. + /// Validation data inputs. + /// A new instance for mocking. + public static TextClassificationMultilabel TextClassificationMultilabel(MachineLearningLogVerbosity? logVerbosity = null, MachineLearningTableJobInput trainingData = null, string targetColumnName = null, ClassificationMultilabelPrimaryMetric? primaryMetric = null, NlpVerticalLimitSettings limitSettings = null, string featurizationDatasetLanguage = null, MachineLearningTableJobInput validationData = null) { - parentRuleNames ??= new List(); - - return new ServiceTagOutboundRule( - category, - parentRuleNames?.ToList(), - status, - OutboundRuleType.ServiceTag, + return new TextClassificationMultilabel( + TaskType.TextClassificationMultilabel, + logVerbosity, + trainingData, + targetColumnName, serializedAdditionalRawData: null, - destination); + primaryMetric, + limitSettings, + featurizationDatasetLanguage != null ? new NlpVerticalFeaturizationSettings(featurizationDatasetLanguage, serializedAdditionalRawData: null) : null, + validationData); } - /// Initializes a new instance of . - /// The failure reason if the creation failed. - /// Read-only provision state status property. - /// Model used for the endpoint deployment. - /// The name of RAI policy. - /// Deployment model version upgrade option. - /// A new instance for mocking. - public static SpeechEndpointDeploymentResourceProperties SpeechEndpointDeploymentResourceProperties(string failureReason = null, DefaultResourceProvisioningState? provisioningState = null, EndpointDeploymentModel model = null, string raiPolicyName = null, DeploymentModelVersionUpgradeOption? versionUpgradeOption = null) - { - return new SpeechEndpointDeploymentResourceProperties( - failureReason, - provisioningState, - "Azure.Speech", - serializedAdditionalRawData: null, - model, - raiPolicyName, - versionUpgradeOption); - } - - /// Initializes a new instance of . - /// Byo resource id for creating the built-in model service endpoints. - /// Deployments info. - /// Uri of the endpoint. - /// The failure reason if the creation failed. - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace + /// Initializes a new instance of . + /// Log verbosity for the job. + /// [Required] Training data input. + /// + /// Target column name: This is prediction values column. + /// Also known as label column name in context of classification tasks. /// - /// Name of the endpoint. - /// Read-only provision state status property. - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - /// A new instance for mocking. - public static SpeechEndpointResourceProperties SpeechEndpointResourceProperties(ResourceIdentifier associatedResourceId = null, IEnumerable deployments = null, Uri endpointUri = null, string failureReason = null, AzureLocation? location = null, string name = null, DefaultResourceProvisioningState? provisioningState = null, bool? shouldCreateAiServicesEndpoint = null) - { - deployments ??= new List(); - - return new SpeechEndpointResourceProperties( - associatedResourceId, - deployments?.ToList(), - EndpointType.AzureSpeech, - endpointUri, - failureReason, - location, - name, - provisioningState, - shouldCreateAiServicesEndpoint, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Category of the connection. - /// - /// - /// - /// Group based on connection category. - /// - /// Store user metadata for this connection. - /// - /// - /// - /// - /// - /// - /// A new instance for mocking. - public static MachineLearningUsernamePasswordAuthTypeWorkspaceConnection MachineLearningUsernamePasswordAuthTypeWorkspaceConnection(MachineLearningConnectionCategory? category = null, ResourceIdentifier createdByWorkspaceArmId = null, string error = null, DateTimeOffset? expiryOn = null, ConnectionGroup? group = null, bool? isSharedToAll = null, IDictionary metadata = null, ManagedPERequirement? peRequirement = null, ManagedPEStatus? peStatus = null, IEnumerable sharedUserList = null, string target = null, bool? useWorkspaceManagedIdentity = null, MachineLearningWorkspaceConnectionUsernamePassword credentials = null) + /// + /// Primary metric for Text-NER task. + /// Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. + /// + /// Execution constraints for AutoMLJob. + /// Featurization inputs needed for AutoML job. + /// Validation data inputs. + /// A new instance for mocking. + public static TextNer TextNer(MachineLearningLogVerbosity? logVerbosity = null, MachineLearningTableJobInput trainingData = null, string targetColumnName = null, ClassificationPrimaryMetric? primaryMetric = null, NlpVerticalLimitSettings limitSettings = null, string featurizationDatasetLanguage = null, MachineLearningTableJobInput validationData = null) { - metadata ??= new Dictionary(); - sharedUserList ??= new List(); - - return new MachineLearningUsernamePasswordAuthTypeWorkspaceConnection( - MachineLearningConnectionAuthType.UsernamePassword, - category, - createdByWorkspaceArmId, - error, - expiryOn, - group, - isSharedToAll, - metadata, - peRequirement, - peStatus, - sharedUserList?.ToList(), - target, - useWorkspaceManagedIdentity, + return new TextNer( + TaskType.TextNER, + logVerbosity, + trainingData, + targetColumnName, serializedAdditionalRawData: null, - credentials); + primaryMetric, + limitSettings, + featurizationDatasetLanguage != null ? new NlpVerticalFeaturizationSettings(featurizationDatasetLanguage, serializedAdditionalRawData: null) : null, + validationData); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointDeploymentResourcePropertiesBasicResourceData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointDeploymentResourcePropertiesBasicResourceData.Serialization.cs deleted file mode 100644 index ad099275825de..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointDeploymentResourcePropertiesBasicResourceData.Serialization.cs +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class EndpointDeploymentResourcePropertiesBasicResourceData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointDeploymentResourcePropertiesBasicResourceData)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - 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 - } - } - writer.WriteEndObject(); - } - - EndpointDeploymentResourcePropertiesBasicResourceData 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(EndpointDeploymentResourcePropertiesBasicResourceData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(document.RootElement, options); - } - - internal static EndpointDeploymentResourcePropertiesBasicResourceData DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - EndpointDeploymentResourceProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = EndpointDeploymentResourceProperties.DeserializeEndpointDeploymentResourceProperties(property.Value, options); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointDeploymentResourcePropertiesBasicResourceData( - id, - name, - type, - systemData, - properties, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointDeploymentResourcePropertiesBasicResourceData)} does not support writing '{options.Format}' format."); - } - } - - EndpointDeploymentResourcePropertiesBasicResourceData 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 DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointDeploymentResourcePropertiesBasicResourceData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointDeploymentResourcePropertiesBasicResourceData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointDeploymentResourcePropertiesBasicResourceData.cs deleted file mode 100644 index 1860ef8e1a60a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointDeploymentResourcePropertiesBasicResourceData.cs +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the EndpointDeploymentResourcePropertiesBasicResource data model. - public partial class EndpointDeploymentResourcePropertiesBasicResourceData : ResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - /// is null. - public EndpointDeploymentResourcePropertiesBasicResourceData(EndpointDeploymentResourceProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - /// Keeps track of any properties unknown to the library. - internal EndpointDeploymentResourcePropertiesBasicResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EndpointDeploymentResourceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal EndpointDeploymentResourcePropertiesBasicResourceData() - { - } - - /// - /// Gets or sets the properties - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - public EndpointDeploymentResourceProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResource.Serialization.cs deleted file mode 100644 index 5b6d657920015..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class EndpointResourcePropertiesBasicResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - EndpointResourcePropertiesBasicResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - EndpointResourcePropertiesBasicResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResource.cs deleted file mode 100644 index 8fb6c0371ce27..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResource.cs +++ /dev/null @@ -1,623 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing an EndpointResourcePropertiesBasicResource along with the instance operations that can be performed on it. - /// If you have a you can construct an - /// from an instance of using the GetEndpointResourcePropertiesBasicResource method. - /// Otherwise you can get one from its parent resource using the GetEndpointResourcePropertiesBasicResource method. - /// - public partial class EndpointResourcePropertiesBasicResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The workspaceName. - /// The endpointName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics; - private readonly EndpointRestOperations _endpointResourcePropertiesBasicResourceEndpointRestClient; - private readonly EndpointResourcePropertiesBasicResourceData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/endpoints"; - - /// Initializes a new instance of the class for mocking. - protected EndpointResourcePropertiesBasicResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal EndpointResourcePropertiesBasicResource(ArmClient client, EndpointResourcePropertiesBasicResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal EndpointResourcePropertiesBasicResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string endpointResourcePropertiesBasicResourceEndpointApiVersion); - _endpointResourcePropertiesBasicResourceEndpointRestClient = new EndpointRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, endpointResourcePropertiesBasicResourceEndpointApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual EndpointResourcePropertiesBasicResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// Gets a collection of WorkspaceEndpointDeploymentResources in the EndpointResourcePropertiesBasicResource. - /// An object representing collection of WorkspaceEndpointDeploymentResources and their operations over a WorkspaceEndpointDeploymentResource. - public virtual WorkspaceEndpointDeploymentCollection GetWorkspaceEndpointDeployments() - { - return GetCachedClient(client => new WorkspaceEndpointDeploymentCollection(client, Id)); - } - - /// - /// Get deployments under endpoint resource by name - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetWorkspaceEndpointDeploymentAsync(string deploymentName, CancellationToken cancellationToken = default) - { - return await GetWorkspaceEndpointDeployments().GetAsync(deploymentName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get deployments under endpoint resource by name - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetWorkspaceEndpointDeployment(string deploymentName, CancellationToken cancellationToken = default) - { - return GetWorkspaceEndpointDeployments().Get(deploymentName, cancellationToken); - } - - /// Gets a collection of WorkspaceEndpointRaiPolicyResources in the EndpointResourcePropertiesBasicResource. - /// An object representing collection of WorkspaceEndpointRaiPolicyResources and their operations over a WorkspaceEndpointRaiPolicyResource. - public virtual WorkspaceEndpointRaiPolicyCollection GetWorkspaceEndpointRaiPolicies() - { - return GetCachedClient(client => new WorkspaceEndpointRaiPolicyCollection(client, Id)); - } - - /// - /// Gets the specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetWorkspaceEndpointRaiPolicyAsync(string raiPolicyName, CancellationToken cancellationToken = default) - { - return await GetWorkspaceEndpointRaiPolicies().GetAsync(raiPolicyName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetWorkspaceEndpointRaiPolicy(string raiPolicyName, CancellationToken cancellationToken = default) - { - return GetWorkspaceEndpointRaiPolicies().Get(raiPolicyName, cancellationToken); - } - - /// - /// Gets endpoint resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} - /// - /// - /// Operation Id - /// Endpoint_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResource.Get"); - scope.Start(); - try - { - var response = await _endpointResourcePropertiesBasicResourceEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EndpointResourcePropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets endpoint resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} - /// - /// - /// Operation Id - /// Endpoint_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResource.Get"); - scope.Start(); - try - { - var response = _endpointResourcePropertiesBasicResourceEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EndpointResourcePropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update endpoint resource with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} - /// - /// - /// Operation Id - /// Endpoint_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Endpoint resource object. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, EndpointResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResource.Update"); - scope.Start(); - try - { - var response = await _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new EndpointResourcePropertiesBasicResourceOperationSource(Client), _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics, Pipeline, _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update endpoint resource with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} - /// - /// - /// Operation Id - /// Endpoint_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Endpoint resource object. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, EndpointResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResource.Update"); - scope.Start(); - try - { - var response = _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(new EndpointResourcePropertiesBasicResourceOperationSource(Client), _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics, Pipeline, _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List keys for the endpoint resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/listKeys - /// - /// - /// Operation Id - /// Endpoint_ListKeys - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetKeysAsync(CancellationToken cancellationToken = default) - { - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResource.GetKeys"); - scope.Start(); - try - { - var response = await _endpointResourcePropertiesBasicResourceEndpointRestClient.ListKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List keys for the endpoint resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/listKeys - /// - /// - /// Operation Id - /// Endpoint_ListKeys - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response GetKeys(CancellationToken cancellationToken = default) - { - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResource.GetKeys"); - scope.Start(); - try - { - var response = _endpointResourcePropertiesBasicResourceEndpointRestClient.ListKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get available models under the endpoint resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/models - /// - /// - /// Operation Id - /// Endpoint_GetModels - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetModelsAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateGetModelsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateGetModelsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => EndpointModelProperties.DeserializeEndpointModelProperties(e), _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics, Pipeline, "EndpointResourcePropertiesBasicResource.GetModels", "value", "nextLink", cancellationToken); - } - - /// - /// Get available models under the endpoint resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/models - /// - /// - /// Operation Id - /// Endpoint_GetModels - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetModels(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateGetModelsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateGetModelsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => EndpointModelProperties.DeserializeEndpointModelProperties(e), _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics, Pipeline, "EndpointResourcePropertiesBasicResource.GetModels", "value", "nextLink", cancellationToken); - } - - /// - /// Regenerate account keys - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/regenerateKey - /// - /// - /// Operation Id - /// Endpoint_RegenerateKeys - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual async Task> RegenerateKeysAsync(RegenerateServiceAccountKeyContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResource.RegenerateKeys"); - scope.Start(); - try - { - var response = await _endpointResourcePropertiesBasicResourceEndpointRestClient.RegenerateKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Regenerate account keys - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/regenerateKey - /// - /// - /// Operation Id - /// Endpoint_RegenerateKeys - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual Response RegenerateKeys(RegenerateServiceAccountKeyContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResource.RegenerateKeys"); - scope.Start(); - try - { - var response = _endpointResourcePropertiesBasicResourceEndpointRestClient.RegenerateKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResourceCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResourceCollection.cs deleted file mode 100644 index 246888d98fcad..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResourceCollection.cs +++ /dev/null @@ -1,502 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get an instance call the GetEndpointResourcePropertiesBasicResources method from an instance of . - /// - public partial class EndpointResourcePropertiesBasicResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics; - private readonly EndpointRestOperations _endpointResourcePropertiesBasicResourceEndpointRestClient; - - /// Initializes a new instance of the class for mocking. - protected EndpointResourcePropertiesBasicResourceCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal EndpointResourcePropertiesBasicResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", EndpointResourcePropertiesBasicResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(EndpointResourcePropertiesBasicResource.ResourceType, out string endpointResourcePropertiesBasicResourceEndpointApiVersion); - _endpointResourcePropertiesBasicResourceEndpointRestClient = new EndpointRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, endpointResourcePropertiesBasicResourceEndpointApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != MachineLearningWorkspaceResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningWorkspaceResource.ResourceType), nameof(id)); - } - - /// - /// Create or update endpoint resource with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} - /// - /// - /// Operation Id - /// Endpoint_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the endpoint resource. - /// Endpoint resource object. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string endpointName, EndpointResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new EndpointResourcePropertiesBasicResourceOperationSource(Client), _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics, Pipeline, _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update endpoint resource with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} - /// - /// - /// Operation Id - /// Endpoint_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the endpoint resource. - /// Endpoint resource object. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string endpointName, EndpointResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new EndpointResourcePropertiesBasicResourceOperationSource(Client), _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics, Pipeline, _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets endpoint resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} - /// - /// - /// Operation Id - /// Endpoint_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the endpoint resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResourceCollection.Get"); - scope.Start(); - try - { - var response = await _endpointResourcePropertiesBasicResourceEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EndpointResourcePropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets endpoint resource - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} - /// - /// - /// Operation Id - /// Endpoint_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the endpoint resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResourceCollection.Get"); - scope.Start(); - try - { - var response = _endpointResourcePropertiesBasicResourceEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EndpointResourcePropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List All the endpoints under this workspace - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints - /// - /// - /// Operation Id - /// Endpoint_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Endpoint type filter. - /// The ? to use. - /// Continuation token for pagination. - /// Whether the endpoint resource will be expand to include deployment information, e.g. $expand=deployments. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(EndpointType? endpointType = null, bool? includeInferenceEndpoints = null, string skip = null, string expand = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointType, includeInferenceEndpoints, skip, expand); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointType, includeInferenceEndpoints, skip, expand); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EndpointResourcePropertiesBasicResource(Client, EndpointResourcePropertiesBasicResourceData.DeserializeEndpointResourcePropertiesBasicResourceData(e)), _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics, Pipeline, "EndpointResourcePropertiesBasicResourceCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List All the endpoints under this workspace - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints - /// - /// - /// Operation Id - /// Endpoint_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Endpoint type filter. - /// The ? to use. - /// Continuation token for pagination. - /// Whether the endpoint resource will be expand to include deployment information, e.g. $expand=deployments. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(EndpointType? endpointType = null, bool? includeInferenceEndpoints = null, string skip = null, string expand = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointType, includeInferenceEndpoints, skip, expand); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _endpointResourcePropertiesBasicResourceEndpointRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointType, includeInferenceEndpoints, skip, expand); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EndpointResourcePropertiesBasicResource(Client, EndpointResourcePropertiesBasicResourceData.DeserializeEndpointResourcePropertiesBasicResourceData(e)), _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics, Pipeline, "EndpointResourcePropertiesBasicResourceCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} - /// - /// - /// Operation Id - /// Endpoint_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the endpoint resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResourceCollection.Exists"); - scope.Start(); - try - { - var response = await _endpointResourcePropertiesBasicResourceEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} - /// - /// - /// Operation Id - /// Endpoint_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the endpoint resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResourceCollection.Exists"); - scope.Start(); - try - { - var response = _endpointResourcePropertiesBasicResourceEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} - /// - /// - /// Operation Id - /// Endpoint_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the endpoint resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _endpointResourcePropertiesBasicResourceEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new EndpointResourcePropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} - /// - /// - /// Operation Id - /// Endpoint_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the endpoint resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var scope = _endpointResourcePropertiesBasicResourceEndpointClientDiagnostics.CreateScope("EndpointResourcePropertiesBasicResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = _endpointResourcePropertiesBasicResourceEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new EndpointResourcePropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResourceData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResourceData.Serialization.cs deleted file mode 100644 index 37c675081d5d8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResourceData.Serialization.cs +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class EndpointResourcePropertiesBasicResourceData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointResourcePropertiesBasicResourceData)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - 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 - } - } - writer.WriteEndObject(); - } - - EndpointResourcePropertiesBasicResourceData 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(EndpointResourcePropertiesBasicResourceData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointResourcePropertiesBasicResourceData(document.RootElement, options); - } - - internal static EndpointResourcePropertiesBasicResourceData DeserializeEndpointResourcePropertiesBasicResourceData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - EndpointResourceProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = EndpointResourceProperties.DeserializeEndpointResourceProperties(property.Value, options); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointResourcePropertiesBasicResourceData( - id, - name, - type, - systemData, - properties, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointResourcePropertiesBasicResourceData)} does not support writing '{options.Format}' format."); - } - } - - EndpointResourcePropertiesBasicResourceData 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 DeserializeEndpointResourcePropertiesBasicResourceData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointResourcePropertiesBasicResourceData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResourceData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResourceData.cs deleted file mode 100644 index 1a2f0a42b734f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EndpointResourcePropertiesBasicResourceData.cs +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the EndpointResourcePropertiesBasicResource data model. - public partial class EndpointResourcePropertiesBasicResourceData : ResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// is null. - public EndpointResourcePropertiesBasicResourceData(EndpointResourceProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - /// Keeps track of any properties unknown to the library. - internal EndpointResourcePropertiesBasicResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EndpointResourceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal EndpointResourcePropertiesBasicResourceData() - { - } - - /// - /// Gets or sets the properties - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - public EndpointResourceProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs index b3282d0cd39be..29db59b6ddfc4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs @@ -33,6 +33,25 @@ private static MockableMachineLearningSubscriptionResource GetMockableMachineLea return resource.GetCachedClient(client => new MockableMachineLearningSubscriptionResource(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. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static MachineLearningWorkspaceResource GetMachineLearningWorkspaceResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMachineLearningArmClient(client).GetMachineLearningWorkspaceResource(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. @@ -52,6 +71,63 @@ public static MachineLearningComputeResource GetMachineLearningComputeResource(t return GetMockableMachineLearningArmClient(client).GetMachineLearningComputeResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static MachineLearningPrivateEndpointConnectionResource GetMachineLearningPrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMachineLearningArmClient(client).GetMachineLearningPrivateEndpointConnectionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static MachineLearningWorkspaceConnectionResource GetMachineLearningWorkspaceConnectionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMachineLearningArmClient(client).GetMachineLearningWorkspaceConnectionResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static MachineLearningOutboundRuleBasicResource GetMachineLearningOutboundRuleBasicResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMachineLearningArmClient(client).GetMachineLearningOutboundRuleBasicResource(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. @@ -356,25 +432,6 @@ public static MachineLearningEnvironmentVersionResource GetMachineLearningEnviro return GetMockableMachineLearningArmClient(client).GetMachineLearningEnvironmentVersionResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static MarketplaceSubscriptionResource GetMarketplaceSubscriptionResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableMachineLearningArmClient(client).GetMarketplaceSubscriptionResource(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. @@ -622,6 +679,25 @@ public static MachineLearningJobResource GetMachineLearningJobResource(this ArmC return GetMockableMachineLearningArmClient(client).GetMachineLearningJobResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static MarketplaceSubscriptionResource GetMarketplaceSubscriptionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMachineLearningArmClient(client).GetMarketplaceSubscriptionResource(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. @@ -718,212 +794,96 @@ public static MachineLearningRegistryResource GetMachineLearningRegistryResource } /// - /// 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. + /// Gets a collection of MachineLearningWorkspaceResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static MachineLearningWorkspaceResource GetMachineLearningWorkspaceResource(this ArmClient client, ResourceIdentifier id) + /// The instance the method will execute against. + /// is null. + /// An object representing collection of MachineLearningWorkspaceResources and their operations over a MachineLearningWorkspaceResource. + public static MachineLearningWorkspaceCollection GetMachineLearningWorkspaces(this ResourceGroupResource resourceGroupResource) { - Argument.AssertNotNull(client, nameof(client)); + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableMachineLearningArmClient(client).GetMachineLearningWorkspaceResource(id); + return GetMockableMachineLearningResourceGroupResource(resourceGroupResource).GetMachineLearningWorkspaces(); } /// - /// 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. + /// Gets the properties of the specified machine learning workspace. + /// /// - /// Mocking - /// To mock this method, please mock instead. + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static MachineLearningWorkspaceConnectionResource GetMachineLearningWorkspaceConnectionResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableMachineLearningArmClient(client).GetMachineLearningWorkspaceConnectionResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. /// - /// Mocking - /// To mock this method, please mock instead. + /// Operation Id + /// Workspaces_Get /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static WorkspaceConnectionDeploymentResource GetWorkspaceConnectionDeploymentResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableMachineLearningArmClient(client).GetWorkspaceConnectionDeploymentResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. /// - /// Mocking - /// To mock this method, please mock instead. + /// Default Api Version + /// 2024-04-01 /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static WorkspaceEndpointDeploymentResource GetWorkspaceEndpointDeploymentResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableMachineLearningArmClient(client).GetWorkspaceEndpointDeploymentResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. /// - /// Mocking - /// To mock this method, please mock instead. + /// Resource + /// /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static RaiBlocklistPropertiesBasicResource GetRaiBlocklistPropertiesBasicResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableMachineLearningArmClient(client).GetRaiBlocklistPropertiesBasicResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static RaiBlocklistItemPropertiesBasicResource GetRaiBlocklistItemPropertiesBasicResource(this ArmClient client, ResourceIdentifier id) + /// The instance the method will execute against. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetMachineLearningWorkspaceAsync(this ResourceGroupResource resourceGroupResource, string workspaceName, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(client, nameof(client)); + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableMachineLearningArmClient(client).GetRaiBlocklistItemPropertiesBasicResource(id); + return await GetMockableMachineLearningResourceGroupResource(resourceGroupResource).GetMachineLearningWorkspaceAsync(workspaceName, cancellationToken).ConfigureAwait(false); } /// - /// 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. + /// Gets the properties of the specified machine learning workspace. + /// /// - /// Mocking - /// To mock this method, please mock instead. + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static WorkspaceConnectionRaiPolicyResource GetWorkspaceConnectionRaiPolicyResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableMachineLearningArmClient(client).GetWorkspaceConnectionRaiPolicyResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. /// - /// Mocking - /// To mock this method, please mock instead. + /// Operation Id + /// Workspaces_Get /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static WorkspaceEndpointRaiPolicyResource GetWorkspaceEndpointRaiPolicyResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableMachineLearningArmClient(client).GetWorkspaceEndpointRaiPolicyResource(id); - } - - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. /// - /// Mocking - /// To mock this method, please mock instead. + /// Default Api Version + /// 2024-04-01 /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static EndpointResourcePropertiesBasicResource GetEndpointResourcePropertiesBasicResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableMachineLearningArmClient(client).GetEndpointResourcePropertiesBasicResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. /// - /// Mocking - /// To mock this method, please mock instead. + /// Resource + /// /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static MachineLearningOutboundRuleBasicResource GetMachineLearningOutboundRuleBasicResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableMachineLearningArmClient(client).GetMachineLearningOutboundRuleBasicResource(id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static MachineLearningPrivateEndpointConnectionResource GetMachineLearningPrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) + /// The instance the method will execute against. + /// Name of Azure Machine Learning workspace. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetMachineLearningWorkspace(this ResourceGroupResource resourceGroupResource, string workspaceName, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(client, nameof(client)); + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableMachineLearningArmClient(client).GetMachineLearningPrivateEndpointConnectionResource(id); + return GetMockableMachineLearningResourceGroupResource(resourceGroupResource).GetMachineLearningWorkspace(workspaceName, cancellationToken); } /// @@ -956,7 +916,7 @@ public static MachineLearningRegistryCollection GetMachineLearningRegistries(thi /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -994,7 +954,7 @@ public static async Task> GetMachineLe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1019,99 +979,6 @@ public static Response GetMachineLearningRegist return GetMockableMachineLearningResourceGroupResource(resourceGroupResource).GetMachineLearningRegistry(registryName, cancellationToken); } - /// - /// Gets a collection of MachineLearningWorkspaceResources in the ResourceGroupResource. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// is null. - /// An object representing collection of MachineLearningWorkspaceResources and their operations over a MachineLearningWorkspaceResource. - public static MachineLearningWorkspaceCollection GetMachineLearningWorkspaces(this ResourceGroupResource resourceGroupResource) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableMachineLearningResourceGroupResource(resourceGroupResource).GetMachineLearningWorkspaces(); - } - - /// - /// Gets the properties of the specified machine learning workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} - /// - /// - /// Operation Id - /// Workspaces_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Azure Machine Learning Workspace Name. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static async Task> GetMachineLearningWorkspaceAsync(this ResourceGroupResource resourceGroupResource, string workspaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return await GetMockableMachineLearningResourceGroupResource(resourceGroupResource).GetMachineLearningWorkspaceAsync(workspaceName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the properties of the specified machine learning workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} - /// - /// - /// Operation Id - /// Workspaces_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Azure Machine Learning Workspace Name. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static Response GetMachineLearningWorkspace(this ResourceGroupResource resourceGroupResource, string workspaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableMachineLearningResourceGroupResource(resourceGroupResource).GetMachineLearningWorkspace(workspaceName, cancellationToken); - } - /// /// Gets the current usage information as well as limits for AML resources for given subscription and location. /// @@ -1125,7 +992,7 @@ public static Response GetMachineLearningWorks /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -1158,7 +1025,7 @@ public static AsyncPageable GetMachineLearningUsagesAsync( /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -1191,7 +1058,7 @@ public static Pageable GetMachineLearningUsages(this Subsc /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -1224,7 +1091,7 @@ public static AsyncPageable GetMachineLearningVmSizesAsyn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -1257,7 +1124,7 @@ public static Pageable GetMachineLearningVmSizes(this Sub /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -1291,7 +1158,7 @@ public static AsyncPageable UpdateMachineLe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -1325,7 +1192,7 @@ public static Pageable UpdateMachineLearnin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -1358,7 +1225,7 @@ public static AsyncPageable GetMachineLearningQuot /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -1391,7 +1258,7 @@ public static Pageable GetMachineLearningQuotas(th /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1427,7 +1294,7 @@ public static AsyncPageable GetMachineLearningR /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1449,83 +1316,5 @@ public static Pageable GetMachineLearningRegist return GetMockableMachineLearningSubscriptionResource(subscriptionResource).GetMachineLearningRegistries(cancellationToken); } - - /// - /// Lists all the available machine learning workspaces under the specified subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces - /// - /// - /// Operation Id - /// Workspaces_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Kind of workspace. - /// Continuation token for pagination. - /// The to use. - /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetMachineLearningWorkspacesAsync(this SubscriptionResource subscriptionResource, string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableMachineLearningSubscriptionResource(subscriptionResource).GetMachineLearningWorkspacesAsync(kind, skip, aiCapabilities, cancellationToken); - } - - /// - /// Lists all the available machine learning workspaces under the specified subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces - /// - /// - /// Operation Id - /// Workspaces_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Kind of workspace. - /// Continuation token for pagination. - /// The to use. - /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetMachineLearningWorkspaces(this SubscriptionResource subscriptionResource, string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableMachineLearningSubscriptionResource(subscriptionResource).GetMachineLearningWorkspaces(kind, skip, aiCapabilities, cancellationToken); - } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MockableMachineLearningArmClient.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MockableMachineLearningArmClient.cs index 71fe5700b4906..64009e42bc594 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MockableMachineLearningArmClient.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MockableMachineLearningArmClient.cs @@ -34,6 +34,18 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual MachineLearningWorkspaceResource GetMachineLearningWorkspaceResource(ResourceIdentifier id) + { + MachineLearningWorkspaceResource.ValidateResourceId(id); + return new MachineLearningWorkspaceResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -46,6 +58,42 @@ public virtual MachineLearningComputeResource GetMachineLearningComputeResource( return new MachineLearningComputeResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual MachineLearningPrivateEndpointConnectionResource GetMachineLearningPrivateEndpointConnectionResource(ResourceIdentifier id) + { + MachineLearningPrivateEndpointConnectionResource.ValidateResourceId(id); + return new MachineLearningPrivateEndpointConnectionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual MachineLearningWorkspaceConnectionResource GetMachineLearningWorkspaceConnectionResource(ResourceIdentifier id) + { + MachineLearningWorkspaceConnectionResource.ValidateResourceId(id); + return new MachineLearningWorkspaceConnectionResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual MachineLearningOutboundRuleBasicResource GetMachineLearningOutboundRuleBasicResource(ResourceIdentifier id) + { + MachineLearningOutboundRuleBasicResource.ValidateResourceId(id); + return new MachineLearningOutboundRuleBasicResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -238,18 +286,6 @@ public virtual MachineLearningEnvironmentVersionResource GetMachineLearningEnvir return new MachineLearningEnvironmentVersionResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual MarketplaceSubscriptionResource GetMarketplaceSubscriptionResource(ResourceIdentifier id) - { - MarketplaceSubscriptionResource.ValidateResourceId(id); - return new MarketplaceSubscriptionResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -406,6 +442,18 @@ public virtual MachineLearningJobResource GetMachineLearningJobResource(Resource return new MachineLearningJobResource(Client, id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual MarketplaceSubscriptionResource GetMarketplaceSubscriptionResource(ResourceIdentifier id) + { + MarketplaceSubscriptionResource.ValidateResourceId(id); + return new MarketplaceSubscriptionResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -465,137 +513,5 @@ public virtual MachineLearningRegistryResource GetMachineLearningRegistryResourc MachineLearningRegistryResource.ValidateResourceId(id); return new MachineLearningRegistryResource(Client, id); } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual MachineLearningWorkspaceResource GetMachineLearningWorkspaceResource(ResourceIdentifier id) - { - MachineLearningWorkspaceResource.ValidateResourceId(id); - return new MachineLearningWorkspaceResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual MachineLearningWorkspaceConnectionResource GetMachineLearningWorkspaceConnectionResource(ResourceIdentifier id) - { - MachineLearningWorkspaceConnectionResource.ValidateResourceId(id); - return new MachineLearningWorkspaceConnectionResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual WorkspaceConnectionDeploymentResource GetWorkspaceConnectionDeploymentResource(ResourceIdentifier id) - { - WorkspaceConnectionDeploymentResource.ValidateResourceId(id); - return new WorkspaceConnectionDeploymentResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual WorkspaceEndpointDeploymentResource GetWorkspaceEndpointDeploymentResource(ResourceIdentifier id) - { - WorkspaceEndpointDeploymentResource.ValidateResourceId(id); - return new WorkspaceEndpointDeploymentResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual RaiBlocklistPropertiesBasicResource GetRaiBlocklistPropertiesBasicResource(ResourceIdentifier id) - { - RaiBlocklistPropertiesBasicResource.ValidateResourceId(id); - return new RaiBlocklistPropertiesBasicResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual RaiBlocklistItemPropertiesBasicResource GetRaiBlocklistItemPropertiesBasicResource(ResourceIdentifier id) - { - RaiBlocklistItemPropertiesBasicResource.ValidateResourceId(id); - return new RaiBlocklistItemPropertiesBasicResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual WorkspaceConnectionRaiPolicyResource GetWorkspaceConnectionRaiPolicyResource(ResourceIdentifier id) - { - WorkspaceConnectionRaiPolicyResource.ValidateResourceId(id); - return new WorkspaceConnectionRaiPolicyResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual WorkspaceEndpointRaiPolicyResource GetWorkspaceEndpointRaiPolicyResource(ResourceIdentifier id) - { - WorkspaceEndpointRaiPolicyResource.ValidateResourceId(id); - return new WorkspaceEndpointRaiPolicyResource(Client, id); - } - - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual EndpointResourcePropertiesBasicResource GetEndpointResourcePropertiesBasicResource(ResourceIdentifier id) - { - EndpointResourcePropertiesBasicResource.ValidateResourceId(id); - return new EndpointResourcePropertiesBasicResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual MachineLearningOutboundRuleBasicResource GetMachineLearningOutboundRuleBasicResource(ResourceIdentifier id) - { - MachineLearningOutboundRuleBasicResource.ValidateResourceId(id); - return new MachineLearningOutboundRuleBasicResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual MachineLearningPrivateEndpointConnectionResource GetMachineLearningPrivateEndpointConnectionResource(ResourceIdentifier id) - { - MachineLearningPrivateEndpointConnectionResource.ValidateResourceId(id); - return new MachineLearningPrivateEndpointConnectionResource(Client, id); - } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MockableMachineLearningResourceGroupResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MockableMachineLearningResourceGroupResource.cs index 4a363a48d0d67..f76739261eadb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MockableMachineLearningResourceGroupResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MockableMachineLearningResourceGroupResource.cs @@ -33,142 +33,142 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// Gets a collection of MachineLearningRegistryResources in the ResourceGroupResource. - /// An object representing collection of MachineLearningRegistryResources and their operations over a MachineLearningRegistryResource. - public virtual MachineLearningRegistryCollection GetMachineLearningRegistries() + /// Gets a collection of MachineLearningWorkspaceResources in the ResourceGroupResource. + /// An object representing collection of MachineLearningWorkspaceResources and their operations over a MachineLearningWorkspaceResource. + public virtual MachineLearningWorkspaceCollection GetMachineLearningWorkspaces() { - return GetCachedClient(client => new MachineLearningRegistryCollection(client, Id)); + return GetCachedClient(client => new MachineLearningWorkspaceCollection(client, Id)); } /// - /// Get registry + /// Gets the properties of the specified machine learning workspace. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} /// /// /// Operation Id - /// Registries_Get + /// Workspaces_Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// - /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetMachineLearningRegistryAsync(string registryName, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningWorkspaceAsync(string workspaceName, CancellationToken cancellationToken = default) { - return await GetMachineLearningRegistries().GetAsync(registryName, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningWorkspaces().GetAsync(workspaceName, cancellationToken).ConfigureAwait(false); } /// - /// Get registry + /// Gets the properties of the specified machine learning workspace. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} /// /// /// Operation Id - /// Registries_Get + /// Workspaces_Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// - /// Name of Azure Machine Learning registry. This is case-insensitive. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetMachineLearningRegistry(string registryName, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningWorkspace(string workspaceName, CancellationToken cancellationToken = default) { - return GetMachineLearningRegistries().Get(registryName, cancellationToken); + return GetMachineLearningWorkspaces().Get(workspaceName, cancellationToken); } - /// Gets a collection of MachineLearningWorkspaceResources in the ResourceGroupResource. - /// An object representing collection of MachineLearningWorkspaceResources and their operations over a MachineLearningWorkspaceResource. - public virtual MachineLearningWorkspaceCollection GetMachineLearningWorkspaces() + /// Gets a collection of MachineLearningRegistryResources in the ResourceGroupResource. + /// An object representing collection of MachineLearningRegistryResources and their operations over a MachineLearningRegistryResource. + public virtual MachineLearningRegistryCollection GetMachineLearningRegistries() { - return GetCachedClient(client => new MachineLearningWorkspaceCollection(client, Id)); + return GetCachedClient(client => new MachineLearningRegistryCollection(client, Id)); } /// - /// Gets the properties of the specified machine learning workspace. + /// Get registry /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} /// /// /// Operation Id - /// Workspaces_Get + /// Registries_Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning registry. This is case-insensitive. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetMachineLearningWorkspaceAsync(string workspaceName, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningRegistryAsync(string registryName, CancellationToken cancellationToken = default) { - return await GetMachineLearningWorkspaces().GetAsync(workspaceName, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningRegistries().GetAsync(registryName, cancellationToken).ConfigureAwait(false); } /// - /// Gets the properties of the specified machine learning workspace. + /// Get registry /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName} /// /// /// Operation Id - /// Workspaces_Get + /// Registries_Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning registry. This is case-insensitive. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetMachineLearningWorkspace(string workspaceName, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningRegistry(string registryName, CancellationToken cancellationToken = default) { - return GetMachineLearningWorkspaces().Get(workspaceName, cancellationToken); + return GetMachineLearningRegistries().Get(registryName, cancellationToken); } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MockableMachineLearningSubscriptionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MockableMachineLearningSubscriptionResource.cs index 99b0ad2b86bab..776af233036b6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MockableMachineLearningSubscriptionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MockableMachineLearningSubscriptionResource.cs @@ -17,6 +17,8 @@ namespace Azure.ResourceManager.MachineLearning.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableMachineLearningSubscriptionResource : ArmResource { + private ClientDiagnostics _machineLearningWorkspaceWorkspacesClientDiagnostics; + private WorkspacesRestOperations _machineLearningWorkspaceWorkspacesRestClient; private ClientDiagnostics _usagesClientDiagnostics; private UsagesRestOperations _usagesRestClient; private ClientDiagnostics _virtualMachineSizesClientDiagnostics; @@ -25,8 +27,6 @@ public partial class MockableMachineLearningSubscriptionResource : ArmResource private QuotasRestOperations _quotasRestClient; private ClientDiagnostics _machineLearningRegistryRegistriesClientDiagnostics; private RegistriesRestOperations _machineLearningRegistryRegistriesRestClient; - private ClientDiagnostics _machineLearningWorkspaceWorkspacesClientDiagnostics; - private WorkspacesRestOperations _machineLearningWorkspaceWorkspacesRestClient; /// Initializes a new instance of the class for mocking. protected MockableMachineLearningSubscriptionResource() @@ -40,6 +40,8 @@ internal MockableMachineLearningSubscriptionResource(ArmClient client, ResourceI { } + private ClientDiagnostics MachineLearningWorkspaceWorkspacesClientDiagnostics => _machineLearningWorkspaceWorkspacesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningWorkspaceResource.ResourceType.Namespace, Diagnostics); + private WorkspacesRestOperations MachineLearningWorkspaceWorkspacesRestClient => _machineLearningWorkspaceWorkspacesRestClient ??= new WorkspacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(MachineLearningWorkspaceResource.ResourceType)); private ClientDiagnostics UsagesClientDiagnostics => _usagesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ProviderConstants.DefaultProviderNamespace, Diagnostics); private UsagesRestOperations UsagesRestClient => _usagesRestClient ??= new UsagesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics VirtualMachineSizesClientDiagnostics => _virtualMachineSizesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ProviderConstants.DefaultProviderNamespace, Diagnostics); @@ -48,8 +50,6 @@ internal MockableMachineLearningSubscriptionResource(ArmClient client, ResourceI private QuotasRestOperations QuotasRestClient => _quotasRestClient ??= new QuotasRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics MachineLearningRegistryRegistriesClientDiagnostics => _machineLearningRegistryRegistriesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningRegistryResource.ResourceType.Namespace, Diagnostics); private RegistriesRestOperations MachineLearningRegistryRegistriesRestClient => _machineLearningRegistryRegistriesRestClient ??= new RegistriesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(MachineLearningRegistryResource.ResourceType)); - private ClientDiagnostics MachineLearningWorkspaceWorkspacesClientDiagnostics => _machineLearningWorkspaceWorkspacesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningWorkspaceResource.ResourceType.Namespace, Diagnostics); - private WorkspacesRestOperations MachineLearningWorkspaceWorkspacesRestClient => _machineLearningWorkspaceWorkspacesRestClient ??= new WorkspacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(MachineLearningWorkspaceResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -57,6 +57,68 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// + /// Lists all the available machine learning workspaces under the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces + /// + /// + /// Operation Id + /// Workspaces_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Continuation token for pagination. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetMachineLearningWorkspacesAsync(string skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceResource(Client, MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(e)), MachineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MockableMachineLearningSubscriptionResource.GetMachineLearningWorkspaces", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all the available machine learning workspaces under the specified subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces + /// + /// + /// Operation Id + /// Workspaces_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Continuation token for pagination. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetMachineLearningWorkspaces(string skip = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceResource(Client, MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(e)), MachineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MockableMachineLearningSubscriptionResource.GetMachineLearningWorkspaces", "value", "nextLink", cancellationToken); + } + /// /// Gets the current usage information as well as limits for AML resources for given subscription and location. /// @@ -70,7 +132,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -97,7 +159,7 @@ public virtual AsyncPageable GetMachineLearningUsagesAsync /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -124,7 +186,7 @@ public virtual Pageable GetMachineLearningUsages(AzureLoca /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -150,7 +212,7 @@ public virtual AsyncPageable GetMachineLearningVmSizesAsy /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -176,7 +238,7 @@ public virtual Pageable GetMachineLearningVmSizes(AzureLo /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -206,7 +268,7 @@ public virtual AsyncPageable UpdateMachineL /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -236,7 +298,7 @@ public virtual Pageable UpdateMachineLearni /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -263,7 +325,7 @@ public virtual AsyncPageable GetMachineLearningQuo /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -290,7 +352,7 @@ public virtual Pageable GetMachineLearningQuotas(A /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -320,7 +382,7 @@ public virtual AsyncPageable GetMachineLearning /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -336,71 +398,5 @@ public virtual Pageable GetMachineLearningRegis HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MachineLearningRegistryRegistriesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningRegistryResource(Client, MachineLearningRegistryData.DeserializeMachineLearningRegistryData(e)), MachineLearningRegistryRegistriesClientDiagnostics, Pipeline, "MockableMachineLearningSubscriptionResource.GetMachineLearningRegistries", "value", "nextLink", cancellationToken); } - - /// - /// Lists all the available machine learning workspaces under the specified subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces - /// - /// - /// Operation Id - /// Workspaces_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Kind of workspace. - /// Continuation token for pagination. - /// The to use. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetMachineLearningWorkspacesAsync(string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, kind, skip, aiCapabilities); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, kind, skip, aiCapabilities); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceResource(Client, MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(e)), MachineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MockableMachineLearningSubscriptionResource.GetMachineLearningWorkspaces", "value", "nextLink", cancellationToken); - } - - /// - /// Lists all the available machine learning workspaces under the specified subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces - /// - /// - /// Operation Id - /// Workspaces_ListBySubscription - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Kind of workspace. - /// Continuation token for pagination. - /// The to use. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetMachineLearningWorkspaces(string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, kind, skip, aiCapabilities); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MachineLearningWorkspaceWorkspacesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, kind, skip, aiCapabilities); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceResource(Client, MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(e)), MachineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MockableMachineLearningSubscriptionResource.GetMachineLearningWorkspaces", "value", "nextLink", cancellationToken); - } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/EndpointResourcePropertiesBasicResourceOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/EndpointResourcePropertiesBasicResourceOperationSource.cs deleted file mode 100644 index 4f554006d1f07..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/EndpointResourcePropertiesBasicResourceOperationSource.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class EndpointResourcePropertiesBasicResourceOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal EndpointResourcePropertiesBasicResourceOperationSource(ArmClient client) - { - _client = client; - } - - EndpointResourcePropertiesBasicResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = EndpointResourcePropertiesBasicResourceData.DeserializeEndpointResourcePropertiesBasicResourceData(document.RootElement); - return new EndpointResourcePropertiesBasicResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = EndpointResourcePropertiesBasicResourceData.DeserializeEndpointResourcePropertiesBasicResourceData(document.RootElement); - return new EndpointResourcePropertiesBasicResource(_client, data); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/IListOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/IListOperationSource.cs deleted file mode 100644 index 431b3ba29f5c1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/IListOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class IListOperationSource : IOperationSource> - { - IList IOperationSource>.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(RaiBlocklistItemPropertiesBasicResourceData.DeserializeRaiBlocklistItemPropertiesBasicResourceData(item)); - } - return array; - } - - async ValueTask> IOperationSource>.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(RaiBlocklistItemPropertiesBasicResourceData.DeserializeRaiBlocklistItemPropertiesBasicResourceData(item)); - } - return array; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/RaiBlocklistItemPropertiesBasicResourceOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/RaiBlocklistItemPropertiesBasicResourceOperationSource.cs deleted file mode 100644 index 426c54311b8af..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/RaiBlocklistItemPropertiesBasicResourceOperationSource.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class RaiBlocklistItemPropertiesBasicResourceOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal RaiBlocklistItemPropertiesBasicResourceOperationSource(ArmClient client) - { - _client = client; - } - - RaiBlocklistItemPropertiesBasicResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = RaiBlocklistItemPropertiesBasicResourceData.DeserializeRaiBlocklistItemPropertiesBasicResourceData(document.RootElement); - return new RaiBlocklistItemPropertiesBasicResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = RaiBlocklistItemPropertiesBasicResourceData.DeserializeRaiBlocklistItemPropertiesBasicResourceData(document.RootElement); - return new RaiBlocklistItemPropertiesBasicResource(_client, data); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/RaiBlocklistPropertiesBasicResourceOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/RaiBlocklistPropertiesBasicResourceOperationSource.cs deleted file mode 100644 index 793b43a3cc613..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/RaiBlocklistPropertiesBasicResourceOperationSource.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class RaiBlocklistPropertiesBasicResourceOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal RaiBlocklistPropertiesBasicResourceOperationSource(ArmClient client) - { - _client = client; - } - - RaiBlocklistPropertiesBasicResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = RaiBlocklistPropertiesBasicResourceData.DeserializeRaiBlocklistPropertiesBasicResourceData(document.RootElement); - return new RaiBlocklistPropertiesBasicResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = RaiBlocklistPropertiesBasicResourceData.DeserializeRaiBlocklistPropertiesBasicResourceData(document.RootElement); - return new RaiBlocklistPropertiesBasicResource(_client, data); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/WorkspaceConnectionDeploymentOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/WorkspaceConnectionDeploymentOperationSource.cs deleted file mode 100644 index c5b5ab80b58b8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/WorkspaceConnectionDeploymentOperationSource.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class WorkspaceConnectionDeploymentOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal WorkspaceConnectionDeploymentOperationSource(ArmClient client) - { - _client = client; - } - - WorkspaceConnectionDeploymentResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(document.RootElement); - return new WorkspaceConnectionDeploymentResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(document.RootElement); - return new WorkspaceConnectionDeploymentResource(_client, data); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/WorkspaceConnectionRaiPolicyOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/WorkspaceConnectionRaiPolicyOperationSource.cs deleted file mode 100644 index 73fa1799c27a0..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/WorkspaceConnectionRaiPolicyOperationSource.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class WorkspaceConnectionRaiPolicyOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal WorkspaceConnectionRaiPolicyOperationSource(ArmClient client) - { - _client = client; - } - - WorkspaceConnectionRaiPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = RaiPolicyPropertiesBasicResourceData.DeserializeRaiPolicyPropertiesBasicResourceData(document.RootElement); - return new WorkspaceConnectionRaiPolicyResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = RaiPolicyPropertiesBasicResourceData.DeserializeRaiPolicyPropertiesBasicResourceData(document.RootElement); - return new WorkspaceConnectionRaiPolicyResource(_client, data); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/WorkspaceEndpointDeploymentOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/WorkspaceEndpointDeploymentOperationSource.cs deleted file mode 100644 index e6ea7c9ca04c0..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/WorkspaceEndpointDeploymentOperationSource.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class WorkspaceEndpointDeploymentOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal WorkspaceEndpointDeploymentOperationSource(ArmClient client) - { - _client = client; - } - - WorkspaceEndpointDeploymentResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(document.RootElement); - return new WorkspaceEndpointDeploymentResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(document.RootElement); - return new WorkspaceEndpointDeploymentResource(_client, data); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/WorkspaceEndpointRaiPolicyOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/WorkspaceEndpointRaiPolicyOperationSource.cs deleted file mode 100644 index 5a67333ed125c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/WorkspaceEndpointRaiPolicyOperationSource.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class WorkspaceEndpointRaiPolicyOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal WorkspaceEndpointRaiPolicyOperationSource(ArmClient client) - { - _client = client; - } - - WorkspaceEndpointRaiPolicyResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = RaiPolicyPropertiesBasicResourceData.DeserializeRaiPolicyPropertiesBasicResourceData(document.RootElement); - return new WorkspaceEndpointRaiPolicyResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = RaiPolicyPropertiesBasicResourceData.DeserializeRaiPolicyPropertiesBasicResourceData(document.RootElement); - return new WorkspaceEndpointRaiPolicyResource(_client, data); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerCollection.cs index 6b40365c0ec9c..1e96aec5060ae 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation Cr /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(st /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable G /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string componentName, Canc /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string componentName, CancellationToken can /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerResource.cs index f71d80ff38bb6..91706d2628860 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerResource.cs @@ -108,7 +108,7 @@ public virtual MachineLearninRegistryComponentVersionCollection GetMachineLearni /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetMachi /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(Ca /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -334,7 +334,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionCollection.cs index 40aa367365569..d3358b9ef092d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(s /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionResource.cs index 0e3bda58db399..dd2c03309597a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentCollection.cs index 5de565eef67f1..6ad356e5523f5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string deplo /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(string or /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string deploymentName, Can /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string deploymentName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentData.Serialization.cs index 202d66c1e5323..9c29802b84412 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentData.Serialization.cs @@ -28,19 +28,19 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsDefined(Kind)) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - } - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -117,9 +117,9 @@ internal static MachineLearningBatchDeploymentData DeserializeMachineLearningBat { return null; } - ManagedServiceIdentity identity = default; - string kind = default; MachineLearningBatchDeploymentProperties properties = default; + string kind = default; + ManagedServiceIdentity identity = default; MachineLearningSku sku = default; IDictionary tags = default; AzureLocation location = default; @@ -131,14 +131,9 @@ internal static MachineLearningBatchDeploymentData DeserializeMachineLearningBat Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) + if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + properties = MachineLearningBatchDeploymentProperties.DeserializeMachineLearningBatchDeploymentProperties(property.Value, options); continue; } if (property.NameEquals("kind"u8)) @@ -146,9 +141,14 @@ internal static MachineLearningBatchDeploymentData DeserializeMachineLearningBat kind = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("identity"u8)) { - properties = MachineLearningBatchDeploymentProperties.DeserializeMachineLearningBatchDeploymentProperties(property.Value, options); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); continue; } if (property.NameEquals("sku"u8)) @@ -216,9 +216,9 @@ internal static MachineLearningBatchDeploymentData DeserializeMachineLearningBat systemData, tags ?? new ChangeTrackingDictionary(), location, - identity, - kind, properties, + kind, + identity, sku, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentData.cs index 8b3f139e9e5c4..57eec22e5d26b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentData.cs @@ -66,16 +66,16 @@ public MachineLearningBatchDeploymentData(AzureLocation location, MachineLearnin /// The systemData. /// The tags. /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. /// [Required] Additional attributes of the entity. + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Managed service identity (system assigned and/or user assigned identities). /// Sku details required for ARM contract for Autoscaling. /// Keeps track of any properties unknown to the library. - internal MachineLearningBatchDeploymentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningBatchDeploymentProperties properties, MachineLearningSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal MachineLearningBatchDeploymentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MachineLearningBatchDeploymentProperties properties, string kind, ManagedServiceIdentity identity, MachineLearningSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Identity = identity; - Kind = kind; Properties = properties; + Kind = kind; + Identity = identity; Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -85,12 +85,12 @@ internal MachineLearningBatchDeploymentData() { } - /// Managed service identity (system assigned and/or user assigned identities). - public ManagedServiceIdentity Identity { get; set; } - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - public string Kind { get; set; } /// [Required] Additional attributes of the entity. public MachineLearningBatchDeploymentProperties Properties { get; set; } + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + public string Kind { get; set; } + /// Managed service identity (system assigned and/or user assigned identities). + public ManagedServiceIdentity Identity { get; set; } /// Sku details required for ARM contract for Autoscaling. public MachineLearningSku Sku { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentResource.cs index 2c55ed63da6e4..b0249edf98d6b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitU /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual async Task> AddT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual Response AddTag(string ke /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -541,7 +541,7 @@ public virtual async Task> SetT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -598,7 +598,7 @@ public virtual Response SetTags(IDiction /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -658,7 +658,7 @@ public virtual async Task> Remo /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointCollection.cs index e37da0546f354..fe6459c0fea58 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string endpoin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(i /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(int? count /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string endpointName, Cance /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string endpointName, CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointData.Serialization.cs index 5b4350149575b..2b66fcc59686e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointData.Serialization.cs @@ -28,19 +28,19 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsDefined(Kind)) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - } - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -117,9 +117,9 @@ internal static MachineLearningBatchEndpointData DeserializeMachineLearningBatch { return null; } - ManagedServiceIdentity identity = default; - string kind = default; MachineLearningBatchEndpointProperties properties = default; + string kind = default; + ManagedServiceIdentity identity = default; MachineLearningSku sku = default; IDictionary tags = default; AzureLocation location = default; @@ -131,14 +131,9 @@ internal static MachineLearningBatchEndpointData DeserializeMachineLearningBatch Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) + if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + properties = MachineLearningBatchEndpointProperties.DeserializeMachineLearningBatchEndpointProperties(property.Value, options); continue; } if (property.NameEquals("kind"u8)) @@ -146,9 +141,14 @@ internal static MachineLearningBatchEndpointData DeserializeMachineLearningBatch kind = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("identity"u8)) { - properties = MachineLearningBatchEndpointProperties.DeserializeMachineLearningBatchEndpointProperties(property.Value, options); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); continue; } if (property.NameEquals("sku"u8)) @@ -216,9 +216,9 @@ internal static MachineLearningBatchEndpointData DeserializeMachineLearningBatch systemData, tags ?? new ChangeTrackingDictionary(), location, - identity, - kind, properties, + kind, + identity, sku, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointData.cs index 1f8b449514354..3ad9fefdee93e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointData.cs @@ -66,16 +66,16 @@ public MachineLearningBatchEndpointData(AzureLocation location, MachineLearningB /// The systemData. /// The tags. /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. /// [Required] Additional attributes of the entity. + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Managed service identity (system assigned and/or user assigned identities). /// Sku details required for ARM contract for Autoscaling. /// Keeps track of any properties unknown to the library. - internal MachineLearningBatchEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningBatchEndpointProperties properties, MachineLearningSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal MachineLearningBatchEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MachineLearningBatchEndpointProperties properties, string kind, ManagedServiceIdentity identity, MachineLearningSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Identity = identity; - Kind = kind; Properties = properties; + Kind = kind; + Identity = identity; Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -85,12 +85,12 @@ internal MachineLearningBatchEndpointData() { } - /// Managed service identity (system assigned and/or user assigned identities). - public ManagedServiceIdentity Identity { get; set; } - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - public string Kind { get; set; } /// [Required] Additional attributes of the entity. public MachineLearningBatchEndpointProperties Properties { get; set; } + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + public string Kind { get; set; } + /// Managed service identity (system assigned and/or user assigned identities). + public ManagedServiceIdentity Identity { get; set; } /// Sku details required for ARM contract for Autoscaling. public MachineLearningSku Sku { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointResource.cs index 02f75053591b4..8ab9d09226c04 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointResource.cs @@ -110,7 +110,7 @@ public virtual MachineLearningBatchDeploymentCollection GetMachineLearningBatchD /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetM /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetMachineLearni /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual ArmOperation Update(WaitUnt /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -466,7 +466,7 @@ public virtual async Task> GetKeysAsyn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -504,7 +504,7 @@ public virtual Response GetKeys(CancellationTok /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -566,7 +566,7 @@ public virtual async Task> AddTag /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -628,7 +628,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -685,7 +685,7 @@ public virtual async Task> SetTag /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -742,7 +742,7 @@ public virtual Response SetTags(IDictionar /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -802,7 +802,7 @@ public virtual async Task> Remove /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerCollection.cs index 4e782372c840d..3ad5d799d90ab 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string name, C /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(s /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(string skip /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerResource.cs index b5b35c7508b37..1e3a517f94037 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerResource.cs @@ -108,7 +108,7 @@ public virtual MachineLearningCodeVersionCollection GetMachineLearningCodeVersio /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetMachi /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetMachineLearningCo /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionCollection.cs index 4ea9de896e868..16c0ac964ae17 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string version, /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Pageable GetAll(string orderB /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.cs index c26a3067234c4..542336307492b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task PublishAsync(WaitUntil waitUntil, Destin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -459,7 +459,7 @@ public virtual ArmOperation Publish(WaitUntil waitUntil, DestinationAsset body, /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -501,7 +501,7 @@ public virtual async Task> CreateOrGetStartPe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerCollection.cs index 5db3f9a41f8a5..21edafba6f364 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string na /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Pageable GetAll(string /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerResource.cs index e10f2fd500024..fe6c9b0ee8652 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerResource.cs @@ -108,7 +108,7 @@ public virtual MachineLearningComponentVersionCollection GetMachineLearningCompo /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetMachineLearn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionCollection.cs index 41970373e5072..17bcf81950134 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string vers /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string o /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionResource.cs index c8a74caf3fa5e..265073cfdca51 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual ArmOperation Update(Wait /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task PublishAsync(WaitUntil waitUntil, Destin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeCollection.cs index 4139dcaf29063..aae52b88343e0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string computeName, /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string skip = nul /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string computeName, Cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string computeName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.cs index 6599b766d73c8..93b888efa5a3c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Globalization; using System.Threading; using System.Threading.Tasks; @@ -104,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -144,7 +143,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -184,7 +183,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -227,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Machine /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -270,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, MachineLearningUnderlyin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -316,7 +315,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -349,90 +348,6 @@ public virtual ArmOperation Update(WaitUntil wai } } - /// - /// Updates the custom services list. The list of custom services provided shall be overwritten - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/customServices - /// - /// - /// Operation Id - /// Compute_UpdateCustomServices - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// New list of Custom Services. - /// The cancellation token to use. - /// is null. - public virtual async Task UpdateCustomServicesAsync(IEnumerable customServices, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(customServices, nameof(customServices)); - - using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.UpdateCustomServices"); - scope.Start(); - try - { - var response = await _machineLearningComputeComputeRestClient.UpdateCustomServicesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, customServices, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates the custom services list. The list of custom services provided shall be overwritten - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/customServices - /// - /// - /// Operation Id - /// Compute_UpdateCustomServices - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// New list of Custom Services. - /// The cancellation token to use. - /// is null. - public virtual Response UpdateCustomServices(IEnumerable customServices, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(customServices, nameof(customServices)); - - using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.UpdateCustomServices"); - scope.Start(); - try - { - var response = _machineLearningComputeComputeRestClient.UpdateCustomServices(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, customServices, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Get the details (e.g IP address, port etc) of all the compute nodes in the compute. /// @@ -446,7 +361,7 @@ public virtual Response UpdateCustomServices(IEnumerable customSe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -476,7 +391,7 @@ public virtual AsyncPageable GetNodesAsync(Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -506,7 +421,7 @@ public virtual Pageable GetNodes(CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -544,7 +459,7 @@ public virtual async Task> GetKeysAsync( /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -569,90 +484,6 @@ public virtual Response GetKeys(CancellationToken } } - /// - /// Update Data Mounts of a Machine Learning compute. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateDataMounts - /// - /// - /// Operation Id - /// Compute_UpdateDataMounts - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The parameters for creating or updating a machine learning workspace. - /// The cancellation token to use. - /// is null. - public virtual async Task UpdateDataMountsAsync(IEnumerable dataMounts, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(dataMounts, nameof(dataMounts)); - - using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.UpdateDataMounts"); - scope.Start(); - try - { - var response = await _machineLearningComputeComputeRestClient.UpdateDataMountsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dataMounts, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update Data Mounts of a Machine Learning compute. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateDataMounts - /// - /// - /// Operation Id - /// Compute_UpdateDataMounts - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The parameters for creating or updating a machine learning workspace. - /// The cancellation token to use. - /// is null. - public virtual Response UpdateDataMounts(IEnumerable dataMounts, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(dataMounts, nameof(dataMounts)); - - using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.UpdateDataMounts"); - scope.Start(); - try - { - var response = _machineLearningComputeComputeRestClient.UpdateDataMounts(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dataMounts, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Posts a start action to a compute instance /// @@ -666,7 +497,7 @@ public virtual Response UpdateDataMounts(IEnumerable /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -708,7 +539,7 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -750,7 +581,7 @@ public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -792,7 +623,7 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -834,7 +665,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -876,7 +707,7 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, Cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -904,239 +735,5 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cance throw; } } - - /// - /// Updates the idle shutdown setting of a compute instance. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateIdleShutdownSetting - /// - /// - /// Operation Id - /// Compute_UpdateIdleShutdownSetting - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The object for updating idle shutdown setting of specified ComputeInstance. - /// The cancellation token to use. - /// is null. - public virtual async Task UpdateIdleShutdownSettingAsync(IdleShutdownSetting idleShutdownSetting, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(idleShutdownSetting, nameof(idleShutdownSetting)); - - using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.UpdateIdleShutdownSetting"); - scope.Start(); - try - { - var response = await _machineLearningComputeComputeRestClient.UpdateIdleShutdownSettingAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, idleShutdownSetting, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates the idle shutdown setting of a compute instance. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateIdleShutdownSetting - /// - /// - /// Operation Id - /// Compute_UpdateIdleShutdownSetting - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The object for updating idle shutdown setting of specified ComputeInstance. - /// The cancellation token to use. - /// is null. - public virtual Response UpdateIdleShutdownSetting(IdleShutdownSetting idleShutdownSetting, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(idleShutdownSetting, nameof(idleShutdownSetting)); - - using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.UpdateIdleShutdownSetting"); - scope.Start(); - try - { - var response = _machineLearningComputeComputeRestClient.UpdateIdleShutdownSetting(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, idleShutdownSetting, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Returns supported virtual machine sizes for resize - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/getAllowedVmSizesForResize - /// - /// - /// Operation Id - /// Compute_GetAllowedResizeSizes - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllowedResizeSizesAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningComputeComputeRestClient.CreateGetAllowedResizeSizesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => MachineLearningVmSize.DeserializeMachineLearningVmSize(e), _machineLearningComputeComputeClientDiagnostics, Pipeline, "MachineLearningComputeResource.GetAllowedResizeSizes", "value", null, cancellationToken); - } - - /// - /// Returns supported virtual machine sizes for resize - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/getAllowedVmSizesForResize - /// - /// - /// Operation Id - /// Compute_GetAllowedResizeSizes - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAllowedResizeSizes(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningComputeComputeRestClient.CreateGetAllowedResizeSizesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => MachineLearningVmSize.DeserializeMachineLearningVmSize(e), _machineLearningComputeComputeClientDiagnostics, Pipeline, "MachineLearningComputeResource.GetAllowedResizeSizes", "value", null, cancellationToken); - } - - /// - /// Updates the size of a Compute Instance. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/resize - /// - /// - /// Operation Id - /// Compute_Resize - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The object for updating VM size setting of specified Compute Instance. - /// The cancellation token to use. - /// is null. - public virtual async Task ResizeAsync(WaitUntil waitUntil, ResizeSchema resizeSchema, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resizeSchema, nameof(resizeSchema)); - - using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.Resize"); - scope.Start(); - try - { - var response = await _machineLearningComputeComputeRestClient.ResizeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resizeSchema, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_machineLearningComputeComputeClientDiagnostics, Pipeline, _machineLearningComputeComputeRestClient.CreateResizeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resizeSchema).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates the size of a Compute Instance. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/resize - /// - /// - /// Operation Id - /// Compute_Resize - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The object for updating VM size setting of specified Compute Instance. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Resize(WaitUntil waitUntil, ResizeSchema resizeSchema, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resizeSchema, nameof(resizeSchema)); - - using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.Resize"); - scope.Start(); - try - { - var response = _machineLearningComputeComputeRestClient.Resize(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resizeSchema, cancellationToken); - var operation = new MachineLearningArmOperation(_machineLearningComputeComputeClientDiagnostics, Pipeline, _machineLearningComputeComputeRestClient.CreateResizeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, resizeSchema).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerCollection.cs index 63341f92237ee..8ee198204e1df 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string name, C /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(s /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Pageable GetAll(string skip /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerResource.cs index 0e7865f5322b9..2b75cabca3cdc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerResource.cs @@ -108,7 +108,7 @@ public virtual MachineLearningDataVersionCollection GetMachineLearningDataVersio /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetMachi /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetMachineLearningDa /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionCollection.cs index daa944305d6eb..b6aebd44e7d2c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string version, /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -333,7 +333,7 @@ public virtual Pageable GetAll(string orderB /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -376,7 +376,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -419,7 +419,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -464,7 +464,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionResource.cs index dcbd193c7e6d4..3d7eb01545066 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task PublishAsync(WaitUntil waitUntil, Destin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreCollection.cs index d7101b4dbb5d7..7288fc94d07ab 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string name, Cance /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsync(Machi /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(MachineLearning /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreResource.cs index ff9e95fd0a30b..c53077c276dc3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual ArmOperation Update(WaitUntil w /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -376,15 +376,14 @@ public virtual ArmOperation Update(WaitUntil w /// /// /// - /// Secret expiry information. /// The cancellation token to use. - public virtual async Task> GetSecretsAsync(SecretExpiry body = null, CancellationToken cancellationToken = default) + public virtual async Task> GetSecretsAsync(CancellationToken cancellationToken = default) { using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreResource.GetSecrets"); scope.Start(); try { - var response = await _machineLearningDatastoreDatastoresRestClient.ListSecretsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var response = await _machineLearningDatastoreDatastoresRestClient.ListSecretsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -407,7 +406,7 @@ public virtual async Task> GetSecretsA /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -415,15 +414,14 @@ public virtual async Task> GetSecretsA /// /// /// - /// Secret expiry information. /// The cancellation token to use. - public virtual Response GetSecrets(SecretExpiry body = null, CancellationToken cancellationToken = default) + public virtual Response GetSecrets(CancellationToken cancellationToken = default) { using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreResource.GetSecrets"); scope.Start(); try { - var response = _machineLearningDatastoreDatastoresRestClient.ListSecrets(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var response = _machineLearningDatastoreDatastoresRestClient.ListSecrets(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); return response; } catch (Exception e) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerCollection.cs index 17e38e1a8b24a..41f983e1a1ed5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Pageable GetAll(stri /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerResource.cs index 5fab01f3f34f1..1ef6797498e5f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerResource.cs @@ -108,7 +108,7 @@ public virtual MachineLearningEnvironmentVersionCollection GetMachineLearningEnv /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetMachineLea /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionCollection.cs index 041f0e5e29d83..3a0c40071031e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string ve /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionResource.cs index 9994e06013c95..ef5f51cae1168 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual ArmOperation Update(Wa /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task PublishAsync(WaitUntil waitUntil, Destin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureCollection.cs index 9e8a04b6b5616..42b79b6d46dd1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string featureName, /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Machine /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -221,7 +221,7 @@ public virtual Pageable GetAll(MachineLearningFe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -264,7 +264,7 @@ public virtual async Task> ExistsAsync(string featureName, Cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Response Exists(string featureName, CancellationToken cance /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -352,7 +352,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureResource.cs index 33211318c5122..7d44b82c90e41 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerCollection.cs index 3dab6499bc377..66b7f563cc961 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string n /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(Machi /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerResource.cs index bb908f9a86146..a9fbd06533d30 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerResource.cs @@ -108,7 +108,7 @@ public virtual MachineLearningFeatureSetVersionCollection GetMachineLearningFeat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetMachineLear /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -334,7 +334,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionCollection.cs index 8a5b4b3a3c27d..6a3bfd242556b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string ver /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(Machine /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionResource.cs index 0395b50ee21de..ae66134c9d4db 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionResource.cs @@ -110,7 +110,7 @@ public virtual MachineLearningFeatureCollection GetMachineLearningFeatures() /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetMachineLe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetMachineLearningFeatur /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual ArmOperation Update(Wai /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -474,7 +474,7 @@ public virtual async Task> Backf /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerCollection.cs index 990f987da7cfc..aec3b7249d078 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get( /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetA /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerResource.cs index db0f598463d86..2d5836cb3a234 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerResource.cs @@ -108,7 +108,7 @@ public virtual MachineLearningFeaturestoreEntityVersionCollection GetMachineLear /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetMac /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get( /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -334,7 +334,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionCollection.cs index c51e94fbb1ab4..8d6b544fe8be5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Cr /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(st /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable G /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionResource.cs index 528eb1462229e..ee89fee2c524c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Ca /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobCollection.cs index 6048e04e6ce19..9a61c7cb97afa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobCollection.cs @@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string id, CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual AsyncPageable GetAllAsync(string skip /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -329,7 +329,7 @@ public virtual Pageable GetAll(string skip = null, s /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -372,7 +372,7 @@ public virtual async Task> ExistsAsync(string id, CancellationTok /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual Response Exists(string id, CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -460,7 +460,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobData.cs index e8c603ed97dc6..2af12cd711024 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobData.cs @@ -55,7 +55,7 @@ public partial class MachineLearningJobData : ResourceData /// /// [Required] Additional attributes of the entity. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . + /// The available derived classes include , , , and . /// /// is null. public MachineLearningJobData(MachineLearningJobProperties properties) @@ -73,7 +73,7 @@ public MachineLearningJobData(MachineLearningJobProperties properties) /// /// [Required] Additional attributes of the entity. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . + /// The available derived classes include , , , and . /// /// Keeps track of any properties unknown to the library. internal MachineLearningJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningJobProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) @@ -90,7 +90,7 @@ internal MachineLearningJobData() /// /// [Required] Additional attributes of the entity. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . + /// The available derived classes include , , , and . /// public MachineLearningJobProperties Properties { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobResource.cs index 156c6d736d825..e4dc248a29204 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual async Task CancelAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerCollection.cs index bb2a8d182a79d..fdcfdb8192370 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string name, /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Pageable GetAll(string ski /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -366,7 +366,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerResource.cs index b00e62c329083..6b30019d715d1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerResource.cs @@ -108,7 +108,7 @@ public virtual MachineLearningModelVersionCollection GetMachineLearningModelVers /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetMach /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetMachineLearningM /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -338,7 +338,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionCollection.cs index e8b2d0979f398..936a04139aec0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string version, /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual AsyncPageable GetAllAsync(Ma /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Pageable GetAll(MachineLearn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -366,7 +366,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.cs index 5c9265e0d00de..6c28f456ed48b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual ArmOperation Update(WaitUnti /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task PublishAsync(WaitUntil waitUntil, Destin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentCollection.cs index acf141d84cf41..08366d3f954e4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string depl /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(string o /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string deploymentName, Can /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string deploymentName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentData.Serialization.cs index f9a383d6cd100..4f9abf5099845 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentData.Serialization.cs @@ -28,19 +28,19 @@ void IJsonModel.Write(Utf8JsonWriter writer } writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsDefined(Kind)) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - } - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -117,9 +117,9 @@ internal static MachineLearningOnlineDeploymentData DeserializeMachineLearningOn { return null; } - ManagedServiceIdentity identity = default; - string kind = default; MachineLearningOnlineDeploymentProperties properties = default; + string kind = default; + ManagedServiceIdentity identity = default; MachineLearningSku sku = default; IDictionary tags = default; AzureLocation location = default; @@ -131,14 +131,9 @@ internal static MachineLearningOnlineDeploymentData DeserializeMachineLearningOn Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) + if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + properties = MachineLearningOnlineDeploymentProperties.DeserializeMachineLearningOnlineDeploymentProperties(property.Value, options); continue; } if (property.NameEquals("kind"u8)) @@ -146,9 +141,14 @@ internal static MachineLearningOnlineDeploymentData DeserializeMachineLearningOn kind = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("identity"u8)) { - properties = MachineLearningOnlineDeploymentProperties.DeserializeMachineLearningOnlineDeploymentProperties(property.Value, options); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); continue; } if (property.NameEquals("sku"u8)) @@ -216,9 +216,9 @@ internal static MachineLearningOnlineDeploymentData DeserializeMachineLearningOn systemData, tags ?? new ChangeTrackingDictionary(), location, - identity, - kind, properties, + kind, + identity, sku, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentData.cs index 6566dc7865870..4dc4b915975e6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentData.cs @@ -70,20 +70,20 @@ public MachineLearningOnlineDeploymentData(AzureLocation location, MachineLearni /// The systemData. /// The tags. /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. /// /// [Required] Additional attributes of the entity. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Managed service identity (system assigned and/or user assigned identities). /// Sku details required for ARM contract for Autoscaling. /// Keeps track of any properties unknown to the library. - internal MachineLearningOnlineDeploymentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningOnlineDeploymentProperties properties, MachineLearningSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal MachineLearningOnlineDeploymentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MachineLearningOnlineDeploymentProperties properties, string kind, ManagedServiceIdentity identity, MachineLearningSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Identity = identity; - Kind = kind; Properties = properties; + Kind = kind; + Identity = identity; Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -93,16 +93,16 @@ internal MachineLearningOnlineDeploymentData() { } - /// Managed service identity (system assigned and/or user assigned identities). - public ManagedServiceIdentity Identity { get; set; } - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - public string Kind { get; set; } /// /// [Required] Additional attributes of the entity. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// public MachineLearningOnlineDeploymentProperties Properties { get; set; } + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + public string Kind { get; set; } + /// Managed service identity (system assigned and/or user assigned identities). + public ManagedServiceIdentity Identity { get; set; } /// Sku details required for ARM contract for Autoscaling. public MachineLearningSku Sku { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentResource.cs index b3fb27cea2c4d..0c1353a83bd48 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual ArmOperation Update(Wait /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task> GetLogsAsync( /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual Response GetLogs(MachineLearningDe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -477,7 +477,7 @@ public virtual AsyncPageable GetSkusAsync(int? count = /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -509,7 +509,7 @@ public virtual Pageable GetSkus(int? count = null, str /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -571,7 +571,7 @@ public virtual async Task> Add /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -633,7 +633,7 @@ public virtual Response AddTag(string k /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -690,7 +690,7 @@ public virtual async Task> Set /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -747,7 +747,7 @@ public virtual Response SetTags(IDictio /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -807,7 +807,7 @@ public virtual async Task> Rem /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointCollection.cs index ffae53b3715df..3b4afa9bece84 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string endpoi /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(MachineLea /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string endpointName, Cance /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string endpointName, CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointData.Serialization.cs index 0afa3f5c618d7..5b088a0be3bac 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointData.Serialization.cs @@ -28,19 +28,19 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsDefined(Kind)) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - } - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -117,9 +117,9 @@ internal static MachineLearningOnlineEndpointData DeserializeMachineLearningOnli { return null; } - ManagedServiceIdentity identity = default; - string kind = default; MachineLearningOnlineEndpointProperties properties = default; + string kind = default; + ManagedServiceIdentity identity = default; MachineLearningSku sku = default; IDictionary tags = default; AzureLocation location = default; @@ -131,14 +131,9 @@ internal static MachineLearningOnlineEndpointData DeserializeMachineLearningOnli Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) + if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + properties = MachineLearningOnlineEndpointProperties.DeserializeMachineLearningOnlineEndpointProperties(property.Value, options); continue; } if (property.NameEquals("kind"u8)) @@ -146,9 +141,14 @@ internal static MachineLearningOnlineEndpointData DeserializeMachineLearningOnli kind = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("identity"u8)) { - properties = MachineLearningOnlineEndpointProperties.DeserializeMachineLearningOnlineEndpointProperties(property.Value, options); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); continue; } if (property.NameEquals("sku"u8)) @@ -216,9 +216,9 @@ internal static MachineLearningOnlineEndpointData DeserializeMachineLearningOnli systemData, tags ?? new ChangeTrackingDictionary(), location, - identity, - kind, properties, + kind, + identity, sku, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointData.cs index 5ff222c9da75a..70beb5fece190 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointData.cs @@ -66,16 +66,16 @@ public MachineLearningOnlineEndpointData(AzureLocation location, MachineLearning /// The systemData. /// The tags. /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. /// [Required] Additional attributes of the entity. + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Managed service identity (system assigned and/or user assigned identities). /// Sku details required for ARM contract for Autoscaling. /// Keeps track of any properties unknown to the library. - internal MachineLearningOnlineEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningOnlineEndpointProperties properties, MachineLearningSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal MachineLearningOnlineEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MachineLearningOnlineEndpointProperties properties, string kind, ManagedServiceIdentity identity, MachineLearningSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Identity = identity; - Kind = kind; Properties = properties; + Kind = kind; + Identity = identity; Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -85,12 +85,12 @@ internal MachineLearningOnlineEndpointData() { } - /// Managed service identity (system assigned and/or user assigned identities). - public ManagedServiceIdentity Identity { get; set; } - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - public string Kind { get; set; } /// [Required] Additional attributes of the entity. public MachineLearningOnlineEndpointProperties Properties { get; set; } + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + public string Kind { get; set; } + /// Managed service identity (system assigned and/or user assigned identities). + public ManagedServiceIdentity Identity { get; set; } /// Sku details required for ARM contract for Autoscaling. public MachineLearningSku Sku { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointResource.cs index 4acf9f2cc6121..168f4824826b4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointResource.cs @@ -110,7 +110,7 @@ public virtual MachineLearningOnlineDeploymentCollection GetMachineLearningOnlin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetMachineLearn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual ArmOperation Update(WaitUn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -466,7 +466,7 @@ public virtual async Task> GetKeysAsyn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -504,7 +504,7 @@ public virtual Response GetKeys(CancellationTok /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -550,7 +550,7 @@ public virtual async Task RegenerateKeysAsync(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -596,7 +596,7 @@ public virtual ArmOperation RegenerateKeys(WaitUntil waitUntil, MachineLearningE /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -634,7 +634,7 @@ public virtual async Task> GetTokenAs /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -672,7 +672,7 @@ public virtual Response GetToken(CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -734,7 +734,7 @@ public virtual async Task> AddTa /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -796,7 +796,7 @@ public virtual Response AddTag(string key /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -853,7 +853,7 @@ public virtual async Task> SetTa /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -910,7 +910,7 @@ public virtual Response SetTags(IDictiona /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -970,7 +970,7 @@ public virtual async Task> Remov /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicCollection.cs index 939d358774003..9e7866b514f6a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string rul /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string ruleName, Cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string ruleName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicData.cs index 6a9059c92decf..54fd952bf6b24 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicData.cs @@ -13,7 +13,10 @@ namespace Azure.ResourceManager.MachineLearning { - /// A class representing the MachineLearningOutboundRuleBasic data model. + /// + /// A class representing the MachineLearningOutboundRuleBasic data model. + /// Outbound Rule Basic Resource for the managed network of a machine learning workspace. + /// public partial class MachineLearningOutboundRuleBasicData : ResourceData { /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicResource.cs index e43b83bca4bdb..8e78ecb861c23 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionCollection.cs index a0238bcf7f216..cab62aca98da6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionCollection.cs @@ -52,8 +52,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Called by end-users to approve or reject a PE connection. - /// This method must validate and forward the call to NRP. + /// Update the state of specified private endpoint connection associated with the workspace. /// /// /// Request Path @@ -65,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -74,8 +73,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NRP Private Endpoint Connection Name. - /// PrivateEndpointConnection object. + /// The name of the private endpoint connection associated with the workspace. + /// The private endpoint connection properties. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -104,8 +103,7 @@ public virtual async Task - /// Called by end-users to approve or reject a PE connection. - /// This method must validate and forward the call to NRP. + /// Update the state of specified private endpoint connection associated with the workspace. /// /// /// Request Path @@ -117,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -126,8 +124,8 @@ public virtual async Task /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// NRP Private Endpoint Connection Name. - /// PrivateEndpointConnection object. + /// The name of the private endpoint connection associated with the workspace. + /// The private endpoint connection properties. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -156,7 +154,7 @@ public virtual ArmOperation Cr } /// - /// Called by end-users to get a PE connection. + /// Gets the specified private endpoint connection associated with the workspace. /// /// /// Request Path @@ -168,7 +166,7 @@ public virtual ArmOperation Cr /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -176,7 +174,7 @@ public virtual ArmOperation Cr /// /// /// - /// NRP Private Endpoint Connection Name. + /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -201,7 +199,7 @@ public virtual async Task - /// Called by end-users to get a PE connection. + /// Gets the specified private endpoint connection associated with the workspace. /// /// /// Request Path @@ -213,7 +211,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -221,7 +219,7 @@ public virtual async Task /// /// - /// NRP Private Endpoint Connection Name. + /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -246,7 +244,7 @@ public virtual Response Get(st } /// - /// Called by end-users to get all PE connections. + /// List all the private endpoint connections associated with the workspace. /// /// /// Request Path @@ -258,7 +256,7 @@ public virtual Response Get(st /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -275,7 +273,7 @@ public virtual AsyncPageable G } /// - /// Called by end-users to get all PE connections. + /// List all the private endpoint connections associated with the workspace. /// /// /// Request Path @@ -287,7 +285,7 @@ public virtual AsyncPageable G /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -316,7 +314,7 @@ public virtual Pageable GetAll /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -324,7 +322,7 @@ public virtual Pageable GetAll /// /// /// - /// NRP Private Endpoint Connection Name. + /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -359,7 +357,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -367,7 +365,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// - /// NRP Private Endpoint Connection Name. + /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -402,7 +400,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -410,7 +408,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// - /// NRP Private Endpoint Connection Name. + /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -447,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -455,7 +453,7 @@ public virtual async Task /// /// - /// NRP Private Endpoint Connection Name. + /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.Serialization.cs index ef912fe2cd0f7..eded94a366e4b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.Serialization.cs @@ -12,6 +12,7 @@ using Azure.Core; using Azure.ResourceManager.MachineLearning.Models; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.MachineLearning { @@ -74,17 +75,17 @@ void IJsonModel.Write(Utf8JsonWrit } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsDefined(PrivateEndpoint)) + if (Optional.IsDefined(SubResource)) { writer.WritePropertyName("privateEndpoint"u8); - writer.WriteObjectValue(PrivateEndpoint, options); + JsonSerializer.Serialize(writer, SubResource); } if (Optional.IsDefined(ConnectionState)) { writer.WritePropertyName("privateLinkServiceConnectionState"u8); writer.WriteObjectValue(ConnectionState, options); } - if (Optional.IsDefined(ProvisioningState)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); @@ -136,7 +137,7 @@ internal static MachineLearningPrivateEndpointConnectionData DeserializeMachineL string name = default; ResourceType type = default; SystemData systemData = default; - MachineLearningPrivateEndpoint privateEndpoint = default; + SubResource privateEndpoint = default; MachineLearningPrivateLinkServiceConnectionState privateLinkServiceConnectionState = default; MachineLearningPrivateEndpointConnectionProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; @@ -220,7 +221,7 @@ internal static MachineLearningPrivateEndpointConnectionData DeserializeMachineL { continue; } - privateEndpoint = MachineLearningPrivateEndpoint.DeserializeMachineLearningPrivateEndpoint(property0.Value, options); + privateEndpoint = JsonSerializer.Deserialize(property0.Value.GetRawText()); continue; } if (property0.NameEquals("privateLinkServiceConnectionState"u8)) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.cs index c822c370756b4..2f656ae05bc64 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.cs @@ -10,6 +10,7 @@ using Azure.Core; using Azure.ResourceManager.MachineLearning.Models; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.MachineLearning { @@ -64,17 +65,17 @@ public MachineLearningPrivateEndpointConnectionData(AzureLocation location) : ba /// The systemData. /// The tags. /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. - /// The Private Endpoint resource. - /// The connection state. - /// The current provisioning state. + /// The identity of the resource. + /// The sku of the workspace. + /// The resource of private end point. + /// A collection of information about the state of the connection between service consumer and provider. + /// The provisioning state of the private endpoint connection resource. /// Keeps track of any properties unknown to the library. - internal MachineLearningPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MachineLearningSku sku, MachineLearningPrivateEndpoint privateEndpoint, MachineLearningPrivateLinkServiceConnectionState connectionState, MachineLearningPrivateEndpointConnectionProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal MachineLearningPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MachineLearningSku sku, SubResource subResource, MachineLearningPrivateLinkServiceConnectionState connectionState, MachineLearningPrivateEndpointConnectionProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Sku = sku; - PrivateEndpoint = privateEndpoint; + SubResource = subResource; ConnectionState = connectionState; ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -85,15 +86,21 @@ internal MachineLearningPrivateEndpointConnectionData() { } - /// Managed service identity (system assigned and/or user assigned identities). + /// The identity of the resource. public ManagedServiceIdentity Identity { get; set; } - /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. + /// The sku of the workspace. public MachineLearningSku Sku { get; set; } - /// The Private Endpoint resource. - public MachineLearningPrivateEndpoint PrivateEndpoint { get; set; } - /// The connection state. + /// The resource of private end point. + internal SubResource SubResource { get; set; } + /// Gets Id. + public ResourceIdentifier SubResourceId + { + get => SubResource is null ? default : SubResource.Id; + } + + /// A collection of information about the state of the connection between service consumer and provider. public MachineLearningPrivateLinkServiceConnectionState ConnectionState { get; set; } - /// The current provisioning state. - public MachineLearningPrivateEndpointConnectionProvisioningState? ProvisioningState { get; set; } + /// The provisioning state of the private endpoint connection resource. + public MachineLearningPrivateEndpointConnectionProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionResource.cs index 2cd39cb1e131a..9619ba4dcae0d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionResource.cs @@ -90,7 +90,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Called by end-users to get a PE connection. + /// Gets the specified private endpoint connection associated with the workspace. /// /// /// Request Path @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -130,7 +130,7 @@ public virtual async Task - /// Called by end-users to get a PE connection. + /// Gets the specified private endpoint connection associated with the workspace. /// /// /// Request Path @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response Get(Ca } /// - /// Called by end-users to delete a PE connection. + /// Deletes the specified private endpoint connection associated with the workspace. /// /// /// Request Path @@ -182,7 +182,7 @@ public virtual Response Get(Ca /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Called by end-users to delete a PE connection. + /// Deletes the specified private endpoint connection associated with the workspace. /// /// /// Request Path @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -258,8 +258,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Called by end-users to approve or reject a PE connection. - /// This method must validate and forward the call to NRP. + /// Update the state of specified private endpoint connection associated with the workspace. /// /// /// Request Path @@ -271,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -280,7 +279,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// 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. - /// PrivateEndpointConnection object. + /// The private endpoint connection properties. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) @@ -307,8 +306,7 @@ public virtual async Task - /// Called by end-users to approve or reject a PE connection. - /// This method must validate and forward the call to NRP. + /// Update the state of specified private endpoint connection associated with the workspace. /// /// /// Request Path @@ -320,7 +318,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -329,7 +327,7 @@ public virtual async Task /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// PrivateEndpointConnection object. + /// The private endpoint connection properties. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) @@ -368,7 +366,7 @@ public virtual ArmOperation Up /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -425,7 +423,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -482,7 +480,7 @@ public virtual Response AddTag /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -538,7 +536,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -594,7 +592,7 @@ public virtual Response SetTag /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -649,7 +647,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerCollection.cs index c01722e8cd9f8..aff8d8bc30f48 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation Create /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAl /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(str /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string codeName, Cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string codeName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerResource.cs index 5eb50d213c7dd..e4efe773cfccf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerResource.cs @@ -108,7 +108,7 @@ public virtual MachineLearningRegistryCodeVersionCollection GetMachineLearningRe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetMachineLe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(Cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -334,7 +334,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionCollection.cs index cbd6538e876a7..3d80b5435a230 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string v /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(strin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionResource.cs index e8199e5890f49..c4ee10e03d70d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(W /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task> CreateOrGetStartPe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCollection.cs index 69fab7b7df67c..69cf5a3951c3e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string registryName /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string registryName, Cance /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string registryName, CancellationToken canc /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryData.Serialization.cs index f583515e0ebfa..f881ca4a2931a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryData.Serialization.cs @@ -115,18 +115,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteNull("managedResourceGroup"); } } - if (Optional.IsDefined(ManagedResourceGroupSettings)) - { - if (ManagedResourceGroupSettings != null) - { - writer.WritePropertyName("managedResourceGroupSettings"u8); - writer.WriteObjectValue(ManagedResourceGroupSettings, options); - } - else - { - writer.WriteNull("managedResourceGroupSettings"); - } - } if (Optional.IsDefined(MlFlowRegistryUri)) { if (MlFlowRegistryUri != null) @@ -236,7 +224,6 @@ internal static MachineLearningRegistryData DeserializeMachineLearningRegistryDa Uri discoveryUrl = default; string intellectualPropertyPublisher = default; ArmResourceId managedResourceGroup = default; - ManagedResourceGroupSettings managedResourceGroupSettings = default; Uri mlFlowRegistryUri = default; IList registryPrivateEndpointConnections = default; string publicNetworkAccess = default; @@ -351,16 +338,6 @@ internal static MachineLearningRegistryData DeserializeMachineLearningRegistryDa managedResourceGroup = ArmResourceId.DeserializeArmResourceId(property0.Value, options); continue; } - if (property0.NameEquals("managedResourceGroupSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - managedResourceGroupSettings = null; - continue; - } - managedResourceGroupSettings = ManagedResourceGroupSettings.DeserializeManagedResourceGroupSettings(property0.Value, options); - continue; - } if (property0.NameEquals("mlFlowRegistryUri"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -433,7 +410,6 @@ internal static MachineLearningRegistryData DeserializeMachineLearningRegistryDa discoveryUrl, intellectualPropertyPublisher, managedResourceGroup, - managedResourceGroupSettings, mlFlowRegistryUri, registryPrivateEndpointConnections ?? new ChangeTrackingList(), publicNetworkAccess, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryData.cs index b58c8118ed34b..5304cb0d18471 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryData.cs @@ -69,7 +69,6 @@ public MachineLearningRegistryData(AzureLocation location) : base(location) /// Discovery URL for the Registry. /// IntellectualPropertyPublisher for the registry. /// ResourceId of the managed RG if the registry has system created resources. - /// Managed resource group specific settings. /// MLFlow Registry URI for the Registry. /// Private endpoint connections info used for pending connections in private link portal. /// @@ -78,7 +77,7 @@ public MachineLearningRegistryData(AzureLocation location) : base(location) /// /// Details of each region the registry is in. /// Keeps track of any properties unknown to the library. - internal MachineLearningRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningSku sku, Uri discoveryUri, string intellectualPropertyPublisher, ArmResourceId managedResourceGroup, ManagedResourceGroupSettings managedResourceGroupSettings, Uri mlFlowRegistryUri, IList registryPrivateEndpointConnections, string publicNetworkAccess, IList regionDetails, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal MachineLearningRegistryData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningSku sku, Uri discoveryUri, string intellectualPropertyPublisher, ArmResourceId managedResourceGroup, Uri mlFlowRegistryUri, IList registryPrivateEndpointConnections, string publicNetworkAccess, IList regionDetails, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Kind = kind; @@ -86,7 +85,6 @@ internal MachineLearningRegistryData(ResourceIdentifier id, string name, Resourc DiscoveryUri = discoveryUri; IntellectualPropertyPublisher = intellectualPropertyPublisher; ManagedResourceGroup = managedResourceGroup; - ManagedResourceGroupSettings = managedResourceGroupSettings; MlFlowRegistryUri = mlFlowRegistryUri; RegistryPrivateEndpointConnections = registryPrivateEndpointConnections; PublicNetworkAccess = publicNetworkAccess; @@ -126,20 +124,6 @@ public ResourceIdentifier ManagedResourceId } } - /// Managed resource group specific settings. - internal ManagedResourceGroupSettings ManagedResourceGroupSettings { get; set; } - /// List of assigned identities for the managed resource group. - public IList ManagedResourceGroupAssignedIdentities - { - get => ManagedResourceGroupSettings is null ? default : ManagedResourceGroupSettings.AssignedIdentities; - set - { - if (ManagedResourceGroupSettings is null) - ManagedResourceGroupSettings = new ManagedResourceGroupSettings(); - ManagedResourceGroupSettings.AssignedIdentities = value; - } - } - /// MLFlow Registry URI for the Registry. public Uri MlFlowRegistryUri { get; set; } /// Private endpoint connections info used for pending connections in private link portal. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerCollection.cs index 20c400a6e01b6..a4c8764e9e486 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Create /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAl /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(str /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerResource.cs index f78de12c9c041..00c16e459ac27 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerResource.cs @@ -108,7 +108,7 @@ public virtual MachineLearningRegistryDataVersionCollection GetMachineLearningRe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetMachineLe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(Cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -334,7 +334,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionCollection.cs index df93944ab685c..b8dbfa267a1ac 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string v /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -329,7 +329,7 @@ public virtual Pageable GetAll(strin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -372,7 +372,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -460,7 +460,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionResource.cs index fa4d25a7ff42b..5ce21dd45e982 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(W /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task> CreateOrGetStartPe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerCollection.cs index 469b794f1519d..115fa39f692a1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string environmentName, Ca /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string environmentName, CancellationToken c /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerResource.cs index b812f2ad22732..42e56f61467ce 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerResource.cs @@ -108,7 +108,7 @@ public virtual MachineLearningRegistryEnvironmentVersionCollection GetMachineLea /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetMa /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -334,7 +334,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionCollection.cs index 00fc87675a378..1e1b53e4c7355 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation C /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(s /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Pageable GetAl /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionResource.cs index 781cf6fd96177..36f59713ad525 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(C /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerCollection.cs index 5faf54f4eba8b..7b598a9825f55 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Creat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(strin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetA /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(st /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string modelName, Cancella /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string modelName, CancellationToken cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerResource.cs index f82fbb9a18ce2..4339f6d0674cb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerResource.cs @@ -108,7 +108,7 @@ public virtual MachineLearningRegistryModelVersionCollection GetMachineLearningR /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetMachineL /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(Cance /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -334,7 +334,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionCollection.cs index 588cf26bbead7..bffcc3416085a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(Mach /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionResource.cs index b3cc69fa826cd..73a385e2138bd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update( /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task> CreateOrGetStartPe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryResource.cs index 4ffedbcaedb31..63194d1e83c14 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryResource.cs @@ -114,7 +114,7 @@ public virtual MachineLearningRegistryCodeContainerCollection GetMachineLearning /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual MachineLearninRegistryComponentContainerCollection GetMachineLear /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual MachineLearningRegistryDataContainerCollection GetMachineLearning /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual MachineLearningRegistryEnvironmentContainerCollection GetMachineL /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -352,7 +352,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -390,7 +390,7 @@ public virtual MachineLearningRegistryModelContainerCollection GetMachineLearnin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -421,7 +421,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual Response GetMachin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -492,7 +492,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -532,7 +532,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -574,7 +574,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -616,7 +616,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -658,7 +658,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -700,7 +700,7 @@ public virtual Response Update(MachineLearningR /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -743,7 +743,7 @@ public virtual async Task> GetBlobRefer /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -786,7 +786,7 @@ public virtual Response GetBlobReferenceSasRegis /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -832,7 +832,7 @@ public virtual async Task> RemoveR /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -878,7 +878,7 @@ public virtual ArmOperation RemoveRegions(WaitU /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -940,7 +940,7 @@ public virtual async Task> AddTagAsync /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1002,7 +1002,7 @@ public virtual Response AddTag(string key, stri /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1059,7 +1059,7 @@ public virtual async Task> SetTagsAsyn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1116,7 +1116,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1176,7 +1176,7 @@ public virtual async Task> RemoveTagAs /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleCollection.cs index 976f305e9a891..475caf26edbcb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string name, Cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(string skip = nu /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.cs index e309c5f2fc01d..5465a3cb507ea 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceCollection.cs index eacb178398128..aa8753217523e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -74,7 +74,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The parameters for creating or updating a machine learning workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -114,7 +114,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -123,7 +123,7 @@ public virtual async Task> Create /// /// /// 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. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The parameters for creating or updating a machine learning workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -216,7 +216,7 @@ public virtual async Task> GetAsync(s /// /// /// - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -253,7 +253,7 @@ public virtual Response Get(string workspaceNa /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -261,15 +261,13 @@ public virtual Response Get(string workspaceNa /// /// /// - /// Kind of workspace. /// Continuation token for pagination. - /// The to use. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(string skip = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, kind, skip, aiCapabilities); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, kind, skip, aiCapabilities); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skip); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceResource(Client, MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(e)), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MachineLearningWorkspaceCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -286,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(strin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -294,15 +292,13 @@ public virtual AsyncPageable GetAllAsync(strin /// /// /// - /// Kind of workspace. /// Continuation token for pagination. - /// The to use. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) + public virtual Pageable GetAll(string skip = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, kind, skip, aiCapabilities); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, kind, skip, aiCapabilities); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningWorkspaceWorkspacesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, skip); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceResource(Client, MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(e)), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MachineLearningWorkspaceCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -319,7 +315,7 @@ public virtual Pageable GetAll(string kind = n /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -327,7 +323,7 @@ public virtual Pageable GetAll(string kind = n /// /// /// - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -362,7 +358,7 @@ public virtual async Task> ExistsAsync(string workspaceName, Canc /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -370,7 +366,7 @@ public virtual async Task> ExistsAsync(string workspaceName, Canc /// /// /// - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -405,7 +401,7 @@ public virtual Response Exists(string workspaceName, CancellationToken can /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -413,7 +409,7 @@ public virtual Response Exists(string workspaceName, CancellationToken can /// /// /// - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -450,7 +446,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -458,7 +454,7 @@ public virtual async Task> Ge /// /// /// - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs index 445b375eb7efc..fda59604136cf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs @@ -52,7 +52,6 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Create or update machine learning workspaces connections under the specified workspace. /// /// /// Request Path @@ -64,7 +63,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -103,7 +102,6 @@ public virtual async Task - /// Create or update machine learning workspaces connections under the specified workspace. /// /// /// Request Path @@ -115,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -154,7 +152,6 @@ public virtual ArmOperation CreateOr } /// - /// Lists machine learning workspaces connections by name. /// /// /// Request Path @@ -166,7 +163,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -199,7 +196,6 @@ public virtual async Task> } /// - /// Lists machine learning workspaces connections by name. /// /// /// Request Path @@ -211,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -244,7 +240,6 @@ public virtual Response Get(string c } /// - /// Lists all the available machine learning workspaces connections under the specified workspace. /// /// /// Request Path @@ -256,7 +251,7 @@ public virtual Response Get(string c /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -266,18 +261,16 @@ public virtual Response Get(string c /// /// Target of the workspace connection. /// Category of the workspace connection. - /// query parameter that indicates if get connection call should return both connections and datastores. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string target = null, string category = null, bool? includeAll = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(string target = null, string category = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category, includeAll); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category, includeAll); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceConnectionResource(Client, MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(e)), _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics, Pipeline, "MachineLearningWorkspaceConnectionCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// Lists all the available machine learning workspaces connections under the specified workspace. /// /// /// Request Path @@ -289,7 +282,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -299,13 +292,12 @@ public virtual AsyncPageable GetAllA /// /// Target of the workspace connection. /// Category of the workspace connection. - /// query parameter that indicates if get connection call should return both connections and datastores. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string target = null, string category = null, bool? includeAll = null, CancellationToken cancellationToken = default) + public virtual Pageable GetAll(string target = null, string category = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category, includeAll); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category, includeAll); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineLearningWorkspaceConnectionResource(Client, MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(e)), _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics, Pipeline, "MachineLearningWorkspaceConnectionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -322,7 +314,7 @@ public virtual Pageable GetAll(strin /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -365,7 +357,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -408,7 +400,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -453,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.cs index 205f66e7ff1bd..95b78ab1729b5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.cs @@ -9,10 +9,8 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; -using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearning.Models; namespace Azure.ResourceManager.MachineLearning { @@ -37,8 +35,6 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics; private readonly WorkspaceConnectionsRestOperations _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient; - private readonly ClientDiagnostics _workspaceConnectionDeploymentConnectionClientDiagnostics; - private readonly ConnectionRestOperations _workspaceConnectionDeploymentConnectionRestClient; private readonly MachineLearningWorkspaceConnectionData _data; /// Gets the resource type for the operations. @@ -66,9 +62,6 @@ internal MachineLearningWorkspaceConnectionResource(ArmClient client, ResourceId _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string machineLearningWorkspaceConnectionWorkspaceConnectionsApiVersion); _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient = new WorkspaceConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningWorkspaceConnectionWorkspaceConnectionsApiVersion); - _workspaceConnectionDeploymentConnectionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", WorkspaceConnectionDeploymentResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(WorkspaceConnectionDeploymentResource.ResourceType, out string workspaceConnectionDeploymentConnectionApiVersion); - _workspaceConnectionDeploymentConnectionRestClient = new ConnectionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceConnectionDeploymentConnectionApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -95,215 +88,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of WorkspaceConnectionDeploymentResources in the MachineLearningWorkspaceConnection. - /// An object representing collection of WorkspaceConnectionDeploymentResources and their operations over a WorkspaceConnectionDeploymentResource. - public virtual WorkspaceConnectionDeploymentCollection GetWorkspaceConnectionDeployments() - { - return GetCachedClient(client => new WorkspaceConnectionDeploymentCollection(client, Id)); - } - - /// - /// Get deployments under the Azure OpenAI connection by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_GetDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetWorkspaceConnectionDeploymentAsync(string deploymentName, CancellationToken cancellationToken = default) - { - return await GetWorkspaceConnectionDeployments().GetAsync(deploymentName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get deployments under the Azure OpenAI connection by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_GetDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetWorkspaceConnectionDeployment(string deploymentName, CancellationToken cancellationToken = default) - { - return GetWorkspaceConnectionDeployments().Get(deploymentName, cancellationToken); - } - - /// Gets a collection of RaiBlocklistPropertiesBasicResources in the MachineLearningWorkspaceConnection. - /// An object representing collection of RaiBlocklistPropertiesBasicResources and their operations over a RaiBlocklistPropertiesBasicResource. - public virtual RaiBlocklistPropertiesBasicResourceCollection GetRaiBlocklistPropertiesBasicResources() - { - return GetCachedClient(client => new RaiBlocklistPropertiesBasicResourceCollection(client, Id)); - } - - /// - /// Gets the specified custom blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetRaiBlocklistPropertiesBasicResourceAsync(string raiBlocklistName, CancellationToken cancellationToken = default) - { - return await GetRaiBlocklistPropertiesBasicResources().GetAsync(raiBlocklistName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the specified custom blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetRaiBlocklistPropertiesBasicResource(string raiBlocklistName, CancellationToken cancellationToken = default) - { - return GetRaiBlocklistPropertiesBasicResources().Get(raiBlocklistName, cancellationToken); - } - - /// Gets a collection of WorkspaceConnectionRaiPolicyResources in the MachineLearningWorkspaceConnection. - /// An object representing collection of WorkspaceConnectionRaiPolicyResources and their operations over a WorkspaceConnectionRaiPolicyResource. - public virtual WorkspaceConnectionRaiPolicyCollection GetWorkspaceConnectionRaiPolicies() - { - return GetCachedClient(client => new WorkspaceConnectionRaiPolicyCollection(client, Id)); - } - - /// - /// Gets the specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetWorkspaceConnectionRaiPolicyAsync(string raiPolicyName, CancellationToken cancellationToken = default) - { - return await GetWorkspaceConnectionRaiPolicies().GetAsync(raiPolicyName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetWorkspaceConnectionRaiPolicy(string raiPolicyName, CancellationToken cancellationToken = default) - { - return GetWorkspaceConnectionRaiPolicies().Get(raiPolicyName, cancellationToken); - } - /// - /// Lists machine learning workspaces connections by name. /// /// /// Request Path @@ -315,7 +100,7 @@ public virtual Response GetWorkspaceConnec /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -343,7 +128,6 @@ public virtual async Task> } /// - /// Lists machine learning workspaces connections by name. /// /// /// Request Path @@ -355,7 +139,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -383,7 +167,6 @@ public virtual Response Get(Cancella } /// - /// Delete machine learning workspaces connections by name. /// /// /// Request Path @@ -395,7 +178,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -427,7 +210,6 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Delete machine learning workspaces connections by name. /// /// /// Request Path @@ -439,7 +221,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -470,90 +252,6 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } } - /// - /// Update machine learning workspaces connections under the specified workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} - /// - /// - /// Operation Id - /// WorkspaceConnections_Update - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Parameters for workspace connection update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(MachineLearningWorkspaceConnectionPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.Update"); - scope.Start(); - try - { - var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update machine learning workspaces connections under the specified workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} - /// - /// - /// Operation Id - /// WorkspaceConnections_Update - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Parameters for workspace connection update. - /// The cancellation token to use. - /// is null. - public virtual Response Update(MachineLearningWorkspaceConnectionPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.Update"); - scope.Start(); - try - { - var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); - return Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// List all the secrets of a machine learning workspaces connections. /// @@ -567,7 +265,7 @@ public virtual Response Update(Machi /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -605,7 +303,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -629,151 +327,5 @@ public virtual Response GetSecrets(C throw; } } - - /// - /// Test machine learning workspaces connections under the specified workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/testconnection - /// - /// - /// Operation Id - /// WorkspaceConnections_TestConnection - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Workspace Connection object. - /// The cancellation token to use. - public virtual async Task TestConnectionAsync(WaitUntil waitUntil, MachineLearningWorkspaceConnectionData data = null, CancellationToken cancellationToken = default) - { - using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.TestConnection"); - scope.Start(); - try - { - var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.TestConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics, Pipeline, _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateTestConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Test machine learning workspaces connections under the specified workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/testconnection - /// - /// - /// Operation Id - /// WorkspaceConnections_TestConnection - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Workspace Connection object. - /// The cancellation token to use. - public virtual ArmOperation TestConnection(WaitUntil waitUntil, MachineLearningWorkspaceConnectionData data = null, CancellationToken cancellationToken = default) - { - using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.TestConnection"); - scope.Start(); - try - { - var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.TestConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(_machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics, Pipeline, _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateTestConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get available models under the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/models - /// - /// - /// Operation Id - /// Connection_GetModels - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetModelsConnectionsAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceConnectionDeploymentConnectionRestClient.CreateGetModelsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceConnectionDeploymentConnectionRestClient.CreateGetModelsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => EndpointModelProperties.DeserializeEndpointModelProperties(e), _workspaceConnectionDeploymentConnectionClientDiagnostics, Pipeline, "MachineLearningWorkspaceConnectionResource.GetModelsConnections", "value", "nextLink", cancellationToken); - } - - /// - /// Get available models under the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/models - /// - /// - /// Operation Id - /// Connection_GetModels - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetModelsConnections(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceConnectionDeploymentConnectionRestClient.CreateGetModelsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceConnectionDeploymentConnectionRestClient.CreateGetModelsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => EndpointModelProperties.DeserializeEndpointModelProperties(e), _workspaceConnectionDeploymentConnectionClientDiagnostics, Pipeline, "MachineLearningWorkspaceConnectionResource.GetModelsConnections", "value", "nextLink", cancellationToken); - } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.Serialization.cs index 514bb6dfc90b8..f86348a34a4e0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.Serialization.cs @@ -79,261 +79,188 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsDefined(AllowPublicAccessWhenBehindVnet)) + if (options.Format != "W" && Optional.IsDefined(WorkspaceId)) { - writer.WritePropertyName("allowPublicAccessWhenBehindVnet"u8); - writer.WriteBooleanValue(AllowPublicAccessWhenBehindVnet.Value); + writer.WritePropertyName("workspaceId"u8); + writer.WriteStringValue(WorkspaceId); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(FriendlyName)) + { + writer.WritePropertyName("friendlyName"u8); + writer.WriteStringValue(FriendlyName); } - if (Optional.IsDefined(AllowRoleAssignmentOnRG)) + if (Optional.IsDefined(KeyVault)) { - writer.WritePropertyName("allowRoleAssignmentOnRG"u8); - writer.WriteBooleanValue(AllowRoleAssignmentOnRG.Value); + writer.WritePropertyName("keyVault"u8); + writer.WriteStringValue(KeyVault); } if (Optional.IsDefined(ApplicationInsights)) { writer.WritePropertyName("applicationInsights"u8); writer.WriteStringValue(ApplicationInsights); } - if (Optional.IsCollectionDefined(AssociatedWorkspaces)) + if (Optional.IsDefined(ContainerRegistry)) { - writer.WritePropertyName("associatedWorkspaces"u8); - writer.WriteStartArray(); - foreach (var item in AssociatedWorkspaces) + if (ContainerRegistry != null) { - writer.WriteStringValue(item); + writer.WritePropertyName("containerRegistry"u8); + writer.WriteStringValue(ContainerRegistry); } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ContainerRegistries)) - { - writer.WritePropertyName("containerRegistries"u8); - writer.WriteStartArray(); - foreach (var item in ContainerRegistries) + else { - writer.WriteStringValue(item); + writer.WriteNull("containerRegistry"); } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ContainerRegistry)) - { - writer.WritePropertyName("containerRegistry"u8); - writer.WriteStringValue(ContainerRegistry); } - if (Optional.IsDefined(Description)) + if (Optional.IsDefined(StorageAccount)) { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); + writer.WritePropertyName("storageAccount"u8); + writer.WriteStringValue(StorageAccount); } if (Optional.IsDefined(DiscoveryUri)) { writer.WritePropertyName("discoveryUrl"u8); writer.WriteStringValue(DiscoveryUri.AbsoluteUri); } - if (Optional.IsDefined(EnableDataIsolation)) - { - writer.WritePropertyName("enableDataIsolation"u8); - writer.WriteBooleanValue(EnableDataIsolation.Value); - } - if (Optional.IsDefined(EnableServiceSideCMKEncryption)) - { - writer.WritePropertyName("enableServiceSideCMKEncryption"u8); - writer.WriteBooleanValue(EnableServiceSideCMKEncryption.Value); - } - if (Optional.IsDefined(EnableSimplifiedCmk)) - { - writer.WritePropertyName("enableSimplifiedCmk"u8); - writer.WriteBooleanValue(EnableSimplifiedCmk.Value); - } - if (Optional.IsDefined(EnableSoftwareBillOfMaterials)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { - writer.WritePropertyName("enableSoftwareBillOfMaterials"u8); - writer.WriteBooleanValue(EnableSoftwareBillOfMaterials.Value); + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); } if (Optional.IsDefined(Encryption)) { writer.WritePropertyName("encryption"u8); writer.WriteObjectValue(Encryption, options); } - if (Optional.IsCollectionDefined(ExistingWorkspaces)) - { - writer.WritePropertyName("existingWorkspaces"u8); - writer.WriteStartArray(); - foreach (var item in ExistingWorkspaces) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(FeatureStoreSettings)) - { - writer.WritePropertyName("featureStoreSettings"u8); - writer.WriteObjectValue(FeatureStoreSettings, options); - } - if (Optional.IsDefined(FriendlyName)) - { - writer.WritePropertyName("friendlyName"u8); - writer.WriteStringValue(FriendlyName); - } if (Optional.IsDefined(IsHbiWorkspace)) { writer.WritePropertyName("hbiWorkspace"u8); writer.WriteBooleanValue(IsHbiWorkspace.Value); } - if (Optional.IsDefined(HubResourceId)) + if (options.Format != "W" && Optional.IsDefined(ServiceProvisionedResourceGroup)) { - writer.WritePropertyName("hubResourceId"u8); - writer.WriteStringValue(HubResourceId); + writer.WritePropertyName("serviceProvisionedResourceGroup"u8); + writer.WriteStringValue(ServiceProvisionedResourceGroup); + } + if (options.Format != "W" && Optional.IsDefined(PrivateLinkCount)) + { + writer.WritePropertyName("privateLinkCount"u8); + writer.WriteNumberValue(PrivateLinkCount.Value); } if (Optional.IsDefined(ImageBuildCompute)) { writer.WritePropertyName("imageBuildCompute"u8); writer.WriteStringValue(ImageBuildCompute); } - if (Optional.IsCollectionDefined(IPAllowlist)) + if (Optional.IsDefined(AllowPublicAccessWhenBehindVnet)) { - writer.WritePropertyName("ipAllowlist"u8); - writer.WriteStartArray(); - foreach (var item in IPAllowlist) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); + writer.WritePropertyName("allowPublicAccessWhenBehindVnet"u8); + writer.WriteBooleanValue(AllowPublicAccessWhenBehindVnet.Value); } - if (Optional.IsDefined(KeyVault)) + if (Optional.IsDefined(PublicNetworkAccessType)) { - writer.WritePropertyName("keyVault"u8); - writer.WriteStringValue(KeyVault); + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccessType.Value.ToString()); } - if (Optional.IsCollectionDefined(KeyVaults)) + if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) { - writer.WritePropertyName("keyVaults"u8); + writer.WritePropertyName("privateEndpointConnections"u8); writer.WriteStartArray(); - foreach (var item in KeyVaults) + foreach (var item in PrivateEndpointConnections) { - writer.WriteStringValue(item); + writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (Optional.IsDefined(ManagedNetwork)) - { - writer.WritePropertyName("managedNetwork"u8); - writer.WriteObjectValue(ManagedNetwork, options); - } - if (options.Format != "W" && Optional.IsDefined(MlFlowTrackingUri)) - { - writer.WritePropertyName("mlFlowTrackingUri"u8); - writer.WriteStringValue(MlFlowTrackingUri.AbsoluteUri); - } - if (options.Format != "W" && Optional.IsDefined(NotebookInfo)) - { - writer.WritePropertyName("notebookInfo"u8); - writer.WriteObjectValue(NotebookInfo, options); - } - if (Optional.IsDefined(PrimaryUserAssignedIdentity)) + if (Optional.IsDefined(ServerlessComputeSettings)) { - writer.WritePropertyName("primaryUserAssignedIdentity"u8); - writer.WriteStringValue(PrimaryUserAssignedIdentity); + writer.WritePropertyName("serverlessComputeSettings"u8); + writer.WriteObjectValue(ServerlessComputeSettings, options); } - if (options.Format != "W" && Optional.IsCollectionDefined(PrivateEndpointConnections)) + if (Optional.IsCollectionDefined(SharedPrivateLinkResources)) { - writer.WritePropertyName("privateEndpointConnections"u8); + writer.WritePropertyName("sharedPrivateLinkResources"u8); writer.WriteStartArray(); - foreach (var item in PrivateEndpointConnections) + foreach (var item in SharedPrivateLinkResources) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(PrivateLinkCount)) + if (options.Format != "W" && Optional.IsDefined(NotebookInfo)) { - writer.WritePropertyName("privateLinkCount"u8); - writer.WriteNumberValue(PrivateLinkCount.Value); + writer.WritePropertyName("notebookInfo"u8); + writer.WriteObjectValue(NotebookInfo, options); } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + if (Optional.IsDefined(ServiceManagedResourcesSettings)) { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); + writer.WritePropertyName("serviceManagedResourcesSettings"u8); + writer.WriteObjectValue(ServiceManagedResourcesSettings, options); } - if (Optional.IsDefined(PublicNetworkAccessType)) + if (Optional.IsDefined(PrimaryUserAssignedIdentity)) { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccessType.Value.ToString()); + writer.WritePropertyName("primaryUserAssignedIdentity"u8); + writer.WriteStringValue(PrimaryUserAssignedIdentity); } - if (Optional.IsDefined(ServerlessComputeSettings)) + if (options.Format != "W" && Optional.IsDefined(TenantId)) { - writer.WritePropertyName("serverlessComputeSettings"u8); - writer.WriteObjectValue(ServerlessComputeSettings, options); + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId.Value); } - if (Optional.IsDefined(ServiceManagedResourcesSettings)) + if (options.Format != "W" && Optional.IsDefined(IsStorageHnsEnabled)) { - writer.WritePropertyName("serviceManagedResourcesSettings"u8); - writer.WriteObjectValue(ServiceManagedResourcesSettings, options); + writer.WritePropertyName("storageHnsEnabled"u8); + writer.WriteBooleanValue(IsStorageHnsEnabled.Value); } - if (options.Format != "W" && Optional.IsDefined(ServiceProvisionedResourceGroup)) + if (options.Format != "W" && Optional.IsDefined(MlFlowTrackingUri)) { - writer.WritePropertyName("serviceProvisionedResourceGroup"u8); - writer.WriteStringValue(ServiceProvisionedResourceGroup); + writer.WritePropertyName("mlFlowTrackingUri"u8); + writer.WriteStringValue(MlFlowTrackingUri.AbsoluteUri); } - if (Optional.IsCollectionDefined(SharedPrivateLinkResources)) + if (Optional.IsDefined(IsV1LegacyMode)) { - writer.WritePropertyName("sharedPrivateLinkResources"u8); - writer.WriteStartArray(); - foreach (var item in SharedPrivateLinkResources) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WritePropertyName("v1LegacyMode"u8); + writer.WriteBooleanValue(IsV1LegacyMode.Value); } - if (Optional.IsDefined(SoftDeleteRetentionInDays)) + if (Optional.IsDefined(ManagedNetwork)) { - writer.WritePropertyName("softDeleteRetentionInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionInDays.Value); + writer.WritePropertyName("managedNetwork"u8); + writer.WriteObjectValue(ManagedNetwork, options); } - if (Optional.IsDefined(StorageAccount)) + if (Optional.IsDefined(FeatureStoreSettings)) { - writer.WritePropertyName("storageAccount"u8); - writer.WriteStringValue(StorageAccount); + writer.WritePropertyName("featureStoreSettings"u8); + writer.WriteObjectValue(FeatureStoreSettings, options); } - if (Optional.IsCollectionDefined(StorageAccounts)) + if (Optional.IsCollectionDefined(AssociatedWorkspaces)) { - writer.WritePropertyName("storageAccounts"u8); + writer.WritePropertyName("associatedWorkspaces"u8); writer.WriteStartArray(); - foreach (var item in StorageAccounts) + foreach (var item in AssociatedWorkspaces) { writer.WriteStringValue(item); } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(IsStorageHnsEnabled)) - { - writer.WritePropertyName("storageHnsEnabled"u8); - writer.WriteBooleanValue(IsStorageHnsEnabled.Value); - } - if (Optional.IsDefined(SystemDatastoresAuthMode)) - { - writer.WritePropertyName("systemDatastoresAuthMode"u8); - writer.WriteStringValue(SystemDatastoresAuthMode); - } - if (options.Format != "W" && Optional.IsDefined(TenantId)) + if (Optional.IsDefined(EnableDataIsolation)) { - writer.WritePropertyName("tenantId"u8); - writer.WriteStringValue(TenantId.Value); + writer.WritePropertyName("enableDataIsolation"u8); + writer.WriteBooleanValue(EnableDataIsolation.Value); } - if (Optional.IsDefined(IsV1LegacyMode)) + if (Optional.IsDefined(HubResourceId)) { - writer.WritePropertyName("v1LegacyMode"u8); - writer.WriteBooleanValue(IsV1LegacyMode.Value); + writer.WritePropertyName("hubResourceId"u8); + writer.WriteStringValue(HubResourceId); } if (Optional.IsDefined(WorkspaceHubConfig)) { writer.WritePropertyName("workspaceHubConfig"u8); writer.WriteObjectValue(WorkspaceHubConfig, options); } - if (options.Format != "W" && Optional.IsDefined(WorkspaceId)) - { - writer.WritePropertyName("workspaceId"u8); - writer.WriteStringValue(WorkspaceId); - } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -382,49 +309,38 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace string name = default; ResourceType type = default; SystemData systemData = default; - bool? allowPublicAccessWhenBehindVnet = default; - bool? allowRoleAssignmentOnRG = default; + string workspaceId = default; + string description = default; + string friendlyName = default; + string keyVault = default; string applicationInsights = default; - IList associatedWorkspaces = default; - IList containerRegistries = default; string containerRegistry = default; - string description = default; + string storageAccount = default; Uri discoveryUrl = default; - bool? enableDataIsolation = default; - bool? enableServiceSideCMKEncryption = default; - bool? enableSimplifiedCmk = default; - bool? enableSoftwareBillOfMaterials = default; + MachineLearningProvisioningState? provisioningState = default; MachineLearningEncryptionSetting encryption = default; - IList existingWorkspaces = default; - FeatureStoreSettings featureStoreSettings = default; - string friendlyName = default; bool? hbiWorkspace = default; - ResourceIdentifier hubResourceId = default; + string serviceProvisionedResourceGroup = default; + int? privateLinkCount = default; string imageBuildCompute = default; - IList ipAllowlist = default; - string keyVault = default; - IList keyVaults = default; - ManagedNetworkSettings managedNetwork = default; - Uri mlFlowTrackingUri = default; - MachineLearningNotebookResourceInfo notebookInfo = default; - string primaryUserAssignedIdentity = default; + bool? allowPublicAccessWhenBehindVnet = default; + PublicNetworkAccess? publicNetworkAccess = default; IReadOnlyList privateEndpointConnections = default; - int? privateLinkCount = default; - MachineLearningProvisioningState? provisioningState = default; - MachineLearningPublicNetworkAccessType? publicNetworkAccess = default; ServerlessComputeSettings serverlessComputeSettings = default; - ServiceManagedResourcesSettings serviceManagedResourcesSettings = default; - string serviceProvisionedResourceGroup = default; IList sharedPrivateLinkResources = default; - int? softDeleteRetentionInDays = default; - string storageAccount = default; - IList storageAccounts = default; - bool? storageHnsEnabled = default; - string systemDatastoresAuthMode = default; + MachineLearningNotebookResourceInfo notebookInfo = default; + ServiceManagedResourcesSettings serviceManagedResourcesSettings = default; + string primaryUserAssignedIdentity = default; Guid? tenantId = default; + bool? storageHnsEnabled = default; + Uri mlFlowTrackingUri = default; bool? v1LegacyMode = default; + ManagedNetworkSettings managedNetwork = default; + FeatureStoreSettings featureStoreSettings = default; + IList associatedWorkspaces = default; + bool? enableDataIsolation = default; + ResourceIdentifier hubResourceId = default; WorkspaceHubConfig workspaceHubConfig = default; - string workspaceId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -505,221 +421,154 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace } foreach (var property0 in property.Value.EnumerateObject()) { - if (property0.NameEquals("allowPublicAccessWhenBehindVnet"u8)) + if (property0.NameEquals("workspaceId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowPublicAccessWhenBehindVnet = property0.Value.GetBoolean(); + workspaceId = property0.Value.GetString(); continue; } - if (property0.NameEquals("allowRoleAssignmentOnRG"u8)) + if (property0.NameEquals("description"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowRoleAssignmentOnRG = property0.Value.GetBoolean(); + description = property0.Value.GetString(); continue; } - if (property0.NameEquals("applicationInsights"u8)) + if (property0.NameEquals("friendlyName"u8)) { - applicationInsights = property0.Value.GetString(); + friendlyName = property0.Value.GetString(); continue; } - if (property0.NameEquals("associatedWorkspaces"u8)) + if (property0.NameEquals("keyVault"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - associatedWorkspaces = array; + keyVault = property0.Value.GetString(); continue; } - if (property0.NameEquals("containerRegistries"u8)) + if (property0.NameEquals("applicationInsights"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - containerRegistries = array; + applicationInsights = property0.Value.GetString(); continue; } if (property0.NameEquals("containerRegistry"u8)) - { - containerRegistry = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("description"u8)) - { - description = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("discoveryUrl"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { + containerRegistry = null; continue; } - discoveryUrl = new Uri(property0.Value.GetString()); + containerRegistry = property0.Value.GetString(); continue; } - if (property0.NameEquals("enableDataIsolation"u8)) + if (property0.NameEquals("storageAccount"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableDataIsolation = property0.Value.GetBoolean(); + storageAccount = property0.Value.GetString(); continue; } - if (property0.NameEquals("enableServiceSideCMKEncryption"u8)) + if (property0.NameEquals("discoveryUrl"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - enableServiceSideCMKEncryption = property0.Value.GetBoolean(); + discoveryUrl = new Uri(property0.Value.GetString()); continue; } - if (property0.NameEquals("enableSimplifiedCmk"u8)) + if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - enableSimplifiedCmk = property0.Value.GetBoolean(); + provisioningState = new MachineLearningProvisioningState(property0.Value.GetString()); continue; } - if (property0.NameEquals("enableSoftwareBillOfMaterials"u8)) + if (property0.NameEquals("encryption"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - enableSoftwareBillOfMaterials = property0.Value.GetBoolean(); + encryption = MachineLearningEncryptionSetting.DeserializeMachineLearningEncryptionSetting(property0.Value, options); continue; } - if (property0.NameEquals("encryption"u8)) + if (property0.NameEquals("hbiWorkspace"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - encryption = MachineLearningEncryptionSetting.DeserializeMachineLearningEncryptionSetting(property0.Value, options); + hbiWorkspace = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("existingWorkspaces"u8)) + if (property0.NameEquals("serviceProvisionedResourceGroup"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - existingWorkspaces = array; + serviceProvisionedResourceGroup = property0.Value.GetString(); continue; } - if (property0.NameEquals("featureStoreSettings"u8)) + if (property0.NameEquals("privateLinkCount"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - featureStoreSettings = FeatureStoreSettings.DeserializeFeatureStoreSettings(property0.Value, options); + privateLinkCount = property0.Value.GetInt32(); continue; } - if (property0.NameEquals("friendlyName"u8)) + if (property0.NameEquals("imageBuildCompute"u8)) { - friendlyName = property0.Value.GetString(); + imageBuildCompute = property0.Value.GetString(); continue; } - if (property0.NameEquals("hbiWorkspace"u8)) + if (property0.NameEquals("allowPublicAccessWhenBehindVnet"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - hbiWorkspace = property0.Value.GetBoolean(); + allowPublicAccessWhenBehindVnet = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("hubResourceId"u8)) + if (property0.NameEquals("publicNetworkAccess"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - hubResourceId = new ResourceIdentifier(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("imageBuildCompute"u8)) - { - imageBuildCompute = property0.Value.GetString(); + publicNetworkAccess = new PublicNetworkAccess(property0.Value.GetString()); continue; } - if (property0.NameEquals("ipAllowlist"u8)) + if (property0.NameEquals("privateEndpointConnections"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(item.GetString()); + array.Add(MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(item, options)); } - ipAllowlist = array; - continue; - } - if (property0.NameEquals("keyVault"u8)) - { - keyVault = property0.Value.GetString(); + privateEndpointConnections = array; continue; } - if (property0.NameEquals("keyVaults"u8)) + if (property0.NameEquals("serverlessComputeSettings"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - keyVaults = array; + serverlessComputeSettings = ServerlessComputeSettings.DeserializeServerlessComputeSettings(property0.Value, options); continue; } - if (property0.NameEquals("managedNetwork"u8)) + if (property0.NameEquals("sharedPrivateLinkResources"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - managedNetwork = ManagedNetworkSettings.DeserializeManagedNetworkSettings(property0.Value, options); - continue; - } - if (property0.NameEquals("mlFlowTrackingUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) { - continue; + array.Add(MachineLearningSharedPrivateLinkResource.DeserializeMachineLearningSharedPrivateLinkResource(item, options)); } - mlFlowTrackingUri = new Uri(property0.Value.GetString()); + sharedPrivateLinkResources = array; continue; } if (property0.NameEquals("notebookInfo"u8)) @@ -731,104 +580,75 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace notebookInfo = MachineLearningNotebookResourceInfo.DeserializeMachineLearningNotebookResourceInfo(property0.Value, options); continue; } - if (property0.NameEquals("primaryUserAssignedIdentity"u8)) - { - primaryUserAssignedIdentity = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("privateEndpointConnections"u8)) + if (property0.NameEquals("serviceManagedResourcesSettings"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(item, options)); - } - privateEndpointConnections = array; + serviceManagedResourcesSettings = ServiceManagedResourcesSettings.DeserializeServiceManagedResourcesSettings(property0.Value, options); continue; } - if (property0.NameEquals("privateLinkCount"u8)) + if (property0.NameEquals("primaryUserAssignedIdentity"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - privateLinkCount = property0.Value.GetInt32(); + primaryUserAssignedIdentity = property0.Value.GetString(); continue; } - if (property0.NameEquals("provisioningState"u8)) + if (property0.NameEquals("tenantId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - provisioningState = new MachineLearningProvisioningState(property0.Value.GetString()); + tenantId = property0.Value.GetGuid(); continue; } - if (property0.NameEquals("publicNetworkAccess"u8)) + if (property0.NameEquals("storageHnsEnabled"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - publicNetworkAccess = new MachineLearningPublicNetworkAccessType(property0.Value.GetString()); + storageHnsEnabled = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("serverlessComputeSettings"u8)) + if (property0.NameEquals("mlFlowTrackingUri"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - serverlessComputeSettings = ServerlessComputeSettings.DeserializeServerlessComputeSettings(property0.Value, options); + mlFlowTrackingUri = new Uri(property0.Value.GetString()); continue; } - if (property0.NameEquals("serviceManagedResourcesSettings"u8)) + if (property0.NameEquals("v1LegacyMode"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - serviceManagedResourcesSettings = ServiceManagedResourcesSettings.DeserializeServiceManagedResourcesSettings(property0.Value, options); - continue; - } - if (property0.NameEquals("serviceProvisionedResourceGroup"u8)) - { - serviceProvisionedResourceGroup = property0.Value.GetString(); + v1LegacyMode = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("sharedPrivateLinkResources"u8)) + if (property0.NameEquals("managedNetwork"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(MachineLearningSharedPrivateLinkResource.DeserializeMachineLearningSharedPrivateLinkResource(item, options)); - } - sharedPrivateLinkResources = array; + managedNetwork = ManagedNetworkSettings.DeserializeManagedNetworkSettings(property0.Value, options); continue; } - if (property0.NameEquals("softDeleteRetentionInDays"u8)) + if (property0.NameEquals("featureStoreSettings"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - softDeleteRetentionInDays = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("storageAccount"u8)) - { - storageAccount = property0.Value.GetString(); + featureStoreSettings = FeatureStoreSettings.DeserializeFeatureStoreSettings(property0.Value, options); continue; } - if (property0.NameEquals("storageAccounts"u8)) + if (property0.NameEquals("associatedWorkspaces"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { @@ -839,39 +659,25 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace { array.Add(item.GetString()); } - storageAccounts = array; - continue; - } - if (property0.NameEquals("storageHnsEnabled"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storageHnsEnabled = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("systemDatastoresAuthMode"u8)) - { - systemDatastoresAuthMode = property0.Value.GetString(); + associatedWorkspaces = array; continue; } - if (property0.NameEquals("tenantId"u8)) + if (property0.NameEquals("enableDataIsolation"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - tenantId = property0.Value.GetGuid(); + enableDataIsolation = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("v1LegacyMode"u8)) + if (property0.NameEquals("hubResourceId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - v1LegacyMode = property0.Value.GetBoolean(); + hubResourceId = new ResourceIdentifier(property0.Value.GetString()); continue; } if (property0.NameEquals("workspaceHubConfig"u8)) @@ -883,11 +689,6 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace workspaceHubConfig = WorkspaceHubConfig.DeserializeWorkspaceHubConfig(property0.Value, options); continue; } - if (property0.NameEquals("workspaceId"u8)) - { - workspaceId = property0.Value.GetString(); - continue; - } } continue; } @@ -907,49 +708,38 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace identity, kind, sku, - allowPublicAccessWhenBehindVnet, - allowRoleAssignmentOnRG, + workspaceId, + description, + friendlyName, + keyVault, applicationInsights, - associatedWorkspaces ?? new ChangeTrackingList(), - containerRegistries ?? new ChangeTrackingList(), containerRegistry, - description, + storageAccount, discoveryUrl, - enableDataIsolation, - enableServiceSideCMKEncryption, - enableSimplifiedCmk, - enableSoftwareBillOfMaterials, + provisioningState, encryption, - existingWorkspaces ?? new ChangeTrackingList(), - featureStoreSettings, - friendlyName, hbiWorkspace, - hubResourceId, - imageBuildCompute, - ipAllowlist ?? new ChangeTrackingList(), - keyVault, - keyVaults ?? new ChangeTrackingList(), - managedNetwork, - mlFlowTrackingUri, - notebookInfo, - primaryUserAssignedIdentity, - privateEndpointConnections ?? new ChangeTrackingList(), + serviceProvisionedResourceGroup, privateLinkCount, - provisioningState, + imageBuildCompute, + allowPublicAccessWhenBehindVnet, publicNetworkAccess, + privateEndpointConnections ?? new ChangeTrackingList(), serverlessComputeSettings, - serviceManagedResourcesSettings, - serviceProvisionedResourceGroup, sharedPrivateLinkResources ?? new ChangeTrackingList(), - softDeleteRetentionInDays, - storageAccount, - storageAccounts ?? new ChangeTrackingList(), - storageHnsEnabled, - systemDatastoresAuthMode, + notebookInfo, + serviceManagedResourcesSettings, + primaryUserAssignedIdentity, tenantId, + storageHnsEnabled, + mlFlowTrackingUri, v1LegacyMode, + managedNetwork, + featureStoreSettings, + associatedWorkspaces ?? new ChangeTrackingList(), + enableDataIsolation, + hubResourceId, workspaceHubConfig, - workspaceId, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.cs index 40bbc153be846..a64a7f4433f06 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.cs @@ -55,14 +55,9 @@ public partial class MachineLearningWorkspaceData : TrackedResourceData /// The location. public MachineLearningWorkspaceData(AzureLocation location) : base(location) { - AssociatedWorkspaces = new ChangeTrackingList(); - ContainerRegistries = new ChangeTrackingList(); - ExistingWorkspaces = new ChangeTrackingList(); - IPAllowlist = new ChangeTrackingList(); - KeyVaults = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); SharedPrivateLinkResources = new ChangeTrackingList(); - StorageAccounts = new ChangeTrackingList(); + AssociatedWorkspaces = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -72,101 +67,79 @@ public MachineLearningWorkspaceData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// Managed service identity (system assigned and/or user assigned identities). + /// The identity of the resource. /// - /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. - /// The flag to indicate whether to allow public access when behind VNet. - /// The flag to indicate whether we will do role assignment for the workspace MSI on resource group level. + /// The sku of the workspace. + /// The immutable id associated with this workspace. + /// The description of this workspace. + /// The friendly name for this workspace. This name in mutable. + /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. /// ARM id of the application insights associated with this workspace. - /// - /// /// ARM id of the container registry associated with this workspace. - /// The description of this workspace. + /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. /// Url for the discovery service to identify regional endpoints for machine learning experimentation services. - /// - /// - /// Flag to tell if simplified CMK should be enabled for this workspace. - /// Flag to tell if SoftwareBillOfMaterials should be enabled for this workspace. - /// - /// - /// Settings for feature store type workspace. - /// The friendly name for this workspace. This name in mutable. + /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + /// The encryption settings of Azure ML workspace. /// The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service. - /// - /// The compute name for image build. - /// The list of IPv4 addresses that are allowed to access the workspace. - /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. - /// - /// Managed Network settings for a machine learning workspace. - /// The URI associated with this workspace that machine learning flow must point at to set up tracking. - /// The notebook info of Azure ML workspace. - /// The user assigned identity resource id that represents the workspace identity. - /// The list of private endpoint connections in the workspace. + /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. /// Count of private connections in the workspace. - /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + /// The compute name for image build. + /// The flag to indicate whether to allow public access when behind VNet. /// Whether requests from Public Network are allowed. - /// Settings for serverless compute in a workspace. - /// The service managed resource settings. - /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. + /// The list of private endpoint connections in the workspace. + /// Settings for serverless compute created in the workspace. /// The list of shared private link resources in this workspace. - /// Retention time in days after workspace get soft deleted. - /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. - /// - /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. - /// The auth mode used for accessing the system datastores of the workspace. + /// The notebook info of Azure ML workspace. + /// The service managed resource settings. + /// The user assigned identity resource id that represents the workspace identity. /// The tenant id associated with this workspace. + /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. + /// The URI associated with this workspace that machine learning flow must point at to set up tracking. /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + /// Managed Network settings for a machine learning workspace. + /// Settings for feature store type workspace. + /// + /// + /// /// WorkspaceHub's configuration object. - /// The immutable id associated with this workspace. /// Keeps track of any properties unknown to the library. - internal MachineLearningWorkspaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningSku sku, bool? allowPublicAccessWhenBehindVnet, bool? allowRoleAssignmentOnRG, string applicationInsights, IList associatedWorkspaces, IList containerRegistries, string containerRegistry, string description, Uri discoveryUri, bool? enableDataIsolation, bool? enableServiceSideCMKEncryption, bool? enableSimplifiedCmk, bool? enableSoftwareBillOfMaterials, MachineLearningEncryptionSetting encryption, IList existingWorkspaces, FeatureStoreSettings featureStoreSettings, string friendlyName, bool? isHbiWorkspace, ResourceIdentifier hubResourceId, string imageBuildCompute, IList ipAllowlist, string keyVault, IList keyVaults, ManagedNetworkSettings managedNetwork, Uri mlFlowTrackingUri, MachineLearningNotebookResourceInfo notebookInfo, string primaryUserAssignedIdentity, IReadOnlyList privateEndpointConnections, int? privateLinkCount, MachineLearningProvisioningState? provisioningState, MachineLearningPublicNetworkAccessType? publicNetworkAccessType, ServerlessComputeSettings serverlessComputeSettings, ServiceManagedResourcesSettings serviceManagedResourcesSettings, string serviceProvisionedResourceGroup, IList sharedPrivateLinkResources, int? softDeleteRetentionInDays, string storageAccount, IList storageAccounts, bool? isStorageHnsEnabled, string systemDatastoresAuthMode, Guid? tenantId, bool? isV1LegacyMode, WorkspaceHubConfig workspaceHubConfig, string workspaceId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal MachineLearningWorkspaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningSku sku, string workspaceId, string description, string friendlyName, string keyVault, string applicationInsights, string containerRegistry, string storageAccount, Uri discoveryUri, MachineLearningProvisioningState? provisioningState, MachineLearningEncryptionSetting encryption, bool? isHbiWorkspace, string serviceProvisionedResourceGroup, int? privateLinkCount, string imageBuildCompute, bool? allowPublicAccessWhenBehindVnet, PublicNetworkAccess? publicNetworkAccessType, IReadOnlyList privateEndpointConnections, ServerlessComputeSettings serverlessComputeSettings, IList sharedPrivateLinkResources, MachineLearningNotebookResourceInfo notebookInfo, ServiceManagedResourcesSettings serviceManagedResourcesSettings, string primaryUserAssignedIdentity, Guid? tenantId, bool? isStorageHnsEnabled, Uri mlFlowTrackingUri, bool? isV1LegacyMode, ManagedNetworkSettings managedNetwork, FeatureStoreSettings featureStoreSettings, IList associatedWorkspaces, bool? enableDataIsolation, ResourceIdentifier hubResourceId, WorkspaceHubConfig workspaceHubConfig, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Kind = kind; Sku = sku; - AllowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; - AllowRoleAssignmentOnRG = allowRoleAssignmentOnRG; + WorkspaceId = workspaceId; + Description = description; + FriendlyName = friendlyName; + KeyVault = keyVault; ApplicationInsights = applicationInsights; - AssociatedWorkspaces = associatedWorkspaces; - ContainerRegistries = containerRegistries; ContainerRegistry = containerRegistry; - Description = description; + StorageAccount = storageAccount; DiscoveryUri = discoveryUri; - EnableDataIsolation = enableDataIsolation; - EnableServiceSideCMKEncryption = enableServiceSideCMKEncryption; - EnableSimplifiedCmk = enableSimplifiedCmk; - EnableSoftwareBillOfMaterials = enableSoftwareBillOfMaterials; + ProvisioningState = provisioningState; Encryption = encryption; - ExistingWorkspaces = existingWorkspaces; - FeatureStoreSettings = featureStoreSettings; - FriendlyName = friendlyName; IsHbiWorkspace = isHbiWorkspace; - HubResourceId = hubResourceId; - ImageBuildCompute = imageBuildCompute; - IPAllowlist = ipAllowlist; - KeyVault = keyVault; - KeyVaults = keyVaults; - ManagedNetwork = managedNetwork; - MlFlowTrackingUri = mlFlowTrackingUri; - NotebookInfo = notebookInfo; - PrimaryUserAssignedIdentity = primaryUserAssignedIdentity; - PrivateEndpointConnections = privateEndpointConnections; + ServiceProvisionedResourceGroup = serviceProvisionedResourceGroup; PrivateLinkCount = privateLinkCount; - ProvisioningState = provisioningState; + ImageBuildCompute = imageBuildCompute; + AllowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; PublicNetworkAccessType = publicNetworkAccessType; + PrivateEndpointConnections = privateEndpointConnections; ServerlessComputeSettings = serverlessComputeSettings; - ServiceManagedResourcesSettings = serviceManagedResourcesSettings; - ServiceProvisionedResourceGroup = serviceProvisionedResourceGroup; SharedPrivateLinkResources = sharedPrivateLinkResources; - SoftDeleteRetentionInDays = softDeleteRetentionInDays; - StorageAccount = storageAccount; - StorageAccounts = storageAccounts; - IsStorageHnsEnabled = isStorageHnsEnabled; - SystemDatastoresAuthMode = systemDatastoresAuthMode; + NotebookInfo = notebookInfo; + ServiceManagedResourcesSettings = serviceManagedResourcesSettings; + PrimaryUserAssignedIdentity = primaryUserAssignedIdentity; TenantId = tenantId; + IsStorageHnsEnabled = isStorageHnsEnabled; + MlFlowTrackingUri = mlFlowTrackingUri; IsV1LegacyMode = isV1LegacyMode; + ManagedNetwork = managedNetwork; + FeatureStoreSettings = featureStoreSettings; + AssociatedWorkspaces = associatedWorkspaces; + EnableDataIsolation = enableDataIsolation; + HubResourceId = hubResourceId; WorkspaceHubConfig = workspaceHubConfig; - WorkspaceId = workspaceId; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -175,77 +148,55 @@ internal MachineLearningWorkspaceData() { } - /// Managed service identity (system assigned and/or user assigned identities). + /// The identity of the resource. public ManagedServiceIdentity Identity { get; set; } /// Gets or sets the kind. public string Kind { get; set; } - /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. + /// The sku of the workspace. public MachineLearningSku Sku { get; set; } - /// The flag to indicate whether to allow public access when behind VNet. - public bool? AllowPublicAccessWhenBehindVnet { get; set; } - /// The flag to indicate whether we will do role assignment for the workspace MSI on resource group level. - public bool? AllowRoleAssignmentOnRG { get; set; } + /// The immutable id associated with this workspace. + public string WorkspaceId { get; } + /// The description of this workspace. + public string Description { get; set; } + /// The friendly name for this workspace. This name in mutable. + public string FriendlyName { get; set; } + /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. + public string KeyVault { get; set; } /// ARM id of the application insights associated with this workspace. public string ApplicationInsights { get; set; } - /// Gets the associated workspaces. - public IList AssociatedWorkspaces { get; } - /// Gets the container registries. - public IList ContainerRegistries { get; } /// ARM id of the container registry associated with this workspace. public string ContainerRegistry { get; set; } - /// The description of this workspace. - public string Description { get; set; } + /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. + public string StorageAccount { get; set; } /// Url for the discovery service to identify regional endpoints for machine learning experimentation services. public Uri DiscoveryUri { get; set; } - /// Gets or sets the enable data isolation. - public bool? EnableDataIsolation { get; set; } - /// Gets or sets the enable service side cmk encryption. - public bool? EnableServiceSideCMKEncryption { get; set; } - /// Flag to tell if simplified CMK should be enabled for this workspace. - public bool? EnableSimplifiedCmk { get; set; } - /// Flag to tell if SoftwareBillOfMaterials should be enabled for this workspace. - public bool? EnableSoftwareBillOfMaterials { get; set; } - /// Gets or sets the encryption. + /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + public MachineLearningProvisioningState? ProvisioningState { get; } + /// The encryption settings of Azure ML workspace. public MachineLearningEncryptionSetting Encryption { get; set; } - /// Gets the existing workspaces. - public IList ExistingWorkspaces { get; } - /// Settings for feature store type workspace. - public FeatureStoreSettings FeatureStoreSettings { get; set; } - /// The friendly name for this workspace. This name in mutable. - public string FriendlyName { get; set; } /// The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service. public bool? IsHbiWorkspace { get; set; } - /// Gets or sets the hub resource id. - public ResourceIdentifier HubResourceId { get; set; } + /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. + public string ServiceProvisionedResourceGroup { get; } + /// Count of private connections in the workspace. + public int? PrivateLinkCount { get; } /// The compute name for image build. public string ImageBuildCompute { get; set; } - /// The list of IPv4 addresses that are allowed to access the workspace. - public IList IPAllowlist { get; } - /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created. - public string KeyVault { get; set; } - /// Gets the key vaults. - public IList KeyVaults { get; } - /// Managed Network settings for a machine learning workspace. - public ManagedNetworkSettings ManagedNetwork { get; set; } - /// The URI associated with this workspace that machine learning flow must point at to set up tracking. - public Uri MlFlowTrackingUri { get; } - /// The notebook info of Azure ML workspace. - public MachineLearningNotebookResourceInfo NotebookInfo { get; } - /// The user assigned identity resource id that represents the workspace identity. - public string PrimaryUserAssignedIdentity { get; set; } + /// The flag to indicate whether to allow public access when behind VNet. + public bool? AllowPublicAccessWhenBehindVnet { get; set; } + /// Whether requests from Public Network are allowed. + public PublicNetworkAccess? PublicNetworkAccessType { get; set; } /// The list of private endpoint connections in the workspace. public IReadOnlyList PrivateEndpointConnections { get; } - /// Count of private connections in the workspace. - public int? PrivateLinkCount { get; } - /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. - public MachineLearningProvisioningState? ProvisioningState { get; } - /// Whether requests from Public Network are allowed. - public MachineLearningPublicNetworkAccessType? PublicNetworkAccessType { get; set; } - /// Settings for serverless compute in a workspace. + /// Settings for serverless compute created in the workspace. public ServerlessComputeSettings ServerlessComputeSettings { get; set; } + /// The list of shared private link resources in this workspace. + public IList SharedPrivateLinkResources { get; } + /// The notebook info of Azure ML workspace. + public MachineLearningNotebookResourceInfo NotebookInfo { get; } /// The service managed resource settings. internal ServiceManagedResourcesSettings ServiceManagedResourcesSettings { get; set; } - /// Gets or sets the cosmos db collections throughput. + /// The throughput of the collections in cosmosdb database. public int? CosmosDbCollectionsThroughput { get => ServiceManagedResourcesSettings is null ? default : ServiceManagedResourcesSettings.CosmosDbCollectionsThroughput; @@ -257,27 +208,27 @@ public int? CosmosDbCollectionsThroughput } } - /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. - public string ServiceProvisionedResourceGroup { get; } - /// The list of shared private link resources in this workspace. - public IList SharedPrivateLinkResources { get; } - /// Retention time in days after workspace get soft deleted. - public int? SoftDeleteRetentionInDays { get; set; } - /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. - public string StorageAccount { get; set; } - /// Gets the storage accounts. - public IList StorageAccounts { get; } - /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. - public bool? IsStorageHnsEnabled { get; } - /// The auth mode used for accessing the system datastores of the workspace. - public string SystemDatastoresAuthMode { get; set; } + /// The user assigned identity resource id that represents the workspace identity. + public string PrimaryUserAssignedIdentity { get; set; } /// The tenant id associated with this workspace. public Guid? TenantId { get; } + /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. + public bool? IsStorageHnsEnabled { get; } + /// The URI associated with this workspace that machine learning flow must point at to set up tracking. + public Uri MlFlowTrackingUri { get; } /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. public bool? IsV1LegacyMode { get; set; } + /// Managed Network settings for a machine learning workspace. + public ManagedNetworkSettings ManagedNetwork { get; set; } + /// Settings for feature store type workspace. + public FeatureStoreSettings FeatureStoreSettings { get; set; } + /// Gets the associated workspaces. + public IList AssociatedWorkspaces { get; } + /// Gets or sets the enable data isolation. + public bool? EnableDataIsolation { get; set; } + /// Gets or sets the hub resource id. + public ResourceIdentifier HubResourceId { get; set; } /// WorkspaceHub's configuration object. public WorkspaceHubConfig WorkspaceHubConfig { get; set; } - /// The immutable id associated with this workspace. - public string WorkspaceId { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.cs index 4ae5e56ea584c..7f28365033339 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.cs @@ -38,16 +38,12 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _machineLearningWorkspaceWorkspacesClientDiagnostics; private readonly WorkspacesRestOperations _machineLearningWorkspaceWorkspacesRestClient; - private readonly ClientDiagnostics _workspaceFeaturesClientDiagnostics; - private readonly WorkspaceFeaturesRestOperations _workspaceFeaturesRestClient; - private readonly ClientDiagnostics _workspaceConnectionDeploymentConnectionClientDiagnostics; - private readonly ConnectionRestOperations _workspaceConnectionDeploymentConnectionRestClient; - private readonly ClientDiagnostics _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics; - private readonly EndpointDeploymentRestOperations _workspaceEndpointDeploymentEndpointDeploymentRestClient; private readonly ClientDiagnostics _privateLinkResourcesClientDiagnostics; private readonly PrivateLinkResourcesRestOperations _privateLinkResourcesRestClient; private readonly ClientDiagnostics _managedNetworkProvisionsClientDiagnostics; private readonly ManagedNetworkProvisionsRestOperations _managedNetworkProvisionsRestClient; + private readonly ClientDiagnostics _workspaceFeaturesClientDiagnostics; + private readonly WorkspaceFeaturesRestOperations _workspaceFeaturesRestClient; private readonly MachineLearningWorkspaceData _data; /// Gets the resource type for the operations. @@ -75,18 +71,12 @@ internal MachineLearningWorkspaceResource(ArmClient client, ResourceIdentifier i _machineLearningWorkspaceWorkspacesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string machineLearningWorkspaceWorkspacesApiVersion); _machineLearningWorkspaceWorkspacesRestClient = new WorkspacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningWorkspaceWorkspacesApiVersion); - _workspaceFeaturesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _workspaceFeaturesRestClient = new WorkspaceFeaturesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _workspaceConnectionDeploymentConnectionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", WorkspaceConnectionDeploymentResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(WorkspaceConnectionDeploymentResource.ResourceType, out string workspaceConnectionDeploymentConnectionApiVersion); - _workspaceConnectionDeploymentConnectionRestClient = new ConnectionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceConnectionDeploymentConnectionApiVersion); - _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", WorkspaceEndpointDeploymentResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(WorkspaceEndpointDeploymentResource.ResourceType, out string workspaceEndpointDeploymentEndpointDeploymentApiVersion); - _workspaceEndpointDeploymentEndpointDeploymentRestClient = new EndpointDeploymentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceEndpointDeploymentEndpointDeploymentApiVersion); _privateLinkResourcesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ProviderConstants.DefaultProviderNamespace, Diagnostics); _privateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _managedNetworkProvisionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ProviderConstants.DefaultProviderNamespace, Diagnostics); _managedNetworkProvisionsRestClient = new ManagedNetworkProvisionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _workspaceFeaturesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _workspaceFeaturesRestClient = new WorkspaceFeaturesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -133,7 +123,7 @@ public virtual MachineLearningComputeCollection GetMachineLearningComputes() /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -164,7 +154,7 @@ public virtual async Task> GetMachineLe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -182,6 +172,211 @@ public virtual Response GetMachineLearningComput return GetMachineLearningComputes().Get(computeName, cancellationToken); } + /// Gets a collection of MachineLearningPrivateEndpointConnectionResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningPrivateEndpointConnectionResources and their operations over a MachineLearningPrivateEndpointConnectionResource. + public virtual MachineLearningPrivateEndpointConnectionCollection GetMachineLearningPrivateEndpointConnections() + { + return GetCachedClient(client => new MachineLearningPrivateEndpointConnectionCollection(client, Id)); + } + + /// + /// Gets the specified private endpoint connection associated with the workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Get + /// + /// + /// Default Api Version + /// 2024-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private endpoint connection associated with the workspace. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningPrivateEndpointConnectionAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + return await GetMachineLearningPrivateEndpointConnections().GetAsync(privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the specified private endpoint connection associated with the workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName} + /// + /// + /// Operation Id + /// PrivateEndpointConnections_Get + /// + /// + /// Default Api Version + /// 2024-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the private endpoint connection associated with the workspace. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetMachineLearningPrivateEndpointConnection(string privateEndpointConnectionName, CancellationToken cancellationToken = default) + { + return GetMachineLearningPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); + } + + /// Gets a collection of MachineLearningWorkspaceConnectionResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningWorkspaceConnectionResources and their operations over a MachineLearningWorkspaceConnectionResource. + public virtual MachineLearningWorkspaceConnectionCollection GetMachineLearningWorkspaceConnections() + { + return GetCachedClient(client => new MachineLearningWorkspaceConnectionCollection(client, Id)); + } + + /// + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// + /// + /// Operation Id + /// WorkspaceConnections_Get + /// + /// + /// Default Api Version + /// 2024-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningWorkspaceConnectionAsync(string connectionName, CancellationToken cancellationToken = default) + { + return await GetMachineLearningWorkspaceConnections().GetAsync(connectionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// + /// + /// Operation Id + /// WorkspaceConnections_Get + /// + /// + /// Default Api Version + /// 2024-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetMachineLearningWorkspaceConnection(string connectionName, CancellationToken cancellationToken = default) + { + return GetMachineLearningWorkspaceConnections().Get(connectionName, cancellationToken); + } + + /// Gets a collection of MachineLearningOutboundRuleBasicResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningOutboundRuleBasicResources and their operations over a MachineLearningOutboundRuleBasicResource. + public virtual MachineLearningOutboundRuleBasicCollection GetMachineLearningOutboundRuleBasics() + { + return GetCachedClient(client => new MachineLearningOutboundRuleBasicCollection(client, Id)); + } + + /// + /// Gets an outbound rule from the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Get + /// + /// + /// Default Api Version + /// 2024-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningOutboundRuleBasicAsync(string ruleName, CancellationToken cancellationToken = default) + { + return await GetMachineLearningOutboundRuleBasics().GetAsync(ruleName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an outbound rule from the managed network of a machine learning workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} + /// + /// + /// Operation Id + /// ManagedNetworkSettingsRule_Get + /// + /// + /// Default Api Version + /// 2024-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the workspace managed network outbound rule. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetMachineLearningOutboundRuleBasic(string ruleName, CancellationToken cancellationToken = default) + { + return GetMachineLearningOutboundRuleBasics().Get(ruleName, cancellationToken); + } + /// Gets a collection of MachineLearningCodeContainerResources in the MachineLearningWorkspace. /// An object representing collection of MachineLearningCodeContainerResources and their operations over a MachineLearningCodeContainerResource. public virtual MachineLearningCodeContainerCollection GetMachineLearningCodeContainers() @@ -202,7 +397,7 @@ public virtual MachineLearningCodeContainerCollection GetMachineLearningCodeCont /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -233,7 +428,7 @@ public virtual async Task> GetMac /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -271,7 +466,7 @@ public virtual MachineLearningComponentContainerCollection GetMachineLearningCom /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -302,7 +497,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -340,7 +535,7 @@ public virtual MachineLearningDataContainerCollection GetMachineLearningDataCont /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -371,7 +566,7 @@ public virtual async Task> GetMac /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -409,7 +604,7 @@ public virtual MachineLearningEnvironmentContainerCollection GetMachineLearningE /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -440,7 +635,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -458,11 +653,11 @@ public virtual Response GetMachineL return GetMachineLearningEnvironmentContainers().Get(name, cancellationToken); } - /// Gets a collection of MarketplaceSubscriptionResources in the MachineLearningWorkspace. - /// An object representing collection of MarketplaceSubscriptionResources and their operations over a MarketplaceSubscriptionResource. - public virtual MarketplaceSubscriptionCollection GetMarketplaceSubscriptions() + /// Gets a collection of MachineLearningModelContainerResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningModelContainerResources and their operations over a MachineLearningModelContainerResource. + public virtual MachineLearningModelContainerCollection GetMachineLearningModelContainers() { - return GetCachedClient(client => new MarketplaceSubscriptionCollection(client, Id)); + return GetCachedClient(client => new MachineLearningModelContainerCollection(client, Id)); } /// @@ -470,30 +665,30 @@ public virtual MarketplaceSubscriptionCollection GetMarketplaceSubscriptions() /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} /// /// /// Operation Id - /// MarketplaceSubscriptions_Get + /// ModelContainers_Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// - /// Container name. + /// Container name. This is case-sensitive. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetMarketplaceSubscriptionAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningModelContainerAsync(string name, CancellationToken cancellationToken = default) { - return await GetMarketplaceSubscriptions().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningModelContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// @@ -501,130 +696,61 @@ public virtual async Task> GetMarketpl /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} /// /// /// Operation Id - /// MarketplaceSubscriptions_Get + /// ModelContainers_Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// - /// Container name. + /// Container name. This is case-sensitive. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetMarketplaceSubscription(string name, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningModelContainer(string name, CancellationToken cancellationToken = default) { - return GetMarketplaceSubscriptions().Get(name, cancellationToken); + return GetMachineLearningModelContainers().Get(name, cancellationToken); } - /// Gets a collection of MachineLearningModelContainerResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningModelContainerResources and their operations over a MachineLearningModelContainerResource. - public virtual MachineLearningModelContainerCollection GetMachineLearningModelContainers() + /// Gets a collection of MachineLearningBatchEndpointResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningBatchEndpointResources and their operations over a MachineLearningBatchEndpointResource. + public virtual MachineLearningBatchEndpointCollection GetMachineLearningBatchEndpoints() { - return GetCachedClient(client => new MachineLearningModelContainerCollection(client, Id)); + return GetCachedClient(client => new MachineLearningBatchEndpointCollection(client, Id)); } /// - /// Get container. + /// Gets a batch inference endpoint by name. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} /// /// /// Operation Id - /// ModelContainers_Get + /// BatchEndpoints_Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetMachineLearningModelContainerAsync(string name, CancellationToken cancellationToken = default) - { - return await GetMachineLearningModelContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get container. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} - /// - /// - /// Operation Id - /// ModelContainers_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetMachineLearningModelContainer(string name, CancellationToken cancellationToken = default) - { - return GetMachineLearningModelContainers().Get(name, cancellationToken); - } - - /// Gets a collection of MachineLearningBatchEndpointResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningBatchEndpointResources and their operations over a MachineLearningBatchEndpointResource. - public virtual MachineLearningBatchEndpointCollection GetMachineLearningBatchEndpoints() - { - return GetCachedClient(client => new MachineLearningBatchEndpointCollection(client, Id)); - } - - /// - /// Gets a batch inference endpoint by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// - /// - /// Operation Id - /// BatchEndpoints_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name for the Batch Endpoint. + /// Name for the Batch Endpoint. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -647,7 +773,7 @@ public virtual async Task> GetMac /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -685,7 +811,7 @@ public virtual MachineLearningDatastoreCollection GetMachineLearningDatastores() /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -716,7 +842,7 @@ public virtual async Task> GetMachine /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -754,7 +880,7 @@ public virtual MachineLearningFeatureSetContainerCollection GetMachineLearningFe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -785,7 +911,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -823,7 +949,7 @@ public virtual MachineLearningFeatureStoreEntityContainerCollection GetMachineLe /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -854,7 +980,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -892,7 +1018,7 @@ public virtual MachineLearningJobCollection GetMachineLearningJobs() /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -923,7 +1049,7 @@ public virtual async Task> GetMachineLearni /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -941,6 +1067,75 @@ public virtual Response GetMachineLearningJob(string return GetMachineLearningJobs().Get(id, cancellationToken); } + /// Gets a collection of MarketplaceSubscriptionResources in the MachineLearningWorkspace. + /// An object representing collection of MarketplaceSubscriptionResources and their operations over a MarketplaceSubscriptionResource. + public virtual MarketplaceSubscriptionCollection GetMarketplaceSubscriptions() + { + return GetCachedClient(client => new MarketplaceSubscriptionCollection(client, Id)); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name} + /// + /// + /// Operation Id + /// MarketplaceSubscriptions_Get + /// + /// + /// Default Api Version + /// 2024-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetMarketplaceSubscriptionAsync(string name, CancellationToken cancellationToken = default) + { + return await GetMarketplaceSubscriptions().GetAsync(name, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get container. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name} + /// + /// + /// Operation Id + /// MarketplaceSubscriptions_Get + /// + /// + /// Default Api Version + /// 2024-04-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Container name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetMarketplaceSubscription(string name, CancellationToken cancellationToken = default) + { + return GetMarketplaceSubscriptions().Get(name, cancellationToken); + } + /// Gets a collection of MachineLearningOnlineEndpointResources in the MachineLearningWorkspace. /// An object representing collection of MachineLearningOnlineEndpointResources and their operations over a MachineLearningOnlineEndpointResource. public virtual MachineLearningOnlineEndpointCollection GetMachineLearningOnlineEndpoints() @@ -961,7 +1156,7 @@ public virtual MachineLearningOnlineEndpointCollection GetMachineLearningOnlineE /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -992,7 +1187,7 @@ public virtual async Task> GetMa /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1030,7 +1225,7 @@ public virtual MachineLearningScheduleCollection GetMachineLearningSchedules() /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1061,7 +1256,7 @@ public virtual async Task> GetMachineL /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1099,7 +1294,7 @@ public virtual ServerlessEndpointCollection GetServerlessEndpoints() /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1130,7 +1325,7 @@ public virtual async Task> GetServerlessEnd /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1148,450 +1343,174 @@ public virtual Response GetServerlessEndpoint(string return GetServerlessEndpoints().Get(name, cancellationToken); } - /// Gets a collection of MachineLearningWorkspaceConnectionResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningWorkspaceConnectionResources and their operations over a MachineLearningWorkspaceConnectionResource. - public virtual MachineLearningWorkspaceConnectionCollection GetMachineLearningWorkspaceConnections() - { - return GetCachedClient(client => new MachineLearningWorkspaceConnectionCollection(client, Id)); - } - /// - /// Lists machine learning workspaces connections by name. + /// Gets the properties of the specified machine learning workspace. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} /// /// /// Operation Id - /// WorkspaceConnections_Get + /// Workspaces_Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// - /// Friendly name of the workspace connection. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetMachineLearningWorkspaceConnectionAsync(string connectionName, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - return await GetMachineLearningWorkspaceConnections().GetAsync(connectionName, cancellationToken).ConfigureAwait(false); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceWorkspacesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningWorkspaceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Lists machine learning workspaces connections by name. + /// Gets the properties of the specified machine learning workspace. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} /// /// /// Operation Id - /// WorkspaceConnections_Get + /// Workspaces_Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// - /// Friendly name of the workspace connection. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetMachineLearningWorkspaceConnection(string connectionName, CancellationToken cancellationToken = default) - { - return GetMachineLearningWorkspaceConnections().Get(connectionName, cancellationToken); - } - - /// Gets a collection of EndpointResourcePropertiesBasicResources in the MachineLearningWorkspace. - /// An object representing collection of EndpointResourcePropertiesBasicResources and their operations over a EndpointResourcePropertiesBasicResource. - public virtual EndpointResourcePropertiesBasicResourceCollection GetEndpointResourcePropertiesBasicResources() + public virtual Response Get(CancellationToken cancellationToken = default) { - return GetCachedClient(client => new EndpointResourcePropertiesBasicResourceCollection(client, Id)); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Get"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceWorkspacesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningWorkspaceResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Gets endpoint resource + /// Deletes a machine learning workspace. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} /// /// /// Operation Id - /// Endpoint_Get + /// Workspaces_Delete /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// - /// Name of the endpoint resource. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Flag to indicate delete is a purge request. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetEndpointResourcePropertiesBasicResourceAsync(string endpointName, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? forceToPurge = null, CancellationToken cancellationToken = default) { - return await GetEndpointResourcePropertiesBasicResources().GetAsync(endpointName, cancellationToken).ConfigureAwait(false); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceWorkspacesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceToPurge, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceToPurge).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Gets endpoint resource + /// Deletes a machine learning workspace. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} /// /// /// Operation Id - /// Endpoint_Get + /// Workspaces_Delete /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// - /// Name of the endpoint resource. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Flag to indicate delete is a purge request. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetEndpointResourcePropertiesBasicResource(string endpointName, CancellationToken cancellationToken = default) - { - return GetEndpointResourcePropertiesBasicResources().Get(endpointName, cancellationToken); - } - - /// Gets a collection of MachineLearningOutboundRuleBasicResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningOutboundRuleBasicResources and their operations over a MachineLearningOutboundRuleBasicResource. - public virtual MachineLearningOutboundRuleBasicCollection GetMachineLearningOutboundRuleBasics() + public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceToPurge = null, CancellationToken cancellationToken = default) { - return GetCachedClient(client => new MachineLearningOutboundRuleBasicCollection(client, Id)); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceWorkspacesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceToPurge, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceToPurge).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Gets an outbound rule from the managed network of a machine learning workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} - /// - /// - /// Operation Id - /// ManagedNetworkSettingsRule_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the workspace managed network outbound rule. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetMachineLearningOutboundRuleBasicAsync(string ruleName, CancellationToken cancellationToken = default) - { - return await GetMachineLearningOutboundRuleBasics().GetAsync(ruleName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets an outbound rule from the managed network of a machine learning workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName} - /// - /// - /// Operation Id - /// ManagedNetworkSettingsRule_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the workspace managed network outbound rule. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetMachineLearningOutboundRuleBasic(string ruleName, CancellationToken cancellationToken = default) - { - return GetMachineLearningOutboundRuleBasics().Get(ruleName, cancellationToken); - } - - /// Gets a collection of MachineLearningPrivateEndpointConnectionResources in the MachineLearningWorkspace. - /// An object representing collection of MachineLearningPrivateEndpointConnectionResources and their operations over a MachineLearningPrivateEndpointConnectionResource. - public virtual MachineLearningPrivateEndpointConnectionCollection GetMachineLearningPrivateEndpointConnections() - { - return GetCachedClient(client => new MachineLearningPrivateEndpointConnectionCollection(client, Id)); - } - - /// - /// Called by end-users to get a PE connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// NRP Private Endpoint Connection Name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetMachineLearningPrivateEndpointConnectionAsync(string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - return await GetMachineLearningPrivateEndpointConnections().GetAsync(privateEndpointConnectionName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Called by end-users to get a PE connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName} - /// - /// - /// Operation Id - /// PrivateEndpointConnections_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// NRP Private Endpoint Connection Name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetMachineLearningPrivateEndpointConnection(string privateEndpointConnectionName, CancellationToken cancellationToken = default) - { - return GetMachineLearningPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); - } - - /// - /// Gets the properties of the specified machine learning workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} - /// - /// - /// Operation Id - /// Workspaces_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Get"); - scope.Start(); - try - { - var response = await _machineLearningWorkspaceWorkspacesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MachineLearningWorkspaceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the properties of the specified machine learning workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} - /// - /// - /// Operation Id - /// Workspaces_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Get"); - scope.Start(); - try - { - var response = _machineLearningWorkspaceWorkspacesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MachineLearningWorkspaceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a machine learning workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} - /// - /// - /// Operation Id - /// Workspaces_Delete - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Flag to indicate delete is a purge request. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? forceToPurge = null, CancellationToken cancellationToken = default) - { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Delete"); - scope.Start(); - try - { - var response = await _machineLearningWorkspaceWorkspacesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceToPurge, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceToPurge).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes a machine learning workspace. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName} - /// - /// - /// Operation Id - /// Workspaces_Delete - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Flag to indicate delete is a purge request. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceToPurge = null, CancellationToken cancellationToken = default) - { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Delete"); - scope.Start(); - try - { - var response = _machineLearningWorkspaceWorkspacesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceToPurge, cancellationToken); - var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, forceToPurge).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates a machine learning workspace with the specified parameters. + /// Updates a machine learning workspace with the specified parameters. /// /// /// Request Path @@ -1603,7 +1522,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceToPurge = nul /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1649,7 +1568,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1682,101 +1601,6 @@ public virtual ArmOperation Update(WaitUntil w } } - /// - /// Lists all enabled features for a workspace - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features - /// - /// - /// Operation Id - /// WorkspaceFeatures_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetWorkspaceFeaturesAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceFeaturesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceFeaturesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => MachineLearningUserFeature.DeserializeMachineLearningUserFeature(e), _workspaceFeaturesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetWorkspaceFeatures", "value", "nextLink", cancellationToken); - } - - /// - /// Lists all enabled features for a workspace - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features - /// - /// - /// Operation Id - /// WorkspaceFeatures_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetWorkspaceFeatures(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceFeaturesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceFeaturesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => MachineLearningUserFeature.DeserializeMachineLearningUserFeature(e), _workspaceFeaturesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetWorkspaceFeatures", "value", "nextLink", cancellationToken); - } - - /// - /// Diagnose workspace setup issue. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose - /// - /// - /// Operation Id - /// Workspaces_Diagnose - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameter of diagnosing workspace health. - /// The cancellation token to use. - public virtual async Task> DiagnoseAsync(WaitUntil waitUntil, MachineLearningWorkspaceDiagnoseContent content = null, CancellationToken cancellationToken = default) - { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Diagnose"); - scope.Start(); - try - { - var response = await _machineLearningWorkspaceWorkspacesRestClient.DiagnoseAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new MachineLearningWorkspaceDiagnoseResultOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDiagnoseRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Diagnose workspace setup issue. /// @@ -1790,7 +1614,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1799,133 +1623,19 @@ public virtual async Task> /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The parameter of diagnosing workspace health. - /// The cancellation token to use. - public virtual ArmOperation Diagnose(WaitUntil waitUntil, MachineLearningWorkspaceDiagnoseContent content = null, CancellationToken cancellationToken = default) - { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Diagnose"); - scope.Start(); - try - { - var response = _machineLearningWorkspaceWorkspacesRestClient.Diagnose(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new MachineLearningArmOperation(new MachineLearningWorkspaceDiagnoseResultOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDiagnoseRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys - /// - /// - /// Operation Id - /// Workspaces_ListKeys - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetKeysAsync(CancellationToken cancellationToken = default) - { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetKeys"); - scope.Start(); - try - { - var response = await _machineLearningWorkspaceWorkspacesRestClient.ListKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys - /// - /// - /// Operation Id - /// Workspaces_ListKeys - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response GetKeys(CancellationToken cancellationToken = default) - { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetKeys"); - scope.Start(); - try - { - var response = _machineLearningWorkspaceWorkspacesRestClient.ListKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get Azure Machine Learning Workspace notebook access token - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken - /// - /// - /// Operation Id - /// Workspaces_ListNotebookAccessToken - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// + /// The parameter of diagnosing workspace health. /// The cancellation token to use. - public virtual async Task> GetNotebookAccessTokenAsync(CancellationToken cancellationToken = default) + public virtual async Task> DiagnoseAsync(WaitUntil waitUntil, MachineLearningWorkspaceDiagnoseContent content = null, CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookAccessToken"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Diagnose"); scope.Start(); try { - var response = await _machineLearningWorkspaceWorkspacesRestClient.ListNotebookAccessTokenAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; + var response = await _machineLearningWorkspaceWorkspacesRestClient.DiagnoseAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningWorkspaceDiagnoseResultOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDiagnoseRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -1935,19 +1645,19 @@ public virtual async Task - /// Get Azure Machine Learning Workspace notebook access token + /// Diagnose workspace setup issue. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose /// /// /// Operation Id - /// Workspaces_ListNotebookAccessToken + /// Workspaces_Diagnose /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1955,15 +1665,20 @@ public virtual async Task /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The parameter of diagnosing workspace health. /// The cancellation token to use. - public virtual Response GetNotebookAccessToken(CancellationToken cancellationToken = default) + public virtual ArmOperation Diagnose(WaitUntil waitUntil, MachineLearningWorkspaceDiagnoseContent content = null, CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookAccessToken"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.Diagnose"); scope.Start(); try { - var response = _machineLearningWorkspaceWorkspacesRestClient.ListNotebookAccessToken(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; + var response = _machineLearningWorkspaceWorkspacesRestClient.Diagnose(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningWorkspaceDiagnoseResultOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDiagnoseRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; } catch (Exception e) { @@ -1973,19 +1688,19 @@ public virtual Response GetNo } /// - /// Lists keys of Azure Machine Learning Workspaces notebook. + /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys /// /// /// Operation Id - /// Workspaces_ListNotebookKeys + /// Workspaces_ListKeys /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -1994,13 +1709,13 @@ public virtual Response GetNo /// /// /// The cancellation token to use. - public virtual async Task> GetNotebookKeysAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetKeysAsync(CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookKeys"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetKeys"); scope.Start(); try { - var response = await _machineLearningWorkspaceWorkspacesRestClient.ListNotebookKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _machineLearningWorkspaceWorkspacesRestClient.ListKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -2011,19 +1726,19 @@ public virtual async Task - /// Lists keys of Azure Machine Learning Workspaces notebook. + /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys /// /// /// Operation Id - /// Workspaces_ListNotebookKeys + /// Workspaces_ListKeys /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2032,13 +1747,13 @@ public virtual async Task /// /// The cancellation token to use. - public virtual Response GetNotebookKeys(CancellationToken cancellationToken = default) + public virtual Response GetKeys(CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookKeys"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetKeys"); scope.Start(); try { - var response = _machineLearningWorkspaceWorkspacesRestClient.ListNotebookKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _machineLearningWorkspaceWorkspacesRestClient.ListKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -2049,19 +1764,19 @@ public virtual Response GetNotebo } /// - /// Lists keys of Azure Machine Learning Workspace's storage account. + /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys /// /// /// Operation Id - /// Workspaces_ListStorageAccountKeys + /// Workspaces_ResyncKeys /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2069,15 +1784,19 @@ public virtual Response GetNotebo /// /// /// + /// 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> GetStorageAccountKeysAsync(CancellationToken cancellationToken = default) + public virtual async Task ResyncKeysAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetStorageAccountKeys"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.ResyncKeys"); scope.Start(); try { - var response = await _machineLearningWorkspaceWorkspacesRestClient.ListStorageAccountKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; + var response = await _machineLearningWorkspaceWorkspacesRestClient.ResyncKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateResyncKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -2087,19 +1806,19 @@ public virtual async Task - /// Lists keys of Azure Machine Learning Workspace's storage account. + /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys /// /// /// Operation Id - /// Workspaces_ListStorageAccountKeys + /// Workspaces_ResyncKeys /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2107,15 +1826,19 @@ public virtual async Task /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual Response GetStorageAccountKeys(CancellationToken cancellationToken = default) + public virtual ArmOperation ResyncKeys(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetStorageAccountKeys"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.ResyncKeys"); scope.Start(); try { - var response = _machineLearningWorkspaceWorkspacesRestClient.ListStorageAccountKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; + var response = _machineLearningWorkspaceWorkspacesRestClient.ResyncKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateResyncKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; } catch (Exception e) { @@ -2125,19 +1848,19 @@ public virtual Response Get } /// - /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + /// return notebook access token and refresh token /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken /// /// /// Operation Id - /// Workspaces_ListOutboundNetworkDependenciesEndpoints + /// Workspaces_ListNotebookAccessToken /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2146,27 +1869,36 @@ public virtual Response Get /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetOutboundNetworkDependenciesEndpointsAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetNotebookAccessTokenAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => MachineLearningFqdnEndpoints.DeserializeMachineLearningFqdnEndpoints(e), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetOutboundNetworkDependenciesEndpoints", "value", null, cancellationToken); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookAccessToken"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceWorkspacesRestClient.ListNotebookAccessTokenAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + /// return notebook access token and refresh token /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken /// /// /// Operation Id - /// Workspaces_ListOutboundNetworkDependenciesEndpoints + /// Workspaces_ListNotebookAccessToken /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2175,15 +1907,24 @@ public virtual AsyncPageable GetOutboundNetworkDep /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetOutboundNetworkDependenciesEndpoints(CancellationToken cancellationToken = default) + public virtual Response GetNotebookAccessToken(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => MachineLearningFqdnEndpoints.DeserializeMachineLearningFqdnEndpoints(e), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetOutboundNetworkDependenciesEndpoints", "value", null, cancellationToken); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookAccessToken"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceWorkspacesRestClient.ListNotebookAccessToken(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Prepare Azure Machine Learning Workspace's notebook resource + /// Prepare a notebook. /// /// /// Request Path @@ -2195,7 +1936,7 @@ public virtual Pageable GetOutboundNetworkDependen /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2225,7 +1966,7 @@ public virtual async Task> Pre } /// - /// Prepare Azure Machine Learning Workspace's notebook resource + /// Prepare a notebook. /// /// /// Request Path @@ -2237,7 +1978,7 @@ public virtual async Task> Pre /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2267,19 +2008,19 @@ public virtual ArmOperation PrepareNotebook } /// - /// Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and password for container registry + /// List storage account keys of a workspace. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys /// /// /// Operation Id - /// Workspaces_ResyncKeys + /// Workspaces_ListStorageAccountKeys /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2287,19 +2028,15 @@ public virtual ArmOperation PrepareNotebook /// /// /// - /// 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 ResyncKeysAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> GetStorageAccountKeysAsync(CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.ResyncKeys"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetStorageAccountKeys"); scope.Start(); try { - var response = await _machineLearningWorkspaceWorkspacesRestClient.ResyncKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateResyncKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _machineLearningWorkspaceWorkspacesRestClient.ListStorageAccountKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; } catch (Exception e) { @@ -2309,19 +2046,19 @@ public virtual async Task ResyncKeysAsync(WaitUntil waitUntil, Can } /// - /// Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and password for container registry + /// List storage account keys of a workspace. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys /// /// /// Operation Id - /// Workspaces_ResyncKeys + /// Workspaces_ListStorageAccountKeys /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2329,19 +2066,15 @@ public virtual async Task ResyncKeysAsync(WaitUntil waitUntil, Can /// /// /// - /// 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 ResyncKeys(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual Response GetStorageAccountKeys(CancellationToken cancellationToken = default) { - using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.ResyncKeys"); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetStorageAccountKeys"); scope.Start(); try { - var response = _machineLearningWorkspaceWorkspacesRestClient.ResyncKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateResyncKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; + var response = _machineLearningWorkspaceWorkspacesRestClient.ListStorageAccountKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; } catch (Exception e) { @@ -2351,133 +2084,141 @@ public virtual ArmOperation ResyncKeys(WaitUntil waitUntil, CancellationToken ca } /// - /// Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + /// List keys of a notebook. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listConnectionModels + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys /// /// /// Operation Id - /// Connection_ListModels + /// Workspaces_ListNotebookKeys /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetModelsConnectionsAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetNotebookKeysAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceConnectionDeploymentConnectionRestClient.CreateListModelsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => EndpointModelProperties.DeserializeEndpointModelProperties(e), _workspaceConnectionDeploymentConnectionClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetModelsConnections", "value", null, cancellationToken); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookKeys"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceWorkspacesRestClient.ListNotebookKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + /// List keys of a notebook. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listConnectionModels + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys /// /// /// Operation Id - /// Connection_ListModels + /// Workspaces_ListNotebookKeys /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetModelsConnections(CancellationToken cancellationToken = default) + public virtual Response GetNotebookKeys(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceConnectionDeploymentConnectionRestClient.CreateListModelsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => EndpointModelProperties.DeserializeEndpointModelProperties(e), _workspaceConnectionDeploymentConnectionClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetModelsConnections", "value", null, cancellationToken); + using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookKeys"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceWorkspacesRestClient.ListNotebookKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Get all the deployments under the workspace scope + /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/deployments + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints /// /// /// Operation Id - /// EndpointDeployment_GetInWorkspace + /// Workspaces_ListOutboundNetworkDependenciesEndpoints /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// - /// Endpoint type filter. - /// Continuation token for pagination. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetInWorkspaceEndpointDeploymentsAsync(EndpointType? endpointType = null, string skip = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetOutboundNetworkDependenciesEndpointsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateGetInWorkspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointType, skip); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateGetInWorkspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointType, skip); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkspaceEndpointDeploymentResource(Client, EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(e)), _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetInWorkspaceEndpointDeployments", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => MachineLearningFqdnEndpoints.DeserializeMachineLearningFqdnEndpoints(e), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetOutboundNetworkDependenciesEndpoints", "value", null, cancellationToken); } /// - /// Get all the deployments under the workspace scope + /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/deployments + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints /// /// /// Operation Id - /// EndpointDeployment_GetInWorkspace + /// Workspaces_ListOutboundNetworkDependenciesEndpoints /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource - /// + /// /// /// /// - /// Endpoint type filter. - /// Continuation token for pagination. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetInWorkspaceEndpointDeployments(EndpointType? endpointType = null, string skip = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetOutboundNetworkDependenciesEndpoints(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateGetInWorkspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointType, skip); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateGetInWorkspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointType, skip); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkspaceEndpointDeploymentResource(Client, EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(e)), _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetInWorkspaceEndpointDeployments", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => _machineLearningWorkspaceWorkspacesRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => MachineLearningFqdnEndpoints.DeserializeMachineLearningFqdnEndpoints(e), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetOutboundNetworkDependenciesEndpoints", "value", null, cancellationToken); } /// - /// Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. - /// Each "private link resource" is a connection endpoint (IP address) to the resource. - /// Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. - /// Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. - /// Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + /// Gets the private link resources that need to be created for a workspace. /// /// /// Request Path @@ -2489,7 +2230,7 @@ public virtual Pageable GetInWorkspaceEndpo /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -2502,11 +2243,7 @@ public virtual AsyncPageable GetPrivateLinkR } /// - /// Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. - /// Each "private link resource" is a connection endpoint (IP address) to the resource. - /// Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. - /// Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. - /// Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + /// Gets the private link resources that need to be created for a workspace. /// /// /// Request Path @@ -2518,7 +2255,7 @@ public virtual AsyncPageable GetPrivateLinkR /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -2543,7 +2280,7 @@ public virtual Pageable GetPrivateLinkResour /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -2582,7 +2319,7 @@ public virtual async Task> Provision /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// @@ -2608,6 +2345,58 @@ public virtual ArmOperation ProvisionManagedNetwo } } + /// + /// Lists all enabled features for a workspace + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features + /// + /// + /// Operation Id + /// WorkspaceFeatures_List + /// + /// + /// Default Api Version + /// 2024-04-01 + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetWorkspaceFeaturesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceFeaturesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceFeaturesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => MachineLearningUserFeature.DeserializeMachineLearningUserFeature(e), _workspaceFeaturesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetWorkspaceFeatures", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all enabled features for a workspace + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features + /// + /// + /// Operation Id + /// WorkspaceFeatures_List + /// + /// + /// Default Api Version + /// 2024-04-01 + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetWorkspaceFeatures(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceFeaturesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceFeaturesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => MachineLearningUserFeature.DeserializeMachineLearningUserFeature(e), _workspaceFeaturesClientDiagnostics, Pipeline, "MachineLearningWorkspaceResource.GetWorkspaceFeatures", "value", "nextLink", cancellationToken); + } + /// /// Add a tag to the current resource. /// @@ -2621,7 +2410,7 @@ public virtual ArmOperation ProvisionManagedNetwo /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2683,7 +2472,7 @@ public virtual async Task> AddTagAsyn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2745,7 +2534,7 @@ public virtual Response AddTag(string key, str /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2802,7 +2591,7 @@ public virtual async Task> SetTagsAsy /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2859,7 +2648,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -2919,7 +2708,7 @@ public virtual async Task> RemoveTagA /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MarketplaceSubscriptionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MarketplaceSubscriptionCollection.cs index a5a48c172723f..b9cc47d59ba61 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MarketplaceSubscriptionCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MarketplaceSubscriptionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string name, Cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string skip = nu /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MarketplaceSubscriptionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MarketplaceSubscriptionResource.cs index 055ef0d1c33b5..130cf9b543300 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MarketplaceSubscriptionResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MarketplaceSubscriptionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AadAuthTypeWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AadAuthTypeWorkspaceConnectionProperties.Serialization.cs index b42ef8374b1c7..73d9a9dcc9a30 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AadAuthTypeWorkspaceConnectionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AadAuthTypeWorkspaceConnectionProperties.Serialization.cs @@ -38,11 +38,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -58,6 +53,11 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -69,16 +69,6 @@ void IJsonModel.Write(Utf8JsonWriter w } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -89,15 +79,15 @@ void IJsonModel.Write(Utf8JsonWriter w } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -140,16 +130,14 @@ internal static AadAuthTypeWorkspaceConnectionProperties DeserializeAadAuthTypeW MachineLearningConnectionAuthType authType = default; MachineLearningConnectionCategory? category = default; ResourceIdentifier createdByWorkspaceArmId = default; - string error = default; DateTimeOffset? expiryTime = default; ConnectionGroup? group = default; bool? isSharedToAll = default; + string target = default; IDictionary metadata = default; - ManagedPERequirement? peRequirement = default; - ManagedPEStatus? peStatus = default; IList sharedUserList = default; - string target = default; - bool? useWorkspaceManagedIdentity = default; + string value = default; + MachineLearningValueFormat? valueFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -177,11 +165,6 @@ internal static AadAuthTypeWorkspaceConnectionProperties DeserializeAadAuthTypeW createdByWorkspaceArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } if (property.NameEquals("expiryTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -209,6 +192,11 @@ internal static AadAuthTypeWorkspaceConnectionProperties DeserializeAadAuthTypeW isSharedToAll = property.Value.GetBoolean(); continue; } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -223,24 +211,6 @@ internal static AadAuthTypeWorkspaceConnectionProperties DeserializeAadAuthTypeW metadata = dictionary; continue; } - if (property.NameEquals("peRequirement"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peRequirement = new ManagedPERequirement(property.Value.GetString()); - continue; - } - if (property.NameEquals("peStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peStatus = new ManagedPEStatus(property.Value.GetString()); - continue; - } if (property.NameEquals("sharedUserList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -255,18 +225,18 @@ internal static AadAuthTypeWorkspaceConnectionProperties DeserializeAadAuthTypeW sharedUserList = array; continue; } - if (property.NameEquals("target"u8)) + if (property.NameEquals("value"u8)) { - target = property.Value.GetString(); + value = property.Value.GetString(); continue; } - if (property.NameEquals("useWorkspaceManagedIdentity"u8)) + if (property.NameEquals("valueFormat"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - useWorkspaceManagedIdentity = property.Value.GetBoolean(); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } if (options.Format != "W") @@ -279,16 +249,14 @@ internal static AadAuthTypeWorkspaceConnectionProperties DeserializeAadAuthTypeW authType, category, createdByWorkspaceArmId, - error, expiryTime, group, isSharedToAll, + target, metadata ?? new ChangeTrackingDictionary(), - peRequirement, - peStatus, sharedUserList ?? new ChangeTrackingList(), - target, - useWorkspaceManagedIdentity, + value, + valueFormat, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AadAuthTypeWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AadAuthTypeWorkspaceConnectionProperties.cs index 289ac575a90b7..7be1d29bd2d54 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AadAuthTypeWorkspaceConnectionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AadAuthTypeWorkspaceConnectionProperties.cs @@ -24,18 +24,16 @@ public AadAuthTypeWorkspaceConnectionProperties() /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. - internal AadAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData) : base(authType, category, createdByWorkspaceArmId, error, expiryOn, group, isSharedToAll, metadata, peRequirement, peStatus, sharedUserList, target, useWorkspaceManagedIdentity, serializedAdditionalRawData) + internal AadAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData) : base(authType, category, createdByWorkspaceArmId, expiryOn, group, isSharedToAll, target, metadata, sharedUserList, value, valueFormat, serializedAdditionalRawData) { AuthType = authType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.Serialization.cs index c3cee5f528c32..f804cd30d4089 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.Serialization.cs @@ -43,11 +43,6 @@ void IJsonModel.Write(Utf8JsonWr writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -63,6 +58,11 @@ void IJsonModel.Write(Utf8JsonWr writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -74,16 +74,6 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -94,15 +84,15 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -146,16 +136,14 @@ internal static AccessKeyAuthTypeWorkspaceConnectionProperties DeserializeAccess MachineLearningConnectionAuthType authType = default; MachineLearningConnectionCategory? category = default; ResourceIdentifier createdByWorkspaceArmId = default; - string error = default; DateTimeOffset? expiryTime = default; ConnectionGroup? group = default; bool? isSharedToAll = default; + string target = default; IDictionary metadata = default; - ManagedPERequirement? peRequirement = default; - ManagedPEStatus? peStatus = default; IList sharedUserList = default; - string target = default; - bool? useWorkspaceManagedIdentity = default; + string value = default; + MachineLearningValueFormat? valueFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -192,11 +180,6 @@ internal static AccessKeyAuthTypeWorkspaceConnectionProperties DeserializeAccess createdByWorkspaceArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } if (property.NameEquals("expiryTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,6 +207,11 @@ internal static AccessKeyAuthTypeWorkspaceConnectionProperties DeserializeAccess isSharedToAll = property.Value.GetBoolean(); continue; } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -238,24 +226,6 @@ internal static AccessKeyAuthTypeWorkspaceConnectionProperties DeserializeAccess metadata = dictionary; continue; } - if (property.NameEquals("peRequirement"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peRequirement = new ManagedPERequirement(property.Value.GetString()); - continue; - } - if (property.NameEquals("peStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peStatus = new ManagedPEStatus(property.Value.GetString()); - continue; - } if (property.NameEquals("sharedUserList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -270,18 +240,18 @@ internal static AccessKeyAuthTypeWorkspaceConnectionProperties DeserializeAccess sharedUserList = array; continue; } - if (property.NameEquals("target"u8)) + if (property.NameEquals("value"u8)) { - target = property.Value.GetString(); + value = property.Value.GetString(); continue; } - if (property.NameEquals("useWorkspaceManagedIdentity"u8)) + if (property.NameEquals("valueFormat"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - useWorkspaceManagedIdentity = property.Value.GetBoolean(); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } if (options.Format != "W") @@ -294,16 +264,14 @@ internal static AccessKeyAuthTypeWorkspaceConnectionProperties DeserializeAccess authType, category, createdByWorkspaceArmId, - error, expiryTime, group, isSharedToAll, + target, metadata ?? new ChangeTrackingDictionary(), - peRequirement, - peStatus, sharedUserList ?? new ChangeTrackingList(), - target, - useWorkspaceManagedIdentity, + value, + valueFormat, serializedAdditionalRawData, credentials); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.cs index 3ad0c6a0718ba..4141cefa16577 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccessKeyAuthTypeWorkspaceConnectionProperties.cs @@ -24,19 +24,17 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties() /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. /// - internal AccessKeyAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData, WorkspaceConnectionAccessKey credentials) : base(authType, category, createdByWorkspaceArmId, error, expiryOn, group, isSharedToAll, metadata, peRequirement, peStatus, sharedUserList, target, useWorkspaceManagedIdentity, serializedAdditionalRawData) + internal AccessKeyAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData, WorkspaceConnectionAccessKey credentials) : base(authType, category, createdByWorkspaceArmId, expiryOn, group, isSharedToAll, target, metadata, sharedUserList, value, valueFormat, serializedAdditionalRawData) { Credentials = credentials; AuthType = authType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountApiKeys.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountApiKeys.Serialization.cs deleted file mode 100644 index bd95d002cfea6..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountApiKeys.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AccountApiKeys : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AccountApiKeys)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Key1)) - { - writer.WritePropertyName("key1"u8); - writer.WriteStringValue(Key1); - } - if (Optional.IsDefined(Key2)) - { - writer.WritePropertyName("key2"u8); - writer.WriteStringValue(Key2); - } - 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 - } - } - writer.WriteEndObject(); - } - - AccountApiKeys 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(AccountApiKeys)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAccountApiKeys(document.RootElement, options); - } - - internal static AccountApiKeys DeserializeAccountApiKeys(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string key1 = default; - string key2 = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("key1"u8)) - { - key1 = property.Value.GetString(); - continue; - } - if (property.NameEquals("key2"u8)) - { - key2 = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AccountApiKeys(key1, key2, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(AccountApiKeys)} does not support writing '{options.Format}' format."); - } - } - - AccountApiKeys 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 DeserializeAccountApiKeys(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AccountApiKeys)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountApiKeys.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountApiKeys.cs deleted file mode 100644 index cb65f77cb4ff7..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountApiKeys.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The AccountApiKeys. - public partial class AccountApiKeys - { - /// - /// 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 AccountApiKeys() - { - } - - /// Initializes a new instance of . - /// - /// - /// Keeps track of any properties unknown to the library. - internal AccountApiKeys(string key1, string key2, IDictionary serializedAdditionalRawData) - { - Key1 = key1; - Key2 = key2; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets the key 1. - public string Key1 { get; } - /// Gets the key 2. - public string Key2 { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyAuthTypeWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyAuthTypeWorkspaceConnectionProperties.Serialization.cs index a0ec034812f77..80f7be11fa89e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyAuthTypeWorkspaceConnectionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyAuthTypeWorkspaceConnectionProperties.Serialization.cs @@ -43,11 +43,6 @@ void IJsonModel.Write(Utf8JsonW writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -63,6 +58,11 @@ void IJsonModel.Write(Utf8JsonW writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -74,16 +74,6 @@ void IJsonModel.Write(Utf8JsonW } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -94,15 +84,15 @@ void IJsonModel.Write(Utf8JsonW } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -146,16 +136,14 @@ internal static AccountKeyAuthTypeWorkspaceConnectionProperties DeserializeAccou MachineLearningConnectionAuthType authType = default; MachineLearningConnectionCategory? category = default; ResourceIdentifier createdByWorkspaceArmId = default; - string error = default; DateTimeOffset? expiryTime = default; ConnectionGroup? group = default; bool? isSharedToAll = default; + string target = default; IDictionary metadata = default; - ManagedPERequirement? peRequirement = default; - ManagedPEStatus? peStatus = default; IList sharedUserList = default; - string target = default; - bool? useWorkspaceManagedIdentity = default; + string value = default; + MachineLearningValueFormat? valueFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -192,11 +180,6 @@ internal static AccountKeyAuthTypeWorkspaceConnectionProperties DeserializeAccou createdByWorkspaceArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } if (property.NameEquals("expiryTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,6 +207,11 @@ internal static AccountKeyAuthTypeWorkspaceConnectionProperties DeserializeAccou isSharedToAll = property.Value.GetBoolean(); continue; } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -238,24 +226,6 @@ internal static AccountKeyAuthTypeWorkspaceConnectionProperties DeserializeAccou metadata = dictionary; continue; } - if (property.NameEquals("peRequirement"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peRequirement = new ManagedPERequirement(property.Value.GetString()); - continue; - } - if (property.NameEquals("peStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peStatus = new ManagedPEStatus(property.Value.GetString()); - continue; - } if (property.NameEquals("sharedUserList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -270,18 +240,18 @@ internal static AccountKeyAuthTypeWorkspaceConnectionProperties DeserializeAccou sharedUserList = array; continue; } - if (property.NameEquals("target"u8)) + if (property.NameEquals("value"u8)) { - target = property.Value.GetString(); + value = property.Value.GetString(); continue; } - if (property.NameEquals("useWorkspaceManagedIdentity"u8)) + if (property.NameEquals("valueFormat"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - useWorkspaceManagedIdentity = property.Value.GetBoolean(); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } if (options.Format != "W") @@ -294,16 +264,14 @@ internal static AccountKeyAuthTypeWorkspaceConnectionProperties DeserializeAccou authType, category, createdByWorkspaceArmId, - error, expiryTime, group, isSharedToAll, + target, metadata ?? new ChangeTrackingDictionary(), - peRequirement, - peStatus, sharedUserList ?? new ChangeTrackingList(), - target, - useWorkspaceManagedIdentity, + value, + valueFormat, serializedAdditionalRawData, credentials); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyAuthTypeWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyAuthTypeWorkspaceConnectionProperties.cs index 112aa7fecd584..ee043bd7bf8ec 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyAuthTypeWorkspaceConnectionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyAuthTypeWorkspaceConnectionProperties.cs @@ -24,25 +24,23 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties() /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. - /// Account key object for workspace connection credential. - internal AccountKeyAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData, WorkspaceConnectionAccountKey credentials) : base(authType, category, createdByWorkspaceArmId, error, expiryOn, group, isSharedToAll, metadata, peRequirement, peStatus, sharedUserList, target, useWorkspaceManagedIdentity, serializedAdditionalRawData) + /// + internal AccountKeyAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData, WorkspaceConnectionAccountKey credentials) : base(authType, category, createdByWorkspaceArmId, expiryOn, group, isSharedToAll, target, metadata, sharedUserList, value, valueFormat, serializedAdditionalRawData) { Credentials = credentials; AuthType = authType; } - /// Account key object for workspace connection credential. + /// Gets or sets the credentials. internal WorkspaceConnectionAccountKey Credentials { get; set; } /// Gets or sets the credentials key. public string CredentialsKey diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AllowedContentLevel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AllowedContentLevel.cs deleted file mode 100644 index 198e01da20db7..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AllowedContentLevel.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Level at which content is filtered. - public readonly partial struct AllowedContentLevel : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AllowedContentLevel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string LowValue = "Low"; - private const string MediumValue = "Medium"; - private const string HighValue = "High"; - - /// Low. - public static AllowedContentLevel Low { get; } = new AllowedContentLevel(LowValue); - /// Medium. - public static AllowedContentLevel Medium { get; } = new AllowedContentLevel(MediumValue); - /// High. - public static AllowedContentLevel High { get; } = new AllowedContentLevel(HighValue); - /// Determines if two values are the same. - public static bool operator ==(AllowedContentLevel left, AllowedContentLevel right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AllowedContentLevel left, AllowedContentLevel right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AllowedContentLevel(string value) => new AllowedContentLevel(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AllowedContentLevel other && Equals(other); - /// - public bool Equals(AllowedContentLevel 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.Serialization.cs index b7068ace607d1..fa8a17b270b4f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.Serialization.cs @@ -43,11 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -63,6 +58,11 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -74,16 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wr } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -94,15 +84,15 @@ void IJsonModel.Write(Utf8JsonWriter wr } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -146,16 +136,14 @@ internal static ApiKeyAuthWorkspaceConnectionProperties DeserializeApiKeyAuthWor MachineLearningConnectionAuthType authType = default; MachineLearningConnectionCategory? category = default; ResourceIdentifier createdByWorkspaceArmId = default; - string error = default; DateTimeOffset? expiryTime = default; ConnectionGroup? group = default; bool? isSharedToAll = default; + string target = default; IDictionary metadata = default; - ManagedPERequirement? peRequirement = default; - ManagedPEStatus? peStatus = default; IList sharedUserList = default; - string target = default; - bool? useWorkspaceManagedIdentity = default; + string value = default; + MachineLearningValueFormat? valueFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -192,11 +180,6 @@ internal static ApiKeyAuthWorkspaceConnectionProperties DeserializeApiKeyAuthWor createdByWorkspaceArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } if (property.NameEquals("expiryTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,6 +207,11 @@ internal static ApiKeyAuthWorkspaceConnectionProperties DeserializeApiKeyAuthWor isSharedToAll = property.Value.GetBoolean(); continue; } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -238,24 +226,6 @@ internal static ApiKeyAuthWorkspaceConnectionProperties DeserializeApiKeyAuthWor metadata = dictionary; continue; } - if (property.NameEquals("peRequirement"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peRequirement = new ManagedPERequirement(property.Value.GetString()); - continue; - } - if (property.NameEquals("peStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peStatus = new ManagedPEStatus(property.Value.GetString()); - continue; - } if (property.NameEquals("sharedUserList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -270,18 +240,18 @@ internal static ApiKeyAuthWorkspaceConnectionProperties DeserializeApiKeyAuthWor sharedUserList = array; continue; } - if (property.NameEquals("target"u8)) + if (property.NameEquals("value"u8)) { - target = property.Value.GetString(); + value = property.Value.GetString(); continue; } - if (property.NameEquals("useWorkspaceManagedIdentity"u8)) + if (property.NameEquals("valueFormat"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - useWorkspaceManagedIdentity = property.Value.GetBoolean(); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } if (options.Format != "W") @@ -294,16 +264,14 @@ internal static ApiKeyAuthWorkspaceConnectionProperties DeserializeApiKeyAuthWor authType, category, createdByWorkspaceArmId, - error, expiryTime, group, isSharedToAll, + target, metadata ?? new ChangeTrackingDictionary(), - peRequirement, - peStatus, sharedUserList ?? new ChangeTrackingList(), - target, - useWorkspaceManagedIdentity, + value, + valueFormat, serializedAdditionalRawData, credentials); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.cs index 4f69eac4a31b4..91130dd5975dc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApiKeyAuthWorkspaceConnectionProperties.cs @@ -45,19 +45,17 @@ public ApiKeyAuthWorkspaceConnectionProperties() /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. /// Api key object for workspace connection credential. - internal ApiKeyAuthWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData, WorkspaceConnectionApiKey credentials) : base(authType, category, createdByWorkspaceArmId, error, expiryOn, group, isSharedToAll, metadata, peRequirement, peStatus, sharedUserList, target, useWorkspaceManagedIdentity, serializedAdditionalRawData) + internal ApiKeyAuthWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData, WorkspaceConnectionApiKey credentials) : base(authType, category, createdByWorkspaceArmId, expiryOn, group, isSharedToAll, target, metadata, sharedUserList, value, valueFormat, serializedAdditionalRawData) { Credentials = credentials; AuthType = authType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.Serialization.cs index 5b388ec699c1f..658fb31d642ac 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.Serialization.cs @@ -26,6 +26,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } writer.WriteStartObject(); + if (Optional.IsDefined(Resources)) + { + writer.WritePropertyName("resources"u8); + writer.WriteObjectValue(Resources, options); + } if (Optional.IsDefined(EnvironmentId)) { if (EnvironmentId != null) @@ -56,6 +61,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteNull("environmentVariables"); } } + writer.WritePropertyName("taskDetails"u8); + writer.WriteObjectValue(TaskDetails, options); if (Optional.IsCollectionDefined(Outputs)) { if (Outputs != null) @@ -86,53 +93,64 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteNull("queueSettings"); } } - if (Optional.IsDefined(Resources)) - { - writer.WritePropertyName("resources"u8); - writer.WriteObjectValue(Resources, options); - } - writer.WritePropertyName("taskDetails"u8); - writer.WriteObjectValue(TaskDetails, options); - if (Optional.IsDefined(ComponentId)) + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(DisplayName)) { - if (ComponentId != null) + if (DisplayName != null) { - writer.WritePropertyName("componentId"u8); - writer.WriteStringValue(ComponentId); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); } else { - writer.WriteNull("componentId"); + writer.WriteNull("displayName"); } } - if (Optional.IsDefined(ComputeId)) + if (options.Format != "W" && Optional.IsDefined(Status)) { - if (ComputeId != null) + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + } + if (Optional.IsCollectionDefined(Services)) + { + if (Services != null) { - writer.WritePropertyName("computeId"u8); - writer.WriteStringValue(ComputeId); + writer.WritePropertyName("services"u8); + writer.WriteStartObject(); + foreach (var item in Services) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); } else { - writer.WriteNull("computeId"); + writer.WriteNull("services"); } } - if (Optional.IsDefined(DisplayName)) + if (Optional.IsDefined(ComputeId)) { - if (DisplayName != null) + if (ComputeId != null) { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); + writer.WritePropertyName("computeId"u8); + writer.WriteStringValue(ComputeId); } else { - writer.WriteNull("displayName"); + writer.WriteNull("computeId"); } } - if (Optional.IsDefined(ExperimentName)) + if (Optional.IsDefined(IsArchived)) { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); } if (Optional.IsDefined(Identity)) { @@ -146,48 +164,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteNull("identity"); } } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"u8); - writer.WriteBooleanValue(IsArchived.Value); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsDefined(NotificationSetting)) + if (Optional.IsDefined(ComponentId)) { - if (NotificationSetting != null) + if (ComponentId != null) { - writer.WritePropertyName("notificationSetting"u8); - writer.WriteObjectValue(NotificationSetting, options); + writer.WritePropertyName("componentId"u8); + writer.WriteStringValue(ComponentId); } else { - writer.WriteNull("notificationSetting"); + writer.WriteNull("componentId"); } } - if (Optional.IsCollectionDefined(Services)) + if (Optional.IsDefined(NotificationSetting)) { - if (Services != null) + if (NotificationSetting != null) { - writer.WritePropertyName("services"u8); - writer.WriteStartObject(); - foreach (var item in Services) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting, options); } else { - writer.WriteNull("services"); + writer.WriteNull("notificationSetting"); } } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } if (Optional.IsDefined(Description)) { if (Description != null) @@ -200,13 +200,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -215,16 +215,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -233,7 +233,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -274,29 +274,38 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element, ModelReaderW { return null; } + MachineLearningJobResourceConfiguration resources = default; string environmentId = default; IDictionary environmentVariables = default; + AutoMLVertical taskDetails = default; IDictionary outputs = default; JobQueueSettings queueSettings = default; - MachineLearningJobResourceConfiguration resources = default; - AutoMLVertical taskDetails = default; - ResourceIdentifier componentId = default; - ResourceIdentifier computeId = default; + JobType jobType = default; string displayName = default; + MachineLearningJobStatus? status = default; string experimentName = default; - MachineLearningIdentityConfiguration identity = default; + IDictionary services = default; + ResourceIdentifier computeId = default; bool? isArchived = default; - JobType jobType = default; + MachineLearningIdentityConfiguration identity = default; + ResourceIdentifier componentId = default; NotificationSetting notificationSetting = default; - IDictionary services = default; - MachineLearningJobStatus? status = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("resources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resources = MachineLearningJobResourceConfiguration.DeserializeMachineLearningJobResourceConfiguration(property.Value, options); + continue; + } if (property.NameEquals("environmentId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -322,6 +331,11 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element, ModelReaderW environmentVariables = dictionary; continue; } + if (property.NameEquals("taskDetails"u8)) + { + taskDetails = AutoMLVertical.DeserializeAutoMLVertical(property.Value, options); + continue; + } if (property.NameEquals("outputs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -347,63 +361,58 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element, ModelReaderW queueSettings = JobQueueSettings.DeserializeJobQueueSettings(property.Value, options); continue; } - if (property.NameEquals("resources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resources = MachineLearningJobResourceConfiguration.DeserializeMachineLearningJobResourceConfiguration(property.Value, options); - continue; - } - if (property.NameEquals("taskDetails"u8)) + if (property.NameEquals("jobType"u8)) { - taskDetails = AutoMLVertical.DeserializeAutoMLVertical(property.Value, options); + jobType = new JobType(property.Value.GetString()); continue; } - if (property.NameEquals("componentId"u8)) + if (property.NameEquals("displayName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - componentId = null; + displayName = null; continue; } - componentId = new ResourceIdentifier(property.Value.GetString()); + displayName = property.Value.GetString(); continue; } - if (property.NameEquals("computeId"u8)) + if (property.NameEquals("status"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - computeId = null; continue; } - computeId = new ResourceIdentifier(property.Value.GetString()); + status = new MachineLearningJobStatus(property.Value.GetString()); continue; } - if (property.NameEquals("displayName"u8)) + if (property.NameEquals("experimentName"u8)) + { + experimentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("services"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - displayName = null; + services = null; continue; } - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("experimentName"u8)) - { - experimentName = property.Value.GetString(); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value, options)); + } + services = dictionary; continue; } - if (property.NameEquals("identity"u8)) + if (property.NameEquals("computeId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - identity = null; + computeId = null; continue; } - identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value, options); + computeId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("isArchived"u8)) @@ -415,43 +424,34 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element, ModelReaderW isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("jobType"u8)) - { - jobType = new JobType(property.Value.GetString()); - continue; - } - if (property.NameEquals("notificationSetting"u8)) + if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - notificationSetting = null; + identity = null; continue; } - notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value, options); + identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value, options); continue; } - if (property.NameEquals("services"u8)) + if (property.NameEquals("componentId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - services = null; + componentId = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value, options)); - } - services = dictionary; + componentId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("notificationSetting"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + notificationSetting = null; continue; } - status = new MachineLearningJobStatus(property.Value.GetString()); + notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value, options); continue; } if (property.NameEquals("description"u8)) @@ -464,11 +464,11 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element, ModelReaderW description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -476,14 +476,14 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element, ModelReaderW { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -491,7 +491,7 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element, ModelReaderW { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -502,25 +502,25 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element, ModelReaderW serializedAdditionalRawData = rawDataDictionary; return new AutoMLJob( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - componentId, - computeId, + jobType, displayName, + status, experimentName, - identity, + services ?? new ChangeTrackingDictionary(), + computeId, isArchived, - jobType, + identity, + componentId, notificationSetting, - services ?? new ChangeTrackingDictionary(), - status, + resources, environmentId, environmentVariables ?? new ChangeTrackingDictionary(), + taskDetails, outputs ?? new ChangeTrackingDictionary(), - queueSettings, - resources, - taskDetails); + queueSettings); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.cs index eb048bcfbc038..8a549838bfbc5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.cs @@ -30,59 +30,59 @@ public AutoMLJob(AutoMLVertical taskDetails) Argument.AssertNotNull(taskDetails, nameof(taskDetails)); EnvironmentVariables = new ChangeTrackingDictionary(); - Outputs = new ChangeTrackingDictionary(); TaskDetails = taskDetails; + Outputs = new ChangeTrackingDictionary(); JobType = JobType.AutoML; } /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. + /// [Required] Specifies the type of job. /// Display name of job. + /// Status of the job. /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// ARM resource ID of the compute resource. + /// Is the asset archived?. /// /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. /// Defaults to AmlToken if null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// Is the asset archived?. - /// [Required] Specifies the type of job. + /// ARM resource ID of the component resource. /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. + /// Compute Resource configuration for the job. /// /// The ARM resource ID of the Environment specification for the job. /// This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated environment version when running the job. /// /// Environment variables included in the job. + /// + /// [Required] This represents scenario which can be one of Tables/NLP/Image + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , , , and . + /// /// /// Mapping of output data bindings used in the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , and . /// /// Queue settings for the job. - /// Compute Resource configuration for the job. - /// - /// [Required] This represents scenario which can be one of Tables/NLP/Image - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , and . - /// - internal AutoMLJob(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary services, MachineLearningJobStatus? status, string environmentId, IDictionary environmentVariables, IDictionary outputs, JobQueueSettings queueSettings, MachineLearningJobResourceConfiguration resources, AutoMLVertical taskDetails) : base(description, properties, tags, serializedAdditionalRawData, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, services, status) + internal AutoMLJob(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, JobType jobType, string displayName, MachineLearningJobStatus? status, string experimentName, IDictionary services, ResourceIdentifier computeId, bool? isArchived, MachineLearningIdentityConfiguration identity, ResourceIdentifier componentId, NotificationSetting notificationSetting, MachineLearningJobResourceConfiguration resources, string environmentId, IDictionary environmentVariables, AutoMLVertical taskDetails, IDictionary outputs, JobQueueSettings queueSettings) : base(description, tags, properties, serializedAdditionalRawData, jobType, displayName, status, experimentName, services, computeId, isArchived, identity, componentId, notificationSetting) { + Resources = resources; EnvironmentId = environmentId; EnvironmentVariables = environmentVariables; + TaskDetails = taskDetails; Outputs = outputs; QueueSettings = queueSettings; - Resources = resources; - TaskDetails = taskDetails; JobType = jobType; } @@ -91,6 +91,8 @@ internal AutoMLJob() { } + /// Compute Resource configuration for the job. + public MachineLearningJobResourceConfiguration Resources { get; set; } /// /// The ARM resource ID of the Environment specification for the job. /// This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated environment version when running the job. @@ -99,6 +101,12 @@ internal AutoMLJob() /// Environment variables included in the job. public IDictionary EnvironmentVariables { get; set; } /// + /// [Required] This represents scenario which can be one of Tables/NLP/Image + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , , , , and . + /// + public AutoMLVertical TaskDetails { get; set; } + /// /// Mapping of output data bindings used in the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , and . @@ -117,14 +125,5 @@ public JobTier? QueueJobTier QueueSettings.JobTier = value; } } - - /// Compute Resource configuration for the job. - public MachineLearningJobResourceConfiguration Resources { get; set; } - /// - /// [Required] This represents scenario which can be one of Tables/NLP/Image - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , and . - /// - public AutoMLVertical TaskDetails { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVertical.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVertical.Serialization.cs index 49ab9d58e4d59..db97b424f3909 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVertical.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVertical.Serialization.cs @@ -26,11 +26,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp } writer.WriteStartObject(); + writer.WritePropertyName("taskType"u8); + writer.WriteStringValue(TaskType.ToString()); if (Optional.IsDefined(LogVerbosity)) { writer.WritePropertyName("logVerbosity"u8); writer.WriteStringValue(LogVerbosity.Value.ToString()); } + writer.WritePropertyName("trainingData"u8); + writer.WriteObjectValue(TrainingData, options); if (Optional.IsDefined(TargetColumnName)) { if (TargetColumnName != null) @@ -43,10 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteNull("targetColumnName"); } } - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVertical.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVertical.cs index 929fb1428ab0e..1f2747eaffb29 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVertical.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVertical.cs @@ -61,20 +61,20 @@ protected AutoMLVertical(MachineLearningTableJobInput trainingData) } /// Initializes a new instance of . + /// [Required] Task type for AutoMLJob. /// Log verbosity for the job. + /// [Required] Training data input. /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. /// Keeps track of any properties unknown to the library. - internal AutoMLVertical(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, IDictionary serializedAdditionalRawData) + internal AutoMLVertical(TaskType taskType, MachineLearningLogVerbosity? logVerbosity, MachineLearningTableJobInput trainingData, string targetColumnName, IDictionary serializedAdditionalRawData) { - LogVerbosity = logVerbosity; - TargetColumnName = targetColumnName; TaskType = taskType; + LogVerbosity = logVerbosity; TrainingData = trainingData; + TargetColumnName = targetColumnName; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -83,16 +83,16 @@ internal AutoMLVertical() { } + /// [Required] Task type for AutoMLJob. + internal TaskType TaskType { get; set; } /// Log verbosity for the job. public MachineLearningLogVerbosity? LogVerbosity { get; set; } + /// [Required] Training data input. + public MachineLearningTableJobInput TrainingData { get; set; } /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. /// public string TargetColumnName { get; set; } - /// [Required] Task type for AutoMLJob. - internal TaskType TaskType { get; set; } - /// [Required] Training data input. - public MachineLearningTableJobInput TrainingData { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.Serialization.cs index 565c40c815909..d432e6c0b6474 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.Serialization.cs @@ -43,35 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteNull("trainingSettings"); } } - if (Optional.IsCollectionDefined(CvSplitColumnNames)) - { - if (CvSplitColumnNames != null) - { - writer.WritePropertyName("cvSplitColumnNames"u8); - writer.WriteStartArray(); - foreach (var item in CvSplitColumnNames) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("cvSplitColumnNames"); - } - } - if (Optional.IsDefined(FeaturizationSettings)) - { - if (FeaturizationSettings != null) - { - writer.WritePropertyName("featurizationSettings"u8); - writer.WriteObjectValue(FeaturizationSettings, options); - } - else - { - writer.WriteNull("featurizationSettings"); - } - } if (Optional.IsDefined(LimitSettings)) { if (LimitSettings != null) @@ -96,28 +67,33 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteNull("nCrossValidations"); } } - if (Optional.IsDefined(TestData)) + if (Optional.IsCollectionDefined(CvSplitColumnNames)) { - if (TestData != null) + if (CvSplitColumnNames != null) { - writer.WritePropertyName("testData"u8); - writer.WriteObjectValue(TestData, options); + writer.WritePropertyName("cvSplitColumnNames"u8); + writer.WriteStartArray(); + foreach (var item in CvSplitColumnNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } else { - writer.WriteNull("testData"); + writer.WriteNull("cvSplitColumnNames"); } } - if (Optional.IsDefined(TestDataSize)) + if (Optional.IsDefined(WeightColumnName)) { - if (TestDataSize != null) + if (WeightColumnName != null) { - writer.WritePropertyName("testDataSize"u8); - writer.WriteNumberValue(TestDataSize.Value); + writer.WritePropertyName("weightColumnName"u8); + writer.WriteStringValue(WeightColumnName); } else { - writer.WriteNull("testDataSize"); + writer.WriteNull("weightColumnName"); } } if (Optional.IsDefined(ValidationData)) @@ -132,6 +108,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteNull("validationData"); } } + if (Optional.IsDefined(TestData)) + { + if (TestData != null) + { + writer.WritePropertyName("testData"u8); + writer.WriteObjectValue(TestData, options); + } + else + { + writer.WriteNull("testData"); + } + } if (Optional.IsDefined(ValidationDataSize)) { if (ValidationDataSize != null) @@ -144,23 +132,39 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteNull("validationDataSize"); } } - if (Optional.IsDefined(WeightColumnName)) + if (Optional.IsDefined(TestDataSize)) { - if (WeightColumnName != null) + if (TestDataSize != null) { - writer.WritePropertyName("weightColumnName"u8); - writer.WriteStringValue(WeightColumnName); + writer.WritePropertyName("testDataSize"u8); + writer.WriteNumberValue(TestDataSize.Value); } else { - writer.WriteNull("weightColumnName"); + writer.WriteNull("testDataSize"); } } + if (Optional.IsDefined(FeaturizationSettings)) + { + if (FeaturizationSettings != null) + { + writer.WritePropertyName("featurizationSettings"u8); + writer.WriteObjectValue(FeaturizationSettings, options); + } + else + { + writer.WriteNull("featurizationSettings"); + } + } + writer.WritePropertyName("taskType"u8); + writer.WriteStringValue(TaskType.ToString()); if (Optional.IsDefined(LogVerbosity)) { writer.WritePropertyName("logVerbosity"u8); writer.WriteStringValue(LogVerbosity.Value.ToString()); } + writer.WritePropertyName("trainingData"u8); + writer.WriteObjectValue(TrainingData, options); if (Optional.IsDefined(TargetColumnName)) { if (TargetColumnName != null) @@ -173,10 +177,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteNull("targetColumnName"); } } - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -217,19 +217,19 @@ internal static AutoMLVerticalRegression DeserializeAutoMLVerticalRegression(Jso } AutoMLVerticalRegressionPrimaryMetric? primaryMetric = default; RegressionTrainingSettings trainingSettings = default; - IList cvSplitColumnNames = default; - TableVerticalFeaturizationSettings featurizationSettings = default; TableVerticalLimitSettings limitSettings = default; NCrossValidations nCrossValidations = default; - MachineLearningTableJobInput testData = default; - double? testDataSize = default; + IList cvSplitColumnNames = default; + string weightColumnName = default; MachineLearningTableJobInput validationData = default; + MachineLearningTableJobInput testData = default; double? validationDataSize = default; - string weightColumnName = default; - MachineLearningLogVerbosity? logVerbosity = default; - string targetColumnName = default; + double? testDataSize = default; + TableVerticalFeaturizationSettings featurizationSettings = default; TaskType taskType = default; + MachineLearningLogVerbosity? logVerbosity = default; MachineLearningTableJobInput trainingData = default; + string targetColumnName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -253,49 +253,59 @@ internal static AutoMLVerticalRegression DeserializeAutoMLVerticalRegression(Jso trainingSettings = RegressionTrainingSettings.DeserializeRegressionTrainingSettings(property.Value, options); continue; } - if (property.NameEquals("cvSplitColumnNames"u8)) + if (property.NameEquals("limitSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - cvSplitColumnNames = null; + limitSettings = null; continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + limitSettings = TableVerticalLimitSettings.DeserializeTableVerticalLimitSettings(property.Value, options); + continue; + } + if (property.NameEquals("nCrossValidations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) { - array.Add(item.GetString()); + nCrossValidations = null; + continue; } - cvSplitColumnNames = array; + nCrossValidations = NCrossValidations.DeserializeNCrossValidations(property.Value, options); continue; } - if (property.NameEquals("featurizationSettings"u8)) + if (property.NameEquals("cvSplitColumnNames"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - featurizationSettings = null; + cvSplitColumnNames = null; continue; } - featurizationSettings = TableVerticalFeaturizationSettings.DeserializeTableVerticalFeaturizationSettings(property.Value, options); + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + cvSplitColumnNames = array; continue; } - if (property.NameEquals("limitSettings"u8)) + if (property.NameEquals("weightColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - limitSettings = null; + weightColumnName = null; continue; } - limitSettings = TableVerticalLimitSettings.DeserializeTableVerticalLimitSettings(property.Value, options); + weightColumnName = property.Value.GetString(); continue; } - if (property.NameEquals("nCrossValidations"u8)) + if (property.NameEquals("validationData"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - nCrossValidations = null; + validationData = null; continue; } - nCrossValidations = NCrossValidations.DeserializeNCrossValidations(property.Value, options); + validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); continue; } if (property.NameEquals("testData"u8)) @@ -308,44 +318,39 @@ internal static AutoMLVerticalRegression DeserializeAutoMLVerticalRegression(Jso testData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); continue; } - if (property.NameEquals("testDataSize"u8)) + if (property.NameEquals("validationDataSize"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - testDataSize = null; + validationDataSize = null; continue; } - testDataSize = property.Value.GetDouble(); + validationDataSize = property.Value.GetDouble(); continue; } - if (property.NameEquals("validationData"u8)) + if (property.NameEquals("testDataSize"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - validationData = null; + testDataSize = null; continue; } - validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); + testDataSize = property.Value.GetDouble(); continue; } - if (property.NameEquals("validationDataSize"u8)) + if (property.NameEquals("featurizationSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - validationDataSize = null; + featurizationSettings = null; continue; } - validationDataSize = property.Value.GetDouble(); + featurizationSettings = TableVerticalFeaturizationSettings.DeserializeTableVerticalFeaturizationSettings(property.Value, options); continue; } - if (property.NameEquals("weightColumnName"u8)) + if (property.NameEquals("taskType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - weightColumnName = null; - continue; - } - weightColumnName = property.Value.GetString(); + taskType = new TaskType(property.Value.GetString()); continue; } if (property.NameEquals("logVerbosity"u8)) @@ -357,6 +362,11 @@ internal static AutoMLVerticalRegression DeserializeAutoMLVerticalRegression(Jso logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } + if (property.NameEquals("trainingData"u8)) + { + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); + continue; + } if (property.NameEquals("targetColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -367,16 +377,6 @@ internal static AutoMLVerticalRegression DeserializeAutoMLVerticalRegression(Jso targetColumnName = property.Value.GetString(); continue; } - if (property.NameEquals("taskType"u8)) - { - taskType = new TaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData"u8)) - { - trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -384,22 +384,22 @@ internal static AutoMLVerticalRegression DeserializeAutoMLVerticalRegression(Jso } serializedAdditionalRawData = rawDataDictionary; return new AutoMLVerticalRegression( - logVerbosity, - targetColumnName, taskType, + logVerbosity, trainingData, + targetColumnName, serializedAdditionalRawData, primaryMetric, trainingSettings, - cvSplitColumnNames ?? new ChangeTrackingList(), - featurizationSettings, limitSettings, nCrossValidations, - testData, - testDataSize, + cvSplitColumnNames ?? new ChangeTrackingList(), + weightColumnName, validationData, + testData, validationDataSize, - weightColumnName); + testDataSize, + featurizationSettings); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.cs index 0dbc63809cd91..d9f035029b961 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.cs @@ -25,18 +25,16 @@ public AutoMLVerticalRegression(MachineLearningTableJobInput trainingData) : bas } /// Initializes a new instance of . + /// [Required] Task type for AutoMLJob. /// Log verbosity for the job. + /// [Required] Training data input. /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. /// Keeps track of any properties unknown to the library. /// Primary metric for regression task. /// Inputs for training phase for an AutoML Job. - /// Columns to use for CVSplit data. - /// Featurization inputs needed for AutoML job. /// Execution constraints for AutoMLJob. /// /// Number of cross validation folds to be applied on training dataset @@ -44,32 +42,34 @@ public AutoMLVerticalRegression(MachineLearningTableJobInput trainingData) : bas /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// + /// Columns to use for CVSplit data. + /// The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. + /// Validation data inputs. /// Test data input. - /// - /// The fraction of test dataset that needs to be set aside for validation purpose. + /// + /// The fraction of training dataset that needs to be set aside for validation purpose. /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - /// Validation data inputs. - /// - /// The fraction of training dataset that needs to be set aside for validation purpose. + /// + /// The fraction of test dataset that needs to be set aside for validation purpose. /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - /// The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. - internal AutoMLVerticalRegression(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, IDictionary serializedAdditionalRawData, AutoMLVerticalRegressionPrimaryMetric? primaryMetric, RegressionTrainingSettings trainingSettings, IList cvSplitColumnNames, TableVerticalFeaturizationSettings featurizationSettings, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, MachineLearningTableJobInput testData, double? testDataSize, MachineLearningTableJobInput validationData, double? validationDataSize, string weightColumnName) : base(logVerbosity, targetColumnName, taskType, trainingData, serializedAdditionalRawData) + /// Featurization inputs needed for AutoML job. + internal AutoMLVerticalRegression(TaskType taskType, MachineLearningLogVerbosity? logVerbosity, MachineLearningTableJobInput trainingData, string targetColumnName, IDictionary serializedAdditionalRawData, AutoMLVerticalRegressionPrimaryMetric? primaryMetric, RegressionTrainingSettings trainingSettings, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, IList cvSplitColumnNames, string weightColumnName, MachineLearningTableJobInput validationData, MachineLearningTableJobInput testData, double? validationDataSize, double? testDataSize, TableVerticalFeaturizationSettings featurizationSettings) : base(taskType, logVerbosity, trainingData, targetColumnName, serializedAdditionalRawData) { PrimaryMetric = primaryMetric; TrainingSettings = trainingSettings; - CvSplitColumnNames = cvSplitColumnNames; - FeaturizationSettings = featurizationSettings; LimitSettings = limitSettings; NCrossValidations = nCrossValidations; - TestData = testData; - TestDataSize = testDataSize; + CvSplitColumnNames = cvSplitColumnNames; + WeightColumnName = weightColumnName; ValidationData = validationData; + TestData = testData; ValidationDataSize = validationDataSize; - WeightColumnName = weightColumnName; + TestDataSize = testDataSize; + FeaturizationSettings = featurizationSettings; TaskType = taskType; } @@ -82,10 +82,6 @@ internal AutoMLVerticalRegression() public AutoMLVerticalRegressionPrimaryMetric? PrimaryMetric { get; set; } /// Inputs for training phase for an AutoML Job. public RegressionTrainingSettings TrainingSettings { get; set; } - /// Columns to use for CVSplit data. - public IList CvSplitColumnNames { get; set; } - /// Featurization inputs needed for AutoML job. - public TableVerticalFeaturizationSettings FeaturizationSettings { get; set; } /// Execution constraints for AutoMLJob. public TableVerticalLimitSettings LimitSettings { get; set; } /// @@ -95,23 +91,27 @@ internal AutoMLVerticalRegression() /// The available derived classes include and . /// public NCrossValidations NCrossValidations { get; set; } + /// Columns to use for CVSplit data. + public IList CvSplitColumnNames { get; set; } + /// The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. + public string WeightColumnName { get; set; } + /// Validation data inputs. + public MachineLearningTableJobInput ValidationData { get; set; } /// Test data input. public MachineLearningTableJobInput TestData { get; set; } /// - /// The fraction of test dataset that needs to be set aside for validation purpose. + /// The fraction of training dataset that needs to be set aside for validation purpose. /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - public double? TestDataSize { get; set; } - /// Validation data inputs. - public MachineLearningTableJobInput ValidationData { get; set; } + public double? ValidationDataSize { get; set; } /// - /// The fraction of training dataset that needs to be set aside for validation purpose. + /// The fraction of test dataset that needs to be set aside for validation purpose. /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - public double? ValidationDataSize { get; set; } - /// The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. - public string WeightColumnName { get; set; } + public double? TestDataSize { get; set; } + /// Featurization inputs needed for AutoML job. + public TableVerticalFeaturizationSettings FeaturizationSettings { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.Serialization.cs index c9b938e9ae8d6..7506df2e4b99c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteStartObject(); + writer.WritePropertyName("webhookType"u8); + writer.WriteStringValue(WebhookType.ToString()); if (Optional.IsDefined(EventType)) { if (EventType != null) @@ -38,8 +40,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("eventType"); } } - writer.WritePropertyName("webhookType"u8); - writer.WriteStringValue(WebhookType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,12 +78,17 @@ internal static AzureDevOpsWebhook DeserializeAzureDevOpsWebhook(JsonElement ele { return null; } - string eventType = default; MachineLearningWebhookType webhookType = default; + string eventType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("webhookType"u8)) + { + webhookType = new MachineLearningWebhookType(property.Value.GetString()); + continue; + } if (property.NameEquals("eventType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -94,18 +99,13 @@ internal static AzureDevOpsWebhook DeserializeAzureDevOpsWebhook(JsonElement ele eventType = property.Value.GetString(); continue; } - if (property.NameEquals("webhookType"u8)) - { - webhookType = new MachineLearningWebhookType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new AzureDevOpsWebhook(eventType, webhookType, serializedAdditionalRawData); + return new AzureDevOpsWebhook(webhookType, eventType, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.cs index d5c1625732d1d..fd27bdcda2b2b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDevOpsWebhook.cs @@ -20,10 +20,10 @@ public AzureDevOpsWebhook() } /// Initializes a new instance of . - /// Send callback on a specified notification event. /// [Required] Specifies the type of service to send a callback. + /// Send callback on a specified notification event. /// Keeps track of any properties unknown to the library. - internal AzureDevOpsWebhook(string eventType, MachineLearningWebhookType webhookType, IDictionary serializedAdditionalRawData) : base(eventType, webhookType, serializedAdditionalRawData) + internal AzureDevOpsWebhook(MachineLearningWebhookType webhookType, string eventType, IDictionary serializedAdditionalRawData) : base(webhookType, eventType, serializedAdditionalRawData) { WebhookType = webhookType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureOpenAiFineTuning.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureOpenAiFineTuning.Serialization.cs deleted file mode 100644 index bba503c1bbb18..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureOpenAiFineTuning.Serialization.cs +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AzureOpenAiFineTuning : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AzureOpenAiFineTuning)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(HyperParameters)) - { - if (HyperParameters != null) - { - writer.WritePropertyName("hyperParameters"u8); - writer.WriteObjectValue(HyperParameters, options); - } - else - { - writer.WriteNull("hyperParameters"); - } - } - writer.WritePropertyName("modelProvider"u8); - writer.WriteStringValue(ModelProvider.ToString()); - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); - if (Optional.IsDefined(ValidationData)) - { - if (ValidationData != null) - { - writer.WritePropertyName("validationData"u8); - writer.WriteObjectValue(ValidationData, options); - } - else - { - writer.WriteNull("validationData"); - } - } - writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, 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 - } - } - writer.WriteEndObject(); - } - - AzureOpenAiFineTuning 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(AzureOpenAiFineTuning)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAzureOpenAiFineTuning(document.RootElement, options); - } - - internal static AzureOpenAiFineTuning DeserializeAzureOpenAiFineTuning(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AzureOpenAiHyperParameters hyperParameters = default; - ModelProvider modelProvider = default; - FineTuningTaskType taskType = default; - MachineLearningJobInput trainingData = default; - MachineLearningJobInput validationData = default; - MachineLearningFlowModelJobInput model = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("hyperParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - hyperParameters = null; - continue; - } - hyperParameters = AzureOpenAiHyperParameters.DeserializeAzureOpenAiHyperParameters(property.Value, options); - continue; - } - if (property.NameEquals("modelProvider"u8)) - { - modelProvider = new ModelProvider(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskType"u8)) - { - taskType = new FineTuningTaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData"u8)) - { - trainingData = MachineLearningJobInput.DeserializeMachineLearningJobInput(property.Value, options); - continue; - } - if (property.NameEquals("validationData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - validationData = null; - continue; - } - validationData = MachineLearningJobInput.DeserializeMachineLearningJobInput(property.Value, options); - continue; - } - if (property.NameEquals("model"u8)) - { - model = MachineLearningFlowModelJobInput.DeserializeMachineLearningFlowModelJobInput(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AzureOpenAiFineTuning( - modelProvider, - taskType, - trainingData, - validationData, - model, - serializedAdditionalRawData, - hyperParameters); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(AzureOpenAiFineTuning)} does not support writing '{options.Format}' format."); - } - } - - AzureOpenAiFineTuning 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 DeserializeAzureOpenAiFineTuning(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AzureOpenAiFineTuning)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureOpenAiFineTuning.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureOpenAiFineTuning.cs deleted file mode 100644 index 010bba8b688ab..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureOpenAiFineTuning.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The AzureOpenAiFineTuning. - public partial class AzureOpenAiFineTuning : FineTuningVertical - { - /// Initializes a new instance of . - /// [Required] Fine tuning task type. - /// - /// [Required] Training data for fine tuning. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// [Required] Input model for fine tuning. - /// or is null. - public AzureOpenAiFineTuning(FineTuningTaskType taskType, MachineLearningJobInput trainingData, MachineLearningFlowModelJobInput model) : base(taskType, trainingData, model) - { - Argument.AssertNotNull(trainingData, nameof(trainingData)); - Argument.AssertNotNull(model, nameof(model)); - - ModelProvider = ModelProvider.AzureOpenAI; - } - - /// Initializes a new instance of . - /// [Required] Enum to determine the type of fine tuning. - /// [Required] Fine tuning task type. - /// - /// [Required] Training data for fine tuning. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// - /// Validation data for fine tuning. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// [Required] Input model for fine tuning. - /// Keeps track of any properties unknown to the library. - /// HyperParameters for fine tuning Azure Open AI model. - internal AzureOpenAiFineTuning(ModelProvider modelProvider, FineTuningTaskType taskType, MachineLearningJobInput trainingData, MachineLearningJobInput validationData, MachineLearningFlowModelJobInput model, IDictionary serializedAdditionalRawData, AzureOpenAiHyperParameters hyperParameters) : base(modelProvider, taskType, trainingData, validationData, model, serializedAdditionalRawData) - { - HyperParameters = hyperParameters; - ModelProvider = modelProvider; - } - - /// Initializes a new instance of for deserialization. - internal AzureOpenAiFineTuning() - { - } - - /// HyperParameters for fine tuning Azure Open AI model. - public AzureOpenAiHyperParameters HyperParameters { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureOpenAiHyperParameters.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureOpenAiHyperParameters.Serialization.cs deleted file mode 100644 index 17269dbe9ec47..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureOpenAiHyperParameters.Serialization.cs +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AzureOpenAiHyperParameters : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AzureOpenAiHyperParameters)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(LearningRateMultiplier)) - { - if (LearningRateMultiplier != null) - { - writer.WritePropertyName("learningRateMultiplier"u8); - writer.WriteNumberValue(LearningRateMultiplier.Value); - } - else - { - writer.WriteNull("learningRateMultiplier"); - } - } - if (Optional.IsDefined(BatchSize)) - { - if (BatchSize != null) - { - writer.WritePropertyName("batchSize"u8); - writer.WriteNumberValue(BatchSize.Value); - } - else - { - writer.WriteNull("batchSize"); - } - } - if (Optional.IsDefined(NEpochs)) - { - if (NEpochs != null) - { - writer.WritePropertyName("nEpochs"u8); - writer.WriteNumberValue(NEpochs.Value); - } - else - { - writer.WriteNull("nEpochs"); - } - } - 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 - } - } - writer.WriteEndObject(); - } - - AzureOpenAiHyperParameters 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(AzureOpenAiHyperParameters)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAzureOpenAiHyperParameters(document.RootElement, options); - } - - internal static AzureOpenAiHyperParameters DeserializeAzureOpenAiHyperParameters(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - double? learningRateMultiplier = default; - int? batchSize = default; - int? nEpochs = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("learningRateMultiplier"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - learningRateMultiplier = null; - continue; - } - learningRateMultiplier = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("batchSize"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - batchSize = null; - continue; - } - batchSize = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("nEpochs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - nEpochs = null; - continue; - } - nEpochs = property.Value.GetInt32(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AzureOpenAiHyperParameters(learningRateMultiplier, batchSize, nEpochs, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(AzureOpenAiHyperParameters)} does not support writing '{options.Format}' format."); - } - } - - AzureOpenAiHyperParameters 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 DeserializeAzureOpenAiHyperParameters(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AzureOpenAiHyperParameters)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureOpenAiHyperParameters.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureOpenAiHyperParameters.cs deleted file mode 100644 index e86aa76fc6be7..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureOpenAiHyperParameters.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Azure Open AI hyperparameters for fine tuning. - public partial class AzureOpenAiHyperParameters - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public AzureOpenAiHyperParameters() - { - } - - /// Initializes a new instance of . - /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid over fitting. - /// Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance. - /// The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. - /// Keeps track of any properties unknown to the library. - internal AzureOpenAiHyperParameters(double? learningRateMultiplier, int? batchSize, int? nEpochs, IDictionary serializedAdditionalRawData) - { - LearningRateMultiplier = learningRateMultiplier; - BatchSize = batchSize; - NEpochs = nEpochs; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Scaling factor for the learning rate. A smaller learning rate may be useful to avoid over fitting. - public double? LearningRateMultiplier { get; set; } - /// Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance. - public int? BatchSize { get; set; } - /// The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. - public int? NEpochs { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BanditPolicy.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BanditPolicy.Serialization.cs index d4cbcd277992d..d68f7bf0cbf89 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BanditPolicy.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BanditPolicy.Serialization.cs @@ -26,28 +26,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti } writer.WriteStartObject(); - if (Optional.IsDefined(SlackAmount)) - { - writer.WritePropertyName("slackAmount"u8); - writer.WriteNumberValue(SlackAmount.Value); - } if (Optional.IsDefined(SlackFactor)) { writer.WritePropertyName("slackFactor"u8); writer.WriteNumberValue(SlackFactor.Value); } - if (Optional.IsDefined(DelayEvaluation)) + if (Optional.IsDefined(SlackAmount)) { - writer.WritePropertyName("delayEvaluation"u8); - writer.WriteNumberValue(DelayEvaluation.Value); + writer.WritePropertyName("slackAmount"u8); + writer.WriteNumberValue(SlackAmount.Value); } + writer.WritePropertyName("policyType"u8); + writer.WriteStringValue(PolicyType.ToString()); if (Optional.IsDefined(EvaluationInterval)) { writer.WritePropertyName("evaluationInterval"u8); writer.WriteNumberValue(EvaluationInterval.Value); } - writer.WritePropertyName("policyType"u8); - writer.WriteStringValue(PolicyType.ToString()); + if (Optional.IsDefined(DelayEvaluation)) + { + writer.WritePropertyName("delayEvaluation"u8); + writer.WriteNumberValue(DelayEvaluation.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -86,40 +86,36 @@ internal static BanditPolicy DeserializeBanditPolicy(JsonElement element, ModelR { return null; } - float? slackAmount = default; float? slackFactor = default; - int? delayEvaluation = default; - int? evaluationInterval = default; + float? slackAmount = default; EarlyTerminationPolicyType policyType = default; + int? evaluationInterval = default; + int? delayEvaluation = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("slackAmount"u8)) + if (property.NameEquals("slackFactor"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - slackAmount = property.Value.GetSingle(); + slackFactor = property.Value.GetSingle(); continue; } - if (property.NameEquals("slackFactor"u8)) + if (property.NameEquals("slackAmount"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - slackFactor = property.Value.GetSingle(); + slackAmount = property.Value.GetSingle(); continue; } - if (property.NameEquals("delayEvaluation"u8)) + if (property.NameEquals("policyType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - delayEvaluation = property.Value.GetInt32(); + policyType = new EarlyTerminationPolicyType(property.Value.GetString()); continue; } if (property.NameEquals("evaluationInterval"u8)) @@ -131,9 +127,13 @@ internal static BanditPolicy DeserializeBanditPolicy(JsonElement element, ModelR evaluationInterval = property.Value.GetInt32(); continue; } - if (property.NameEquals("policyType"u8)) + if (property.NameEquals("delayEvaluation"u8)) { - policyType = new EarlyTerminationPolicyType(property.Value.GetString()); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delayEvaluation = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -143,12 +143,12 @@ internal static BanditPolicy DeserializeBanditPolicy(JsonElement element, ModelR } serializedAdditionalRawData = rawDataDictionary; return new BanditPolicy( - delayEvaluation, - evaluationInterval, policyType, + evaluationInterval, + delayEvaluation, serializedAdditionalRawData, - slackAmount, - slackFactor); + slackFactor, + slackAmount); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BanditPolicy.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BanditPolicy.cs index 1c7504a4e06b7..8408ac8179ec2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BanditPolicy.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BanditPolicy.cs @@ -20,22 +20,22 @@ public BanditPolicy() } /// Initializes a new instance of . - /// Number of intervals by which to delay the first evaluation. - /// Interval (number of runs) between policy evaluations. /// [Required] Name of policy configuration. + /// Interval (number of runs) between policy evaluations. + /// Number of intervals by which to delay the first evaluation. /// Keeps track of any properties unknown to the library. - /// Absolute distance allowed from the best performing run. /// Ratio of the allowed distance from the best performing run. - internal BanditPolicy(int? delayEvaluation, int? evaluationInterval, EarlyTerminationPolicyType policyType, IDictionary serializedAdditionalRawData, float? slackAmount, float? slackFactor) : base(delayEvaluation, evaluationInterval, policyType, serializedAdditionalRawData) + /// Absolute distance allowed from the best performing run. + internal BanditPolicy(EarlyTerminationPolicyType policyType, int? evaluationInterval, int? delayEvaluation, IDictionary serializedAdditionalRawData, float? slackFactor, float? slackAmount) : base(policyType, evaluationInterval, delayEvaluation, serializedAdditionalRawData) { - SlackAmount = slackAmount; SlackFactor = slackFactor; + SlackAmount = slackAmount; PolicyType = policyType; } - /// Absolute distance allowed from the best performing run. - public float? SlackAmount { get; set; } /// Ratio of the allowed distance from the best performing run. public float? SlackFactor { get; set; } + /// Absolute distance allowed from the best performing run. + public float? SlackAmount { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentTrackedResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentTrackedResourceArmPaginatedResult.Serialization.cs index c4698f498f76f..3ae56166bd2c2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentTrackedResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentTrackedResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8Json } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8Json } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static BatchDeploymentTrackedResourceArmPaginatedResult DeserializeBatc { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static BatchDeploymentTrackedResourceArmPaginatedResult DeserializeBatc 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 BatchDeploymentTrackedResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new BatchDeploymentTrackedResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentTrackedResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentTrackedResourceArmPaginatedResult.cs index eaf789dac8671..51c7640179e51 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentTrackedResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentTrackedResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal BatchDeploymentTrackedResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of BatchDeployment objects. If null, there are no additional pages. /// An array of objects of type BatchDeployment. + /// The link to the next page of BatchDeployment objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal BatchDeploymentTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal BatchDeploymentTrackedResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of BatchDeployment objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type BatchDeployment. public IReadOnlyList Value { get; } + /// The link to the next page of BatchDeployment objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointTrackedResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointTrackedResourceArmPaginatedResult.Serialization.cs index cade503eb0adf..fde7a507c31ed 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointTrackedResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointTrackedResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static BatchEndpointTrackedResourceArmPaginatedResult DeserializeBatchE { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static BatchEndpointTrackedResourceArmPaginatedResult DeserializeBatchE 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 BatchEndpointTrackedResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new BatchEndpointTrackedResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointTrackedResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointTrackedResourceArmPaginatedResult.cs index f235f04c5f1cd..e4cd09b69406b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointTrackedResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointTrackedResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal BatchEndpointTrackedResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of BatchEndpoint objects. If null, there are no additional pages. /// An array of objects of type BatchEndpoint. + /// The link to the next page of BatchEndpoint objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal BatchEndpointTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal BatchEndpointTrackedResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of BatchEndpoint objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type BatchEndpoint. public IReadOnlyList Value { get; } + /// The link to the next page of BatchEndpoint objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.Serialization.cs index b69c42621c098..8d5a3a1e2aaa1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.Serialization.cs @@ -38,28 +38,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteNull("blobUri"); } } - if (Optional.IsDefined(Credential)) + if (Optional.IsDefined(StorageAccountArmId)) { - if (Credential != null) + if (StorageAccountArmId != null) { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential, options); + writer.WritePropertyName("storageAccountArmId"u8); + writer.WriteStringValue(StorageAccountArmId); } else { - writer.WriteNull("credential"); + writer.WriteNull("storageAccountArmId"); } } - if (Optional.IsDefined(StorageAccountArmId)) + if (Optional.IsDefined(Credential)) { - if (StorageAccountArmId != null) + if (Credential != null) { - writer.WritePropertyName("storageAccountArmId"u8); - writer.WriteStringValue(StorageAccountArmId); + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential, options); } else { - writer.WriteNull("storageAccountArmId"); + writer.WriteNull("credential"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -101,8 +101,8 @@ internal static BlobReferenceForConsumptionDto DeserializeBlobReferenceForConsum return null; } Uri blobUri = default; - PendingUploadCredentialDto credential = default; ResourceIdentifier storageAccountArmId = default; + PendingUploadCredentialDto credential = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -117,24 +117,24 @@ internal static BlobReferenceForConsumptionDto DeserializeBlobReferenceForConsum blobUri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("credential"u8)) + if (property.NameEquals("storageAccountArmId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - credential = null; + storageAccountArmId = null; continue; } - credential = PendingUploadCredentialDto.DeserializePendingUploadCredentialDto(property.Value, options); + storageAccountArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("storageAccountArmId"u8)) + if (property.NameEquals("credential"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - storageAccountArmId = null; + credential = null; continue; } - storageAccountArmId = new ResourceIdentifier(property.Value.GetString()); + credential = PendingUploadCredentialDto.DeserializePendingUploadCredentialDto(property.Value, options); continue; } if (options.Format != "W") @@ -143,7 +143,7 @@ internal static BlobReferenceForConsumptionDto DeserializeBlobReferenceForConsum } } serializedAdditionalRawData = rawDataDictionary; - return new BlobReferenceForConsumptionDto(blobUri, credential, storageAccountArmId, serializedAdditionalRawData); + return new BlobReferenceForConsumptionDto(blobUri, storageAccountArmId, credential, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.cs index 37d39926005db..625e4d6f83020 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlobReferenceForConsumptionDto.cs @@ -56,18 +56,18 @@ internal BlobReferenceForConsumptionDto() /// Blob URI path for client to upload data. /// Example: https://blob.windows.core.net/Container/Path /// + /// Arm ID of the storage account to use. /// /// Credential info to access storage account /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include . /// - /// Arm ID of the storage account to use. /// Keeps track of any properties unknown to the library. - internal BlobReferenceForConsumptionDto(Uri blobUri, PendingUploadCredentialDto credential, ResourceIdentifier storageAccountArmId, IDictionary serializedAdditionalRawData) + internal BlobReferenceForConsumptionDto(Uri blobUri, ResourceIdentifier storageAccountArmId, PendingUploadCredentialDto credential, IDictionary serializedAdditionalRawData) { BlobUri = blobUri; - Credential = credential; StorageAccountArmId = storageAccountArmId; + Credential = credential; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -76,13 +76,13 @@ internal BlobReferenceForConsumptionDto(Uri blobUri, PendingUploadCredentialDto /// Example: https://blob.windows.core.net/Container/Path /// public Uri BlobUri { get; } + /// Arm ID of the storage account to use. + public ResourceIdentifier StorageAccountArmId { get; } /// /// Credential info to access storage account /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include . /// public PendingUploadCredentialDto Credential { get; } - /// Arm ID of the storage account to use. - public ResourceIdentifier StorageAccountArmId { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.Serialization.cs index 0acf1eda328a3..9a784dc0db2df 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.Serialization.cs @@ -26,18 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteStartObject(); - if (Optional.IsDefined(PositiveLabel)) - { - if (PositiveLabel != null) - { - writer.WritePropertyName("positiveLabel"u8); - writer.WriteStringValue(PositiveLabel); - } - else - { - writer.WriteNull("positiveLabel"); - } - } if (Optional.IsDefined(PrimaryMetric)) { writer.WritePropertyName("primaryMetric"u8); @@ -55,33 +43,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("trainingSettings"); } } - if (Optional.IsCollectionDefined(CvSplitColumnNames)) - { - if (CvSplitColumnNames != null) - { - writer.WritePropertyName("cvSplitColumnNames"u8); - writer.WriteStartArray(); - foreach (var item in CvSplitColumnNames) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("cvSplitColumnNames"); - } - } - if (Optional.IsDefined(FeaturizationSettings)) + if (Optional.IsDefined(PositiveLabel)) { - if (FeaturizationSettings != null) + if (PositiveLabel != null) { - writer.WritePropertyName("featurizationSettings"u8); - writer.WriteObjectValue(FeaturizationSettings, options); + writer.WritePropertyName("positiveLabel"u8); + writer.WriteStringValue(PositiveLabel); } else { - writer.WriteNull("featurizationSettings"); + writer.WriteNull("positiveLabel"); } } if (Optional.IsDefined(LimitSettings)) @@ -108,28 +79,33 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("nCrossValidations"); } } - if (Optional.IsDefined(TestData)) + if (Optional.IsCollectionDefined(CvSplitColumnNames)) { - if (TestData != null) + if (CvSplitColumnNames != null) { - writer.WritePropertyName("testData"u8); - writer.WriteObjectValue(TestData, options); + writer.WritePropertyName("cvSplitColumnNames"u8); + writer.WriteStartArray(); + foreach (var item in CvSplitColumnNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } else { - writer.WriteNull("testData"); + writer.WriteNull("cvSplitColumnNames"); } } - if (Optional.IsDefined(TestDataSize)) + if (Optional.IsDefined(WeightColumnName)) { - if (TestDataSize != null) + if (WeightColumnName != null) { - writer.WritePropertyName("testDataSize"u8); - writer.WriteNumberValue(TestDataSize.Value); + writer.WritePropertyName("weightColumnName"u8); + writer.WriteStringValue(WeightColumnName); } else { - writer.WriteNull("testDataSize"); + writer.WriteNull("weightColumnName"); } } if (Optional.IsDefined(ValidationData)) @@ -144,6 +120,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("validationData"); } } + if (Optional.IsDefined(TestData)) + { + if (TestData != null) + { + writer.WritePropertyName("testData"u8); + writer.WriteObjectValue(TestData, options); + } + else + { + writer.WriteNull("testData"); + } + } if (Optional.IsDefined(ValidationDataSize)) { if (ValidationDataSize != null) @@ -156,23 +144,39 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("validationDataSize"); } } - if (Optional.IsDefined(WeightColumnName)) + if (Optional.IsDefined(TestDataSize)) { - if (WeightColumnName != null) + if (TestDataSize != null) { - writer.WritePropertyName("weightColumnName"u8); - writer.WriteStringValue(WeightColumnName); + writer.WritePropertyName("testDataSize"u8); + writer.WriteNumberValue(TestDataSize.Value); } else { - writer.WriteNull("weightColumnName"); + writer.WriteNull("testDataSize"); + } + } + if (Optional.IsDefined(FeaturizationSettings)) + { + if (FeaturizationSettings != null) + { + writer.WritePropertyName("featurizationSettings"u8); + writer.WriteObjectValue(FeaturizationSettings, options); + } + else + { + writer.WriteNull("featurizationSettings"); } } + writer.WritePropertyName("taskType"u8); + writer.WriteStringValue(TaskType.ToString()); if (Optional.IsDefined(LogVerbosity)) { writer.WritePropertyName("logVerbosity"u8); writer.WriteStringValue(LogVerbosity.Value.ToString()); } + writer.WritePropertyName("trainingData"u8); + writer.WriteObjectValue(TrainingData, options); if (Optional.IsDefined(TargetColumnName)) { if (TargetColumnName != null) @@ -185,10 +189,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("targetColumnName"); } } - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -227,36 +227,26 @@ internal static ClassificationTask DeserializeClassificationTask(JsonElement ele { return null; } - string positiveLabel = default; ClassificationPrimaryMetric? primaryMetric = default; ClassificationTrainingSettings trainingSettings = default; - IList cvSplitColumnNames = default; - TableVerticalFeaturizationSettings featurizationSettings = default; + string positiveLabel = default; TableVerticalLimitSettings limitSettings = default; NCrossValidations nCrossValidations = default; - MachineLearningTableJobInput testData = default; - double? testDataSize = default; + IList cvSplitColumnNames = default; + string weightColumnName = default; MachineLearningTableJobInput validationData = default; + MachineLearningTableJobInput testData = default; double? validationDataSize = default; - string weightColumnName = default; - MachineLearningLogVerbosity? logVerbosity = default; - string targetColumnName = default; + double? testDataSize = default; + TableVerticalFeaturizationSettings featurizationSettings = default; TaskType taskType = default; + MachineLearningLogVerbosity? logVerbosity = default; MachineLearningTableJobInput trainingData = default; + string targetColumnName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("positiveLabel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - positiveLabel = null; - continue; - } - positiveLabel = property.Value.GetString(); - continue; - } if (property.NameEquals("primaryMetric"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -276,29 +266,14 @@ internal static ClassificationTask DeserializeClassificationTask(JsonElement ele trainingSettings = ClassificationTrainingSettings.DeserializeClassificationTrainingSettings(property.Value, options); continue; } - if (property.NameEquals("cvSplitColumnNames"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - cvSplitColumnNames = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - cvSplitColumnNames = array; - continue; - } - if (property.NameEquals("featurizationSettings"u8)) + if (property.NameEquals("positiveLabel"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - featurizationSettings = null; + positiveLabel = null; continue; } - featurizationSettings = TableVerticalFeaturizationSettings.DeserializeTableVerticalFeaturizationSettings(property.Value, options); + positiveLabel = property.Value.GetString(); continue; } if (property.NameEquals("limitSettings"u8)) @@ -321,24 +296,29 @@ internal static ClassificationTask DeserializeClassificationTask(JsonElement ele nCrossValidations = NCrossValidations.DeserializeNCrossValidations(property.Value, options); continue; } - if (property.NameEquals("testData"u8)) + if (property.NameEquals("cvSplitColumnNames"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - testData = null; + cvSplitColumnNames = null; continue; } - testData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + cvSplitColumnNames = array; continue; } - if (property.NameEquals("testDataSize"u8)) + if (property.NameEquals("weightColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - testDataSize = null; + weightColumnName = null; continue; } - testDataSize = property.Value.GetDouble(); + weightColumnName = property.Value.GetString(); continue; } if (property.NameEquals("validationData"u8)) @@ -351,43 +331,44 @@ internal static ClassificationTask DeserializeClassificationTask(JsonElement ele validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); continue; } - if (property.NameEquals("validationDataSize"u8)) + if (property.NameEquals("testData"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - validationDataSize = null; + testData = null; continue; } - validationDataSize = property.Value.GetDouble(); + testData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); continue; } - if (property.NameEquals("weightColumnName"u8)) + if (property.NameEquals("validationDataSize"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - weightColumnName = null; + validationDataSize = null; continue; } - weightColumnName = property.Value.GetString(); + validationDataSize = property.Value.GetDouble(); continue; } - if (property.NameEquals("logVerbosity"u8)) + if (property.NameEquals("testDataSize"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + testDataSize = null; continue; } - logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); + testDataSize = property.Value.GetDouble(); continue; } - if (property.NameEquals("targetColumnName"u8)) + if (property.NameEquals("featurizationSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - targetColumnName = null; + featurizationSettings = null; continue; } - targetColumnName = property.Value.GetString(); + featurizationSettings = TableVerticalFeaturizationSettings.DeserializeTableVerticalFeaturizationSettings(property.Value, options); continue; } if (property.NameEquals("taskType"u8)) @@ -395,11 +376,30 @@ internal static ClassificationTask DeserializeClassificationTask(JsonElement ele taskType = new TaskType(property.Value.GetString()); continue; } + if (property.NameEquals("logVerbosity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); + continue; + } if (property.NameEquals("trainingData"u8)) { trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); continue; } + if (property.NameEquals("targetColumnName"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + targetColumnName = null; + continue; + } + targetColumnName = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -407,23 +407,23 @@ internal static ClassificationTask DeserializeClassificationTask(JsonElement ele } serializedAdditionalRawData = rawDataDictionary; return new ClassificationTask( - logVerbosity, - targetColumnName, taskType, + logVerbosity, trainingData, + targetColumnName, serializedAdditionalRawData, - positiveLabel, primaryMetric, trainingSettings, - cvSplitColumnNames ?? new ChangeTrackingList(), - featurizationSettings, + positiveLabel, limitSettings, nCrossValidations, - testData, - testDataSize, + cvSplitColumnNames ?? new ChangeTrackingList(), + weightColumnName, validationData, + testData, validationDataSize, - weightColumnName); + testDataSize, + featurizationSettings); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.cs index 73f6d2ce3538e..38ff46e4b69d9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.cs @@ -25,19 +25,17 @@ public ClassificationTask(MachineLearningTableJobInput trainingData) : base(trai } /// Initializes a new instance of . + /// [Required] Task type for AutoMLJob. /// Log verbosity for the job. + /// [Required] Training data input. /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. /// Keeps track of any properties unknown to the library. - /// Positive label for binary metrics calculation. /// Primary metric for the task. /// Inputs for training phase for an AutoML Job. - /// Columns to use for CVSplit data. - /// Featurization inputs needed for AutoML job. + /// Positive label for binary metrics calculation. /// Execution constraints for AutoMLJob. /// /// Number of cross validation folds to be applied on training dataset @@ -45,33 +43,35 @@ public ClassificationTask(MachineLearningTableJobInput trainingData) : base(trai /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// + /// Columns to use for CVSplit data. + /// The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. + /// Validation data inputs. /// Test data input. - /// - /// The fraction of test dataset that needs to be set aside for validation purpose. + /// + /// The fraction of training dataset that needs to be set aside for validation purpose. /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - /// Validation data inputs. - /// - /// The fraction of training dataset that needs to be set aside for validation purpose. + /// + /// The fraction of test dataset that needs to be set aside for validation purpose. /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - /// The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. - internal ClassificationTask(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, IDictionary serializedAdditionalRawData, string positiveLabel, ClassificationPrimaryMetric? primaryMetric, ClassificationTrainingSettings trainingSettings, IList cvSplitColumnNames, TableVerticalFeaturizationSettings featurizationSettings, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, MachineLearningTableJobInput testData, double? testDataSize, MachineLearningTableJobInput validationData, double? validationDataSize, string weightColumnName) : base(logVerbosity, targetColumnName, taskType, trainingData, serializedAdditionalRawData) + /// Featurization inputs needed for AutoML job. + internal ClassificationTask(TaskType taskType, MachineLearningLogVerbosity? logVerbosity, MachineLearningTableJobInput trainingData, string targetColumnName, IDictionary serializedAdditionalRawData, ClassificationPrimaryMetric? primaryMetric, ClassificationTrainingSettings trainingSettings, string positiveLabel, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, IList cvSplitColumnNames, string weightColumnName, MachineLearningTableJobInput validationData, MachineLearningTableJobInput testData, double? validationDataSize, double? testDataSize, TableVerticalFeaturizationSettings featurizationSettings) : base(taskType, logVerbosity, trainingData, targetColumnName, serializedAdditionalRawData) { - PositiveLabel = positiveLabel; PrimaryMetric = primaryMetric; TrainingSettings = trainingSettings; - CvSplitColumnNames = cvSplitColumnNames; - FeaturizationSettings = featurizationSettings; + PositiveLabel = positiveLabel; LimitSettings = limitSettings; NCrossValidations = nCrossValidations; - TestData = testData; - TestDataSize = testDataSize; + CvSplitColumnNames = cvSplitColumnNames; + WeightColumnName = weightColumnName; ValidationData = validationData; + TestData = testData; ValidationDataSize = validationDataSize; - WeightColumnName = weightColumnName; + TestDataSize = testDataSize; + FeaturizationSettings = featurizationSettings; TaskType = taskType; } @@ -80,16 +80,12 @@ internal ClassificationTask() { } - /// Positive label for binary metrics calculation. - public string PositiveLabel { get; set; } /// Primary metric for the task. public ClassificationPrimaryMetric? PrimaryMetric { get; set; } /// Inputs for training phase for an AutoML Job. public ClassificationTrainingSettings TrainingSettings { get; set; } - /// Columns to use for CVSplit data. - public IList CvSplitColumnNames { get; set; } - /// Featurization inputs needed for AutoML job. - public TableVerticalFeaturizationSettings FeaturizationSettings { get; set; } + /// Positive label for binary metrics calculation. + public string PositiveLabel { get; set; } /// Execution constraints for AutoMLJob. public TableVerticalLimitSettings LimitSettings { get; set; } /// @@ -99,23 +95,27 @@ internal ClassificationTask() /// The available derived classes include and . /// public NCrossValidations NCrossValidations { get; set; } + /// Columns to use for CVSplit data. + public IList CvSplitColumnNames { get; set; } + /// The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. + public string WeightColumnName { get; set; } + /// Validation data inputs. + public MachineLearningTableJobInput ValidationData { get; set; } /// Test data input. public MachineLearningTableJobInput TestData { get; set; } /// - /// The fraction of test dataset that needs to be set aside for validation purpose. + /// The fraction of training dataset that needs to be set aside for validation purpose. /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - public double? TestDataSize { get; set; } - /// Validation data inputs. - public MachineLearningTableJobInput ValidationData { get; set; } + public double? ValidationDataSize { get; set; } /// - /// The fraction of training dataset that needs to be set aside for validation purpose. + /// The fraction of test dataset that needs to be set aside for validation purpose. /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - public double? ValidationDataSize { get; set; } - /// The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. - public string WeightColumnName { get; set; } + public double? TestDataSize { get; set; } + /// Featurization inputs needed for AutoML job. + public TableVerticalFeaturizationSettings FeaturizationSettings { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.Serialization.cs index c6958af3f6a0f..b646942ae0d62 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.Serialization.cs @@ -60,21 +60,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteNull("blockedTrainingAlgorithms"); } } - if (Optional.IsDefined(IsDnnTrainingEnabled)) - { - writer.WritePropertyName("enableDnnTraining"u8); - writer.WriteBooleanValue(IsDnnTrainingEnabled.Value); - } - if (Optional.IsDefined(IsModelExplainabilityEnabled)) - { - writer.WritePropertyName("enableModelExplainability"u8); - writer.WriteBooleanValue(IsModelExplainabilityEnabled.Value); - } if (Optional.IsDefined(IsOnnxCompatibleModelsEnabled)) { writer.WritePropertyName("enableOnnxCompatibleModels"u8); writer.WriteBooleanValue(IsOnnxCompatibleModelsEnabled.Value); } + if (Optional.IsDefined(StackEnsembleSettings)) + { + if (StackEnsembleSettings != null) + { + writer.WritePropertyName("stackEnsembleSettings"u8); + writer.WriteObjectValue(StackEnsembleSettings, options); + } + else + { + writer.WriteNull("stackEnsembleSettings"); + } + } if (Optional.IsDefined(IsStackEnsembleEnabled)) { writer.WritePropertyName("enableStackEnsemble"u8); @@ -90,17 +92,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("ensembleModelDownloadTimeout"u8); writer.WriteStringValue(EnsembleModelDownloadTimeout.Value, "P"); } - if (Optional.IsDefined(StackEnsembleSettings)) + if (Optional.IsDefined(IsModelExplainabilityEnabled)) { - if (StackEnsembleSettings != null) - { - writer.WritePropertyName("stackEnsembleSettings"u8); - writer.WriteObjectValue(StackEnsembleSettings, options); - } - else - { - writer.WriteNull("stackEnsembleSettings"); - } + writer.WritePropertyName("enableModelExplainability"u8); + writer.WriteBooleanValue(IsModelExplainabilityEnabled.Value); + } + if (Optional.IsDefined(IsDnnTrainingEnabled)) + { + writer.WritePropertyName("enableDnnTraining"u8); + writer.WriteBooleanValue(IsDnnTrainingEnabled.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -142,13 +142,13 @@ internal static ClassificationTrainingSettings DeserializeClassificationTraining } IList allowedTrainingAlgorithms = default; IList blockedTrainingAlgorithms = default; - bool? enableDnnTraining = default; - bool? enableModelExplainability = default; bool? enableOnnxCompatibleModels = default; + MachineLearningStackEnsembleSettings stackEnsembleSettings = default; bool? enableStackEnsemble = default; bool? enableVoteEnsemble = default; TimeSpan? ensembleModelDownloadTimeout = default; - MachineLearningStackEnsembleSettings stackEnsembleSettings = default; + bool? enableModelExplainability = default; + bool? enableDnnTraining = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -183,68 +183,68 @@ internal static ClassificationTrainingSettings DeserializeClassificationTraining blockedTrainingAlgorithms = array; continue; } - if (property.NameEquals("enableDnnTraining"u8)) + if (property.NameEquals("enableOnnxCompatibleModels"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableDnnTraining = property.Value.GetBoolean(); + enableOnnxCompatibleModels = property.Value.GetBoolean(); continue; } - if (property.NameEquals("enableModelExplainability"u8)) + if (property.NameEquals("stackEnsembleSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + stackEnsembleSettings = null; continue; } - enableModelExplainability = property.Value.GetBoolean(); + stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value, options); continue; } - if (property.NameEquals("enableOnnxCompatibleModels"u8)) + if (property.NameEquals("enableStackEnsemble"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableOnnxCompatibleModels = property.Value.GetBoolean(); + enableStackEnsemble = property.Value.GetBoolean(); continue; } - if (property.NameEquals("enableStackEnsemble"u8)) + if (property.NameEquals("enableVoteEnsemble"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableStackEnsemble = property.Value.GetBoolean(); + enableVoteEnsemble = property.Value.GetBoolean(); continue; } - if (property.NameEquals("enableVoteEnsemble"u8)) + if (property.NameEquals("ensembleModelDownloadTimeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableVoteEnsemble = property.Value.GetBoolean(); + ensembleModelDownloadTimeout = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("ensembleModelDownloadTimeout"u8)) + if (property.NameEquals("enableModelExplainability"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - ensembleModelDownloadTimeout = property.Value.GetTimeSpan("P"); + enableModelExplainability = property.Value.GetBoolean(); continue; } - if (property.NameEquals("stackEnsembleSettings"u8)) + if (property.NameEquals("enableDnnTraining"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - stackEnsembleSettings = null; continue; } - stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value, options); + enableDnnTraining = property.Value.GetBoolean(); continue; } if (options.Format != "W") @@ -254,13 +254,13 @@ internal static ClassificationTrainingSettings DeserializeClassificationTraining } serializedAdditionalRawData = rawDataDictionary; return new ClassificationTrainingSettings( - enableDnnTraining, - enableModelExplainability, enableOnnxCompatibleModels, + stackEnsembleSettings, enableStackEnsemble, enableVoteEnsemble, ensembleModelDownloadTimeout, - stackEnsembleSettings, + enableModelExplainability, + enableDnnTraining, serializedAdditionalRawData, allowedTrainingAlgorithms ?? new ChangeTrackingList(), blockedTrainingAlgorithms ?? new ChangeTrackingList()); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.cs index a0646519ae840..04b581cf463ea 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.cs @@ -21,20 +21,20 @@ public ClassificationTrainingSettings() } /// Initializes a new instance of . - /// Enable recommendation of DNN models. - /// Flag to turn on explainability on best model. /// Flag for enabling onnx compatible models. + /// Stack ensemble settings for stack ensemble run. /// Enable stack ensemble run. /// Enable voting ensemble run. /// /// During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. /// Configure this parameter with a higher value than 300 secs, if more time is needed. /// - /// Stack ensemble settings for stack ensemble run. + /// Flag to turn on explainability on best model. + /// Enable recommendation of DNN models. /// Keeps track of any properties unknown to the library. /// Allowed models for classification task. /// Blocked models for classification task. - internal ClassificationTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, IDictionary serializedAdditionalRawData, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isDnnTrainingEnabled, isModelExplainabilityEnabled, isOnnxCompatibleModelsEnabled, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, stackEnsembleSettings, serializedAdditionalRawData) + internal ClassificationTrainingSettings(bool? isOnnxCompatibleModelsEnabled, MachineLearningStackEnsembleSettings stackEnsembleSettings, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, bool? isModelExplainabilityEnabled, bool? isDnnTrainingEnabled, IDictionary serializedAdditionalRawData, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isOnnxCompatibleModelsEnabled, stackEnsembleSettings, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, isModelExplainabilityEnabled, isDnnTrainingEnabled, serializedAdditionalRawData) { AllowedTrainingAlgorithms = allowedTrainingAlgorithms; BlockedTrainingAlgorithms = blockedTrainingAlgorithms; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerResourceArmPaginatedResult.Serialization.cs index 39f7ec521aa58..5a8eb7a5ed82c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter wr } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter wr } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static CodeContainerResourceArmPaginatedResult DeserializeCodeContainer { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static CodeContainerResourceArmPaginatedResult DeserializeCodeContainer 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 CodeContainerResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new CodeContainerResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerResourceArmPaginatedResult.cs index 7f3e4c88832ca..89599641f8d90 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal CodeContainerResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of CodeContainer objects. If null, there are no additional pages. /// An array of objects of type CodeContainer. + /// The link to the next page of CodeContainer objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal CodeContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal CodeContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of CodeContainer objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type CodeContainer. public IReadOnlyList Value { get; } + /// The link to the next page of CodeContainer objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionResourceArmPaginatedResult.Serialization.cs index 5961701b3c7b7..8e87588d43813 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writ } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter writ } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static CodeVersionResourceArmPaginatedResult DeserializeCodeVersionReso { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static CodeVersionResourceArmPaginatedResult DeserializeCodeVersionReso 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 CodeVersionResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new CodeVersionResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionResourceArmPaginatedResult.cs index 8275d1785c699..d02a5f7a0a538 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal CodeVersionResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of CodeVersion objects. If null, there are no additional pages. /// An array of objects of type CodeVersion. + /// The link to the next page of CodeVersion objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal CodeVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal CodeVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of CodeVersion objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type CodeVersion. public IReadOnlyList Value { get; } + /// The link to the next page of CodeVersion objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerResourceArmPaginatedResult.Serialization.cs index 646d17b90537c..7badb2a737d7c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWrit } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static ComponentContainerResourceArmPaginatedResult DeserializeComponen { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static ComponentContainerResourceArmPaginatedResult DeserializeComponen 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 ComponentContainerResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new ComponentContainerResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerResourceArmPaginatedResult.cs index d5843085081cf..e3af7875f556f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal ComponentContainerResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of ComponentContainer objects. If null, there are no additional pages. /// An array of objects of type ComponentContainer. + /// The link to the next page of ComponentContainer objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal ComponentContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal ComponentContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of ComponentContainer objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type ComponentContainer. public IReadOnlyList Value { get; } + /// The link to the next page of ComponentContainer objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionResourceArmPaginatedResult.Serialization.cs index 42d4949618460..f8a8e118134df 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static ComponentVersionResourceArmPaginatedResult DeserializeComponentV { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static ComponentVersionResourceArmPaginatedResult DeserializeComponentV 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 ComponentVersionResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new ComponentVersionResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionResourceArmPaginatedResult.cs index d6d4587ae5d0e..dd0276e9372bf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal ComponentVersionResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of ComponentVersion objects. If null, there are no additional pages. /// An array of objects of type ComponentVersion. + /// The link to the next page of ComponentVersion objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal ComponentVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal ComponentVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of ComponentVersion objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type ComponentVersion. public IReadOnlyList Value { get; } + /// The link to the next page of ComponentVersion objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.Serialization.cs deleted file mode 100644 index 07cfaecf92850..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.Serialization.cs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class ComputeInstanceAutologgerSettings : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ComputeInstanceAutologgerSettings)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(MlflowAutologger)) - { - writer.WritePropertyName("mlflowAutologger"u8); - writer.WriteStringValue(MlflowAutologger.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 - } - } - writer.WriteEndObject(); - } - - ComputeInstanceAutologgerSettings 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(ComputeInstanceAutologgerSettings)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeComputeInstanceAutologgerSettings(document.RootElement, options); - } - - internal static ComputeInstanceAutologgerSettings DeserializeComputeInstanceAutologgerSettings(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MachineLearningFlowAutoLogger? mlflowAutologger = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mlflowAutologger"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - mlflowAutologger = new MachineLearningFlowAutoLogger(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ComputeInstanceAutologgerSettings(mlflowAutologger, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ComputeInstanceAutologgerSettings)} does not support writing '{options.Format}' format."); - } - } - - ComputeInstanceAutologgerSettings 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 DeserializeComputeInstanceAutologgerSettings(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ComputeInstanceAutologgerSettings)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.cs deleted file mode 100644 index 5552bc750cc28..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAutologgerSettings.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Specifies settings for autologger. - internal partial class ComputeInstanceAutologgerSettings - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public ComputeInstanceAutologgerSettings() - { - } - - /// Initializes a new instance of . - /// Indicates whether mlflow autologger is enabled for notebooks. - /// Keeps track of any properties unknown to the library. - internal ComputeInstanceAutologgerSettings(MachineLearningFlowAutoLogger? mlflowAutologger, IDictionary serializedAdditionalRawData) - { - MlflowAutologger = mlflowAutologger; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Indicates whether mlflow autologger is enabled for notebooks. - public MachineLearningFlowAutoLogger? MlflowAutologger { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeRuntimeDto.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeRuntimeDto.cs index c026bf575fd18..eda69df8710a9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeRuntimeDto.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeRuntimeDto.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The ComputeRuntimeDto. + /// Compute runtime config for feature store type workspace. internal partial class ComputeRuntimeDto { /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerEndpoint.cs index 80264cf14d3ff..f2bb9c2e4b319 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerEndpoint.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerEndpoint.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The ContainerEndpoint. + /// Describes the endpoint configuration for the container. public partial class ContainerEndpoint { /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContentSafetyEndpointDeploymentResourceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContentSafetyEndpointDeploymentResourceProperties.Serialization.cs deleted file mode 100644 index 1f9a6b636ae59..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContentSafetyEndpointDeploymentResourceProperties.Serialization.cs +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ContentSafetyEndpointDeploymentResourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ContentSafetyEndpointDeploymentResourceProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, options); - if (Optional.IsDefined(RaiPolicyName)) - { - writer.WritePropertyName("raiPolicyName"u8); - writer.WriteStringValue(RaiPolicyName); - } - if (Optional.IsDefined(VersionUpgradeOption)) - { - writer.WritePropertyName("versionUpgradeOption"u8); - writer.WriteStringValue(VersionUpgradeOption.Value.ToString()); - } - if (Optional.IsDefined(FailureReason)) - { - writer.WritePropertyName("failureReason"u8); - writer.WriteStringValue(FailureReason); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(EndpointDeploymentResourcePropertiesType); - 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 - } - } - writer.WriteEndObject(); - } - - ContentSafetyEndpointDeploymentResourceProperties 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(ContentSafetyEndpointDeploymentResourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeContentSafetyEndpointDeploymentResourceProperties(document.RootElement, options); - } - - internal static ContentSafetyEndpointDeploymentResourceProperties DeserializeContentSafetyEndpointDeploymentResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - EndpointDeploymentModel model = default; - string raiPolicyName = default; - DeploymentModelVersionUpgradeOption? versionUpgradeOption = default; - string failureReason = default; - DefaultResourceProvisioningState? provisioningState = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("model"u8)) - { - model = EndpointDeploymentModel.DeserializeEndpointDeploymentModel(property.Value, options); - continue; - } - if (property.NameEquals("raiPolicyName"u8)) - { - raiPolicyName = property.Value.GetString(); - continue; - } - if (property.NameEquals("versionUpgradeOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - versionUpgradeOption = new DeploymentModelVersionUpgradeOption(property.Value.GetString()); - continue; - } - if (property.NameEquals("failureReason"u8)) - { - failureReason = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new DefaultResourceProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ContentSafetyEndpointDeploymentResourceProperties( - failureReason, - provisioningState, - type, - serializedAdditionalRawData, - model, - raiPolicyName, - versionUpgradeOption); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ContentSafetyEndpointDeploymentResourceProperties)} does not support writing '{options.Format}' format."); - } - } - - ContentSafetyEndpointDeploymentResourceProperties 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 DeserializeContentSafetyEndpointDeploymentResourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ContentSafetyEndpointDeploymentResourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContentSafetyEndpointDeploymentResourceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContentSafetyEndpointDeploymentResourceProperties.cs deleted file mode 100644 index 46d2ac213c276..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContentSafetyEndpointDeploymentResourceProperties.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ContentSafetyEndpointDeploymentResourceProperties. - public partial class ContentSafetyEndpointDeploymentResourceProperties : EndpointDeploymentResourceProperties - { - /// Initializes a new instance of . - /// Model used for the endpoint deployment. - /// is null. - public ContentSafetyEndpointDeploymentResourceProperties(EndpointDeploymentModel model) - { - Argument.AssertNotNull(model, nameof(model)); - - Model = model; - EndpointDeploymentResourcePropertiesType = "Azure.ContentSafety"; - } - - /// Initializes a new instance of . - /// The failure reason if the creation failed. - /// Read-only provision state status property. - /// Kind of the deployment. - /// Keeps track of any properties unknown to the library. - /// Model used for the endpoint deployment. - /// The name of RAI policy. - /// Deployment model version upgrade option. - internal ContentSafetyEndpointDeploymentResourceProperties(string failureReason, DefaultResourceProvisioningState? provisioningState, string endpointDeploymentResourcePropertiesType, IDictionary serializedAdditionalRawData, EndpointDeploymentModel model, string raiPolicyName, DeploymentModelVersionUpgradeOption? versionUpgradeOption) : base(failureReason, provisioningState, endpointDeploymentResourcePropertiesType, serializedAdditionalRawData) - { - Model = model; - RaiPolicyName = raiPolicyName; - VersionUpgradeOption = versionUpgradeOption; - EndpointDeploymentResourcePropertiesType = endpointDeploymentResourcePropertiesType ?? "Azure.ContentSafety"; - } - - /// Initializes a new instance of for deserialization. - internal ContentSafetyEndpointDeploymentResourceProperties() - { - } - - /// Model used for the endpoint deployment. - public EndpointDeploymentModel Model { get; set; } - /// The name of RAI policy. - public string RaiPolicyName { get; set; } - /// Deployment model version upgrade option. - public DeploymentModelVersionUpgradeOption? VersionUpgradeOption { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContentSafetyEndpointResourceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContentSafetyEndpointResourceProperties.Serialization.cs deleted file mode 100644 index ff216c2c4849c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContentSafetyEndpointResourceProperties.Serialization.cs +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ContentSafetyEndpointResourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ContentSafetyEndpointResourceProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(AssociatedResourceId)) - { - writer.WritePropertyName("associatedResourceId"u8); - writer.WriteStringValue(AssociatedResourceId); - } - if (Optional.IsCollectionDefined(Deployments)) - { - writer.WritePropertyName("deployments"u8); - writer.WriteStartArray(); - foreach (var item in Deployments) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (Optional.IsDefined(EndpointUri)) - { - writer.WritePropertyName("endpointUri"u8); - writer.WriteStringValue(EndpointUri.AbsoluteUri); - } - if (Optional.IsDefined(FailureReason)) - { - writer.WritePropertyName("failureReason"u8); - writer.WriteStringValue(FailureReason); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(ShouldCreateAiServicesEndpoint)) - { - writer.WritePropertyName("shouldCreateAiServicesEndpoint"u8); - writer.WriteBooleanValue(ShouldCreateAiServicesEndpoint.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 - } - } - writer.WriteEndObject(); - } - - ContentSafetyEndpointResourceProperties 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(ContentSafetyEndpointResourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeContentSafetyEndpointResourceProperties(document.RootElement, options); - } - - internal static ContentSafetyEndpointResourceProperties DeserializeContentSafetyEndpointResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier associatedResourceId = default; - IList deployments = default; - EndpointType endpointType = default; - Uri endpointUri = default; - string failureReason = default; - AzureLocation? location = default; - string name = default; - DefaultResourceProvisioningState? provisioningState = default; - bool? shouldCreateAiServicesEndpoint = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("associatedResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - associatedResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("deployments"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(item, options)); - } - deployments = array; - continue; - } - if (property.NameEquals("endpointType"u8)) - { - endpointType = new EndpointType(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpointUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpointUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("failureReason"u8)) - { - failureReason = property.Value.GetString(); - continue; - } - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new DefaultResourceProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("shouldCreateAiServicesEndpoint"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - shouldCreateAiServicesEndpoint = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ContentSafetyEndpointResourceProperties( - associatedResourceId, - deployments ?? new ChangeTrackingList(), - endpointType, - endpointUri, - failureReason, - location, - name, - provisioningState, - shouldCreateAiServicesEndpoint, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ContentSafetyEndpointResourceProperties)} does not support writing '{options.Format}' format."); - } - } - - ContentSafetyEndpointResourceProperties 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 DeserializeContentSafetyEndpointResourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ContentSafetyEndpointResourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContentSafetyEndpointResourceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContentSafetyEndpointResourceProperties.cs deleted file mode 100644 index cd968320a7661..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContentSafetyEndpointResourceProperties.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ContentSafetyEndpointResourceProperties. - public partial class ContentSafetyEndpointResourceProperties : EndpointResourceProperties - { - /// Initializes a new instance of . - public ContentSafetyEndpointResourceProperties() - { - EndpointType = EndpointType.AzureContentSafety; - } - - /// Initializes a new instance of . - /// Byo resource id for creating the built-in model service endpoints. - /// Deployments info. - /// Type of the endpoint. - /// Uri of the endpoint. - /// The failure reason if the creation failed. - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace - /// - /// Name of the endpoint. - /// Read-only provision state status property. - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - /// Keeps track of any properties unknown to the library. - internal ContentSafetyEndpointResourceProperties(ResourceIdentifier associatedResourceId, IList deployments, EndpointType endpointType, Uri endpointUri, string failureReason, AzureLocation? location, string name, DefaultResourceProvisioningState? provisioningState, bool? shouldCreateAiServicesEndpoint, IDictionary serializedAdditionalRawData) : base(associatedResourceId, deployments, endpointType, endpointUri, failureReason, location, name, provisioningState, shouldCreateAiServicesEndpoint, serializedAdditionalRawData) - { - EndpointType = endpointType; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CosmosDbSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CosmosDbSettings.cs index 18f60eb87474d..36af75334d66b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CosmosDbSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CosmosDbSettings.cs @@ -51,7 +51,7 @@ public CosmosDbSettings() } /// Initializes a new instance of . - /// + /// The throughput of the collections in cosmosdb database. /// Keeps track of any properties unknown to the library. internal CosmosDbSettings(int? collectionsThroughput, IDictionary serializedAdditionalRawData) { @@ -59,7 +59,7 @@ internal CosmosDbSettings(int? collectionsThroughput, IDictionary Gets or sets the collections throughput. + /// The throughput of the collections in cosmosdb database. public int? CollectionsThroughput { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CronTrigger.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CronTrigger.Serialization.cs index 055fe46969383..6b86c3721c15c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CronTrigger.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CronTrigger.Serialization.cs @@ -28,6 +28,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteStartObject(); writer.WritePropertyName("expression"u8); writer.WriteStringValue(Expression); + writer.WritePropertyName("triggerType"u8); + writer.WriteStringValue(TriggerType.ToString()); if (Optional.IsDefined(EndTime)) { if (EndTime != null) @@ -57,8 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WritePropertyName("timeZone"u8); writer.WriteStringValue(TimeZone); } - writer.WritePropertyName("triggerType"u8); - writer.WriteStringValue(TriggerType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -98,10 +98,10 @@ internal static CronTrigger DeserializeCronTrigger(JsonElement element, ModelRea return null; } string expression = default; + TriggerType triggerType = default; string endTime = default; string startTime = default; string timeZone = default; - TriggerType triggerType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -111,6 +111,11 @@ internal static CronTrigger DeserializeCronTrigger(JsonElement element, ModelRea expression = property.Value.GetString(); continue; } + if (property.NameEquals("triggerType"u8)) + { + triggerType = new TriggerType(property.Value.GetString()); + continue; + } if (property.NameEquals("endTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -136,11 +141,6 @@ internal static CronTrigger DeserializeCronTrigger(JsonElement element, ModelRea timeZone = property.Value.GetString(); continue; } - if (property.NameEquals("triggerType"u8)) - { - triggerType = new TriggerType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -148,10 +148,10 @@ internal static CronTrigger DeserializeCronTrigger(JsonElement element, ModelRea } serializedAdditionalRawData = rawDataDictionary; return new CronTrigger( + triggerType, endTime, startTime, timeZone, - triggerType, serializedAdditionalRawData, expression); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CronTrigger.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CronTrigger.cs index e564f8c07ede5..e47288f051860 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CronTrigger.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CronTrigger.cs @@ -28,6 +28,7 @@ public CronTrigger(string expression) } /// Initializes a new instance of . + /// [Required]. /// /// Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. /// Recommented format would be "2022-06-01T00:00:01" @@ -38,13 +39,12 @@ public CronTrigger(string expression) /// Specifies time zone in which the schedule runs. /// TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 /// - /// [Required]. /// Keeps track of any properties unknown to the library. /// /// [Required] Specifies cron expression of schedule. /// The expression should follow NCronTab format. /// - internal CronTrigger(string endTime, string startTime, string timeZone, TriggerType triggerType, IDictionary serializedAdditionalRawData, string expression) : base(endTime, startTime, timeZone, triggerType, serializedAdditionalRawData) + internal CronTrigger(TriggerType triggerType, string endTime, string startTime, string timeZone, IDictionary serializedAdditionalRawData, string expression) : base(triggerType, endTime, startTime, timeZone, serializedAdditionalRawData) { Expression = expression; TriggerType = triggerType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.Serialization.cs index 79cf83cbcc789..f6206bf715fcd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.Serialization.cs @@ -43,11 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -63,6 +58,11 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -74,16 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter wr } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -94,15 +84,15 @@ void IJsonModel.Write(Utf8JsonWriter wr } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -146,16 +136,14 @@ internal static CustomKeysWorkspaceConnectionProperties DeserializeCustomKeysWor MachineLearningConnectionAuthType authType = default; MachineLearningConnectionCategory? category = default; ResourceIdentifier createdByWorkspaceArmId = default; - string error = default; DateTimeOffset? expiryTime = default; ConnectionGroup? group = default; bool? isSharedToAll = default; + string target = default; IDictionary metadata = default; - ManagedPERequirement? peRequirement = default; - ManagedPEStatus? peStatus = default; IList sharedUserList = default; - string target = default; - bool? useWorkspaceManagedIdentity = default; + string value = default; + MachineLearningValueFormat? valueFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -192,11 +180,6 @@ internal static CustomKeysWorkspaceConnectionProperties DeserializeCustomKeysWor createdByWorkspaceArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } if (property.NameEquals("expiryTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,6 +207,11 @@ internal static CustomKeysWorkspaceConnectionProperties DeserializeCustomKeysWor isSharedToAll = property.Value.GetBoolean(); continue; } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -238,24 +226,6 @@ internal static CustomKeysWorkspaceConnectionProperties DeserializeCustomKeysWor metadata = dictionary; continue; } - if (property.NameEquals("peRequirement"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peRequirement = new ManagedPERequirement(property.Value.GetString()); - continue; - } - if (property.NameEquals("peStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peStatus = new ManagedPEStatus(property.Value.GetString()); - continue; - } if (property.NameEquals("sharedUserList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -270,18 +240,18 @@ internal static CustomKeysWorkspaceConnectionProperties DeserializeCustomKeysWor sharedUserList = array; continue; } - if (property.NameEquals("target"u8)) + if (property.NameEquals("value"u8)) { - target = property.Value.GetString(); + value = property.Value.GetString(); continue; } - if (property.NameEquals("useWorkspaceManagedIdentity"u8)) + if (property.NameEquals("valueFormat"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - useWorkspaceManagedIdentity = property.Value.GetBoolean(); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } if (options.Format != "W") @@ -294,16 +264,14 @@ internal static CustomKeysWorkspaceConnectionProperties DeserializeCustomKeysWor authType, category, createdByWorkspaceArmId, - error, expiryTime, group, isSharedToAll, + target, metadata ?? new ChangeTrackingDictionary(), - peRequirement, - peStatus, sharedUserList ?? new ChangeTrackingList(), - target, - useWorkspaceManagedIdentity, + value, + valueFormat, serializedAdditionalRawData, credentials); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.cs index 421b83411cc22..7b7b442aca534 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomKeysWorkspaceConnectionProperties.cs @@ -30,19 +30,17 @@ public CustomKeysWorkspaceConnectionProperties() /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. /// Custom Keys credential object. - internal CustomKeysWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData, CustomKeys credentials) : base(authType, category, createdByWorkspaceArmId, error, expiryOn, group, isSharedToAll, metadata, peRequirement, peStatus, sharedUserList, target, useWorkspaceManagedIdentity, serializedAdditionalRawData) + internal CustomKeysWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData, CustomKeys credentials) : base(authType, category, createdByWorkspaceArmId, expiryOn, group, isSharedToAll, target, metadata, sharedUserList, value, valueFormat, serializedAdditionalRawData) { Credentials = credentials; AuthType = authType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.Serialization.cs index 173ea331881ef..bc664abdef3bd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.Serialization.cs @@ -26,8 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW } writer.WriteStartObject(); - writer.WritePropertyName("metric"u8); - writer.WriteStringValue(Metric); if (Optional.IsDefined(Threshold)) { if (Threshold != null) @@ -40,6 +38,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW writer.WriteNull("threshold"); } } + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,17 +78,12 @@ internal static CustomMetricThreshold DeserializeCustomMetricThreshold(JsonEleme { return null; } - string metric = default; MonitoringThreshold threshold = default; + string metric = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("metric"u8)) - { - metric = property.Value.GetString(); - continue; - } if (property.NameEquals("threshold"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -99,13 +94,18 @@ internal static CustomMetricThreshold DeserializeCustomMetricThreshold(JsonEleme threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value, options); continue; } + if (property.NameEquals("metric"u8)) + { + metric = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new CustomMetricThreshold(metric, threshold, serializedAdditionalRawData); + return new CustomMetricThreshold(threshold, metric, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.cs index b1439c52490b9..24f55588d57d8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMetricThreshold.cs @@ -56,13 +56,13 @@ public CustomMetricThreshold(string metric) } /// Initializes a new instance of . - /// [Required] The user-defined metric to calculate. /// The threshold value. If null, a default value will be set depending on the selected metric. + /// [Required] The user-defined metric to calculate. /// Keeps track of any properties unknown to the library. - internal CustomMetricThreshold(string metric, MonitoringThreshold threshold, IDictionary serializedAdditionalRawData) + internal CustomMetricThreshold(MonitoringThreshold threshold, string metric, IDictionary serializedAdditionalRawData) { - Metric = metric; Threshold = threshold; + Metric = metric; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -71,8 +71,6 @@ internal CustomMetricThreshold() { } - /// [Required] The user-defined metric to calculate. - public string Metric { get; set; } /// The threshold value. If null, a default value will be set depending on the selected metric. internal MonitoringThreshold Threshold { get; set; } /// The threshold value. If null, the set default is dependent on the metric type. @@ -86,5 +84,8 @@ public double? ThresholdValue Threshold.Value = value; } } + + /// [Required] The user-defined metric to calculate. + public string Metric { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelFineTuning.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelFineTuning.Serialization.cs deleted file mode 100644 index f5ce08ae51bba..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelFineTuning.Serialization.cs +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class CustomModelFineTuning : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomModelFineTuning)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(HyperParameters)) - { - if (HyperParameters != null) - { - writer.WritePropertyName("hyperParameters"u8); - writer.WriteStartObject(); - foreach (var item in HyperParameters) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("hyperParameters"); - } - } - writer.WritePropertyName("modelProvider"u8); - writer.WriteStringValue(ModelProvider.ToString()); - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); - if (Optional.IsDefined(ValidationData)) - { - if (ValidationData != null) - { - writer.WritePropertyName("validationData"u8); - writer.WriteObjectValue(ValidationData, options); - } - else - { - writer.WriteNull("validationData"); - } - } - writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, 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 - } - } - writer.WriteEndObject(); - } - - CustomModelFineTuning 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(CustomModelFineTuning)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomModelFineTuning(document.RootElement, options); - } - - internal static CustomModelFineTuning DeserializeCustomModelFineTuning(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IDictionary hyperParameters = default; - ModelProvider modelProvider = default; - FineTuningTaskType taskType = default; - MachineLearningJobInput trainingData = default; - MachineLearningJobInput validationData = default; - MachineLearningFlowModelJobInput model = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("hyperParameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - hyperParameters = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - hyperParameters = dictionary; - continue; - } - if (property.NameEquals("modelProvider"u8)) - { - modelProvider = new ModelProvider(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskType"u8)) - { - taskType = new FineTuningTaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData"u8)) - { - trainingData = MachineLearningJobInput.DeserializeMachineLearningJobInput(property.Value, options); - continue; - } - if (property.NameEquals("validationData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - validationData = null; - continue; - } - validationData = MachineLearningJobInput.DeserializeMachineLearningJobInput(property.Value, options); - continue; - } - if (property.NameEquals("model"u8)) - { - model = MachineLearningFlowModelJobInput.DeserializeMachineLearningFlowModelJobInput(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomModelFineTuning( - modelProvider, - taskType, - trainingData, - validationData, - model, - serializedAdditionalRawData, - hyperParameters ?? new ChangeTrackingDictionary()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomModelFineTuning)} does not support writing '{options.Format}' format."); - } - } - - CustomModelFineTuning 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 DeserializeCustomModelFineTuning(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomModelFineTuning)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelFineTuning.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelFineTuning.cs deleted file mode 100644 index 2431930ea9bcc..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelFineTuning.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The CustomModelFineTuning. - public partial class CustomModelFineTuning : FineTuningVertical - { - /// Initializes a new instance of . - /// [Required] Fine tuning task type. - /// - /// [Required] Training data for fine tuning. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// [Required] Input model for fine tuning. - /// or is null. - public CustomModelFineTuning(FineTuningTaskType taskType, MachineLearningJobInput trainingData, MachineLearningFlowModelJobInput model) : base(taskType, trainingData, model) - { - Argument.AssertNotNull(trainingData, nameof(trainingData)); - Argument.AssertNotNull(model, nameof(model)); - - HyperParameters = new ChangeTrackingDictionary(); - ModelProvider = ModelProvider.Custom; - } - - /// Initializes a new instance of . - /// [Required] Enum to determine the type of fine tuning. - /// [Required] Fine tuning task type. - /// - /// [Required] Training data for fine tuning. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// - /// Validation data for fine tuning. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// [Required] Input model for fine tuning. - /// Keeps track of any properties unknown to the library. - /// HyperParameters for fine tuning custom model. - internal CustomModelFineTuning(ModelProvider modelProvider, FineTuningTaskType taskType, MachineLearningJobInput trainingData, MachineLearningJobInput validationData, MachineLearningFlowModelJobInput model, IDictionary serializedAdditionalRawData, IDictionary hyperParameters) : base(modelProvider, taskType, trainingData, validationData, model, serializedAdditionalRawData) - { - HyperParameters = hyperParameters; - ModelProvider = modelProvider; - } - - /// Initializes a new instance of for deserialization. - internal CustomModelFineTuning() - { - } - - /// HyperParameters for fine tuning custom model. - public IDictionary HyperParameters { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.Serialization.cs index 45a4cf658a3be..2358311d26455 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.Serialization.cs @@ -26,8 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteStartObject(); - writer.WritePropertyName("componentId"u8); - writer.WriteStringValue(ComponentId); if (Optional.IsCollectionDefined(InputAssets)) { if (InputAssets != null) @@ -64,6 +62,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteNull("inputs"); } } + writer.WritePropertyName("componentId"u8); + writer.WriteStringValue(ComponentId); writer.WritePropertyName("metricThresholds"u8); writer.WriteStartArray(); foreach (var item in MetricThresholds) @@ -71,6 +71,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); if (Optional.IsCollectionDefined(NotificationTypes)) { if (NotificationTypes != null) @@ -106,8 +108,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteNull("properties"); } } - writer.WritePropertyName("signalType"u8); - writer.WriteStringValue(SignalType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -146,22 +146,17 @@ internal static CustomMonitoringSignal DeserializeCustomMonitoringSignal(JsonEle { return null; } - string componentId = default; IDictionary inputAssets = default; IDictionary inputs = default; + string componentId = default; IList metricThresholds = default; + MonitoringSignalType signalType = default; IList notificationTypes = default; IDictionary properties = default; - MonitoringSignalType signalType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("componentId"u8)) - { - componentId = property.Value.GetString(); - continue; - } if (property.NameEquals("inputAssets"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -192,6 +187,11 @@ internal static CustomMonitoringSignal DeserializeCustomMonitoringSignal(JsonEle inputs = dictionary; continue; } + if (property.NameEquals("componentId"u8)) + { + componentId = property.Value.GetString(); + continue; + } if (property.NameEquals("metricThresholds"u8)) { List array = new List(); @@ -202,6 +202,11 @@ internal static CustomMonitoringSignal DeserializeCustomMonitoringSignal(JsonEle metricThresholds = array; continue; } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } if (property.NameEquals("notificationTypes"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -232,11 +237,6 @@ internal static CustomMonitoringSignal DeserializeCustomMonitoringSignal(JsonEle properties = dictionary; continue; } - if (property.NameEquals("signalType"u8)) - { - signalType = new MonitoringSignalType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -244,13 +244,13 @@ internal static CustomMonitoringSignal DeserializeCustomMonitoringSignal(JsonEle } serializedAdditionalRawData = rawDataDictionary; return new CustomMonitoringSignal( + signalType, notificationTypes ?? new ChangeTrackingList(), properties ?? new ChangeTrackingDictionary(), - signalType, serializedAdditionalRawData, - componentId, inputAssets ?? new ChangeTrackingDictionary(), inputs ?? new ChangeTrackingDictionary(), + componentId, metricThresholds); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.cs index 426203fea1080..6da45b42ebcfd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomMonitoringSignal.cs @@ -23,19 +23,18 @@ public CustomMonitoringSignal(string componentId, IEnumerable(); Inputs = new ChangeTrackingDictionary(); + ComponentId = componentId; MetricThresholds = metricThresholds.ToList(); SignalType = MonitoringSignalType.Custom; } /// Initializes a new instance of . + /// [Required] Specifies the type of signal to monitor. /// The current notification mode for this signal. /// Property dictionary. Properties can be added, but not removed or altered. - /// [Required] Specifies the type of signal to monitor. /// Keeps track of any properties unknown to the library. - /// [Required] Reference to the component asset used to calculate the custom metrics. /// /// Monitoring assets to take as input. Key is the component input port name, value is the data asset. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -46,12 +45,13 @@ public CustomMonitoringSignal(string componentId, IEnumerable is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , , and . /// + /// [Required] Reference to the component asset used to calculate the custom metrics. /// [Required] A list of metrics to calculate and their associated thresholds. - internal CustomMonitoringSignal(IList notificationTypes, IDictionary properties, MonitoringSignalType signalType, IDictionary serializedAdditionalRawData, string componentId, IDictionary inputAssets, IDictionary inputs, IList metricThresholds) : base(notificationTypes, properties, signalType, serializedAdditionalRawData) + internal CustomMonitoringSignal(MonitoringSignalType signalType, IList notificationTypes, IDictionary properties, IDictionary serializedAdditionalRawData, IDictionary inputAssets, IDictionary inputs, string componentId, IList metricThresholds) : base(signalType, notificationTypes, properties, serializedAdditionalRawData) { - ComponentId = componentId; InputAssets = inputAssets; Inputs = inputs; + ComponentId = componentId; MetricThresholds = metricThresholds; SignalType = signalType; } @@ -61,8 +61,6 @@ internal CustomMonitoringSignal() { } - /// [Required] Reference to the component asset used to calculate the custom metrics. - public string ComponentId { get; set; } /// /// Monitoring assets to take as input. Key is the component input port name, value is the data asset. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -75,6 +73,8 @@ internal CustomMonitoringSignal() /// The available derived classes include , , , , , and . /// public IDictionary Inputs { get; set; } + /// [Required] Reference to the component asset used to calculate the custom metrics. + public string ComponentId { get; set; } /// [Required] A list of metrics to calculate and their associated thresholds. public IList MetricThresholds { get; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.Serialization.cs index fff95ca8fb826..b77ca56561b54 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.Serialization.cs @@ -79,11 +79,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt } writer.WriteEndArray(); } - if (Optional.IsDefined(Kernel)) - { - writer.WritePropertyName("kernel"u8); - writer.WriteObjectValue(Kernel, options); - } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -125,7 +120,6 @@ internal static CustomService DeserializeCustomService(JsonElement element, Mode DockerSetting docker = default; IList endpoints = default; IList volumes = default; - JupyterKernelConfig kernel = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -196,15 +190,6 @@ internal static CustomService DeserializeCustomService(JsonElement element, Mode volumes = array; continue; } - if (property.NameEquals("kernel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - kernel = JupyterKernelConfig.DeserializeJupyterKernelConfig(property.Value, options); - continue; - } additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } additionalProperties = additionalPropertiesDictionary; @@ -215,7 +200,6 @@ internal static CustomService DeserializeCustomService(JsonElement element, Mode docker, endpoints ?? new ChangeTrackingList(), volumes ?? new ChangeTrackingList(), - kernel, additionalProperties); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.cs index 79b4d17819364..f0396ea418bd3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomService.cs @@ -29,9 +29,8 @@ public CustomService() /// Describes the docker settings for the image. /// Configuring the endpoints for the container. /// Configuring the volumes for the container. - /// Describes the jupyter kernel settings for the image if its a custom environment. /// Additional Properties. - internal CustomService(string name, ImageSetting image, IDictionary environmentVariables, DockerSetting docker, IList endpoints, IList volumes, JupyterKernelConfig kernel, IDictionary additionalProperties) + internal CustomService(string name, ImageSetting image, IDictionary environmentVariables, DockerSetting docker, IList endpoints, IList volumes, IDictionary additionalProperties) { Name = name; Image = image; @@ -39,7 +38,6 @@ internal CustomService(string name, ImageSetting image, IDictionary Endpoints { get; } /// Configuring the volumes for the container. public IList Volumes { get; } - /// Describes the jupyter kernel settings for the image if its a custom environment. - public JupyterKernelConfig Kernel { get; set; } /// /// Additional Properties /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.Serialization.cs index ce51456bbe87a..7cf386121a9e5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.Serialization.cs @@ -26,17 +26,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteStartObject(); - if (Optional.IsDefined(ClientId)) + if (Optional.IsDefined(SamplingRate)) { - if (ClientId != null) - { - writer.WritePropertyName("clientId"u8); - writer.WriteStringValue(ClientId); - } - else - { - writer.WriteNull("clientId"); - } + writer.WritePropertyName("samplingRate"u8); + writer.WriteNumberValue(SamplingRate.Value); } if (Optional.IsDefined(DataCollectionMode)) { @@ -55,10 +48,17 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteNull("dataId"); } } - if (Optional.IsDefined(SamplingRate)) + if (Optional.IsDefined(ClientId)) { - writer.WritePropertyName("samplingRate"u8); - writer.WriteNumberValue(SamplingRate.Value); + if (ClientId != null) + { + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); + } + else + { + writer.WriteNull("clientId"); + } } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -98,22 +98,21 @@ internal static DataCollectionConfiguration DeserializeDataCollectionConfigurati { return null; } - string clientId = default; + double? samplingRate = default; DataCollectionMode? dataCollectionMode = default; string dataId = default; - double? samplingRate = default; + string clientId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("clientId"u8)) + if (property.NameEquals("samplingRate"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - clientId = null; continue; } - clientId = property.Value.GetString(); + samplingRate = property.Value.GetDouble(); continue; } if (property.NameEquals("dataCollectionMode"u8)) @@ -135,13 +134,14 @@ internal static DataCollectionConfiguration DeserializeDataCollectionConfigurati dataId = property.Value.GetString(); continue; } - if (property.NameEquals("samplingRate"u8)) + if (property.NameEquals("clientId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + clientId = null; continue; } - samplingRate = property.Value.GetDouble(); + clientId = property.Value.GetString(); continue; } if (options.Format != "W") @@ -150,7 +150,7 @@ internal static DataCollectionConfiguration DeserializeDataCollectionConfigurati } } serializedAdditionalRawData = rawDataDictionary; - return new DataCollectionConfiguration(clientId, dataCollectionMode, dataId, samplingRate, serializedAdditionalRawData); + return new DataCollectionConfiguration(samplingRate, dataCollectionMode, dataId, clientId, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.cs index 9f3f4acb78f23..5f28fffeb7331 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollectionConfiguration.cs @@ -51,27 +51,27 @@ public DataCollectionConfiguration() } /// Initializes a new instance of . - /// The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity to auth. + /// The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. /// Enable or disable data collection. /// The data asset arm resource id. Client side will ensure data asset is pointing to the blob storage, and backend will collect data to the blob storage. - /// The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. + /// The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity to auth. /// Keeps track of any properties unknown to the library. - internal DataCollectionConfiguration(string clientId, DataCollectionMode? dataCollectionMode, string dataId, double? samplingRate, IDictionary serializedAdditionalRawData) + internal DataCollectionConfiguration(double? samplingRate, DataCollectionMode? dataCollectionMode, string dataId, string clientId, IDictionary serializedAdditionalRawData) { - ClientId = clientId; + SamplingRate = samplingRate; DataCollectionMode = dataCollectionMode; DataId = dataId; - SamplingRate = samplingRate; + ClientId = clientId; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity to auth. - public string ClientId { get; set; } + /// The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. + public double? SamplingRate { get; set; } /// Enable or disable data collection. public DataCollectionMode? DataCollectionMode { get; set; } /// The data asset arm resource id. Client side will ensure data asset is pointing to the blob storage, and backend will collect data to the blob storage. public string DataId { get; set; } - /// The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. - public double? SamplingRate { get; set; } + /// The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity to auth. + public string ClientId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.Serialization.cs index 1291910bd7e0f..b3e233a4b0448 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.Serialization.cs @@ -34,6 +34,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WriteObjectValue(item.Value, options); } writer.WriteEndObject(); + if (Optional.IsDefined(RollingRate)) + { + writer.WritePropertyName("rollingRate"u8); + writer.WriteStringValue(RollingRate.Value.ToString()); + } if (Optional.IsDefined(RequestLogging)) { if (RequestLogging != null) @@ -46,11 +51,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WriteNull("requestLogging"); } } - if (Optional.IsDefined(RollingRate)) - { - writer.WritePropertyName("rollingRate"u8); - writer.WriteStringValue(RollingRate.Value.ToString()); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -90,8 +90,8 @@ internal static DataCollector DeserializeDataCollector(JsonElement element, Mode return null; } IDictionary collections = default; - RequestLogging requestLogging = default; RollingRateType? rollingRate = default; + RequestLogging requestLogging = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -106,23 +106,23 @@ internal static DataCollector DeserializeDataCollector(JsonElement element, Mode collections = dictionary; continue; } - if (property.NameEquals("requestLogging"u8)) + if (property.NameEquals("rollingRate"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - requestLogging = null; continue; } - requestLogging = RequestLogging.DeserializeRequestLogging(property.Value, options); + rollingRate = new RollingRateType(property.Value.GetString()); continue; } - if (property.NameEquals("rollingRate"u8)) + if (property.NameEquals("requestLogging"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + requestLogging = null; continue; } - rollingRate = new RollingRateType(property.Value.GetString()); + requestLogging = RequestLogging.DeserializeRequestLogging(property.Value, options); continue; } if (options.Format != "W") @@ -131,7 +131,7 @@ internal static DataCollector DeserializeDataCollector(JsonElement element, Mode } } serializedAdditionalRawData = rawDataDictionary; - return new DataCollector(collections, requestLogging, rollingRate, serializedAdditionalRawData); + return new DataCollector(collections, rollingRate, requestLogging, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.cs index fbc079d886e45..212f69a64b73a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataCollector.cs @@ -63,19 +63,19 @@ public DataCollector(IDictionary collection /// [Required] The collection configuration. Each collection has it own configuration to collect model data and the name of collection can be arbitrary string. /// Model data collector can be used for either payload logging or custom logging or both of them. Collection request and response are reserved for payload logging, others are for custom logging. /// - /// The request logging configuration for mdc, it includes advanced logging settings for all collections. It's optional. /// /// When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of them in a single blob file. /// If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. /// If it's day, all data will be collected in blob path /yyyy/MM/dd/. /// The other benefit of rolling path is that model monitoring ui is able to select a time range of data very quickly. /// + /// The request logging configuration for mdc, it includes advanced logging settings for all collections. It's optional. /// Keeps track of any properties unknown to the library. - internal DataCollector(IDictionary collections, RequestLogging requestLogging, RollingRateType? rollingRate, IDictionary serializedAdditionalRawData) + internal DataCollector(IDictionary collections, RollingRateType? rollingRate, RequestLogging requestLogging, IDictionary serializedAdditionalRawData) { Collections = collections; - RequestLogging = requestLogging; RollingRate = rollingRate; + RequestLogging = requestLogging; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -89,6 +89,13 @@ internal DataCollector() /// Model data collector can be used for either payload logging or custom logging or both of them. Collection request and response are reserved for payload logging, others are for custom logging. /// public IDictionary Collections { get; } + /// + /// When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of them in a single blob file. + /// If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. + /// If it's day, all data will be collected in blob path /yyyy/MM/dd/. + /// The other benefit of rolling path is that model monitoring ui is able to select a time range of data very quickly. + /// + public RollingRateType? RollingRate { get; set; } /// The request logging configuration for mdc, it includes advanced logging settings for all collections. It's optional. internal RequestLogging RequestLogging { get; set; } /// For payload logging, we only collect payload by default. If customers also want to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers along with payload. @@ -102,13 +109,5 @@ public IList RequestLoggingCaptureHeaders RequestLogging.CaptureHeaders = value; } } - - /// - /// When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of them in a single blob file. - /// If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. - /// If it's day, all data will be collected in blob path /yyyy/MM/dd/. - /// The other benefit of rolling path is that model monitoring ui is able to select a time range of data very quickly. - /// - public RollingRateType? RollingRate { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerResourceArmPaginatedResult.Serialization.cs index 4627db1253540..f68ec9cfab91b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter wr } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter wr } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static DataContainerResourceArmPaginatedResult DeserializeDataContainer { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static DataContainerResourceArmPaginatedResult DeserializeDataContainer 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 DataContainerResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new DataContainerResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerResourceArmPaginatedResult.cs index 878dfb2ea47c4..fe5523ffc26b3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal DataContainerResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of DataContainer objects. If null, there are no additional pages. /// An array of objects of type DataContainer. + /// The link to the next page of DataContainer objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal DataContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal DataContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of DataContainer objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type DataContainer. public IReadOnlyList Value { get; } + /// The link to the next page of DataContainer objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.Serialization.cs index 6b0025c155159..e2e1ec0da54a5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.Serialization.cs @@ -26,22 +26,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteStartObject(); - if (Optional.IsCollectionDefined(FeatureDataTypeOverride)) + if (Optional.IsDefined(Features)) { - if (FeatureDataTypeOverride != null) + if (Features != null) { - writer.WritePropertyName("featureDataTypeOverride"u8); - writer.WriteStartObject(); - foreach (var item in FeatureDataTypeOverride) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value.ToString()); - } - writer.WriteEndObject(); + writer.WritePropertyName("features"u8); + writer.WriteObjectValue(Features, options); } else { - writer.WriteNull("featureDataTypeOverride"); + writer.WriteNull("features"); } } if (Optional.IsDefined(FeatureImportanceSettings)) @@ -56,18 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNull("featureImportanceSettings"); } } - if (Optional.IsDefined(Features)) - { - if (Features != null) - { - writer.WritePropertyName("features"u8); - writer.WriteObjectValue(Features, options); - } - else - { - writer.WriteNull("features"); - } - } writer.WritePropertyName("metricThresholds"u8); writer.WriteStartArray(); foreach (var item in MetricThresholds) @@ -79,6 +61,26 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteObjectValue(ProductionData, options); writer.WritePropertyName("referenceData"u8); writer.WriteObjectValue(ReferenceData, options); + if (Optional.IsCollectionDefined(FeatureDataTypeOverride)) + { + if (FeatureDataTypeOverride != null) + { + writer.WritePropertyName("featureDataTypeOverride"u8); + writer.WriteStartObject(); + foreach (var item in FeatureDataTypeOverride) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value.ToString()); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("featureDataTypeOverride"); + } + } + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); if (Optional.IsCollectionDefined(NotificationTypes)) { if (NotificationTypes != null) @@ -114,8 +116,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNull("properties"); } } - writer.WritePropertyName("signalType"u8); - writer.WriteStringValue(SignalType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -154,32 +154,27 @@ internal static DataDriftMonitoringSignal DeserializeDataDriftMonitoringSignal(J { return null; } - IDictionary featureDataTypeOverride = default; - FeatureImportanceSettings featureImportanceSettings = default; MonitoringFeatureFilterBase features = default; + FeatureImportanceSettings featureImportanceSettings = default; IList metricThresholds = default; MonitoringInputDataBase productionData = default; MonitoringInputDataBase referenceData = default; + IDictionary featureDataTypeOverride = default; + MonitoringSignalType signalType = default; IList notificationTypes = default; IDictionary properties = default; - MonitoringSignalType signalType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("featureDataTypeOverride"u8)) + if (property.NameEquals("features"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - featureDataTypeOverride = null; + features = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, new MonitoringFeatureDataType(property0.Value.GetString())); - } - featureDataTypeOverride = dictionary; + features = MonitoringFeatureFilterBase.DeserializeMonitoringFeatureFilterBase(property.Value, options); continue; } if (property.NameEquals("featureImportanceSettings"u8)) @@ -192,16 +187,6 @@ internal static DataDriftMonitoringSignal DeserializeDataDriftMonitoringSignal(J featureImportanceSettings = FeatureImportanceSettings.DeserializeFeatureImportanceSettings(property.Value, options); continue; } - if (property.NameEquals("features"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - features = null; - continue; - } - features = MonitoringFeatureFilterBase.DeserializeMonitoringFeatureFilterBase(property.Value, options); - continue; - } if (property.NameEquals("metricThresholds"u8)) { List array = new List(); @@ -222,6 +207,26 @@ internal static DataDriftMonitoringSignal DeserializeDataDriftMonitoringSignal(J referenceData = MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property.Value, options); continue; } + if (property.NameEquals("featureDataTypeOverride"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + featureDataTypeOverride = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, new MonitoringFeatureDataType(property0.Value.GetString())); + } + featureDataTypeOverride = dictionary; + continue; + } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } if (property.NameEquals("notificationTypes"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -252,11 +257,6 @@ internal static DataDriftMonitoringSignal DeserializeDataDriftMonitoringSignal(J properties = dictionary; continue; } - if (property.NameEquals("signalType"u8)) - { - signalType = new MonitoringSignalType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -264,16 +264,16 @@ internal static DataDriftMonitoringSignal DeserializeDataDriftMonitoringSignal(J } serializedAdditionalRawData = rawDataDictionary; return new DataDriftMonitoringSignal( + signalType, notificationTypes ?? new ChangeTrackingList(), properties ?? new ChangeTrackingDictionary(), - signalType, serializedAdditionalRawData, - featureDataTypeOverride ?? new ChangeTrackingDictionary(), - featureImportanceSettings, features, + featureImportanceSettings, metricThresholds, productionData, - referenceData); + referenceData, + featureDataTypeOverride ?? new ChangeTrackingDictionary()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.cs index b12edc740dd84..2700f186cf019 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataDriftMonitoringSignal.cs @@ -37,25 +37,24 @@ public DataDriftMonitoringSignal(IEnumerable metri Argument.AssertNotNull(productionData, nameof(productionData)); Argument.AssertNotNull(referenceData, nameof(referenceData)); - FeatureDataTypeOverride = new ChangeTrackingDictionary(); MetricThresholds = metricThresholds.ToList(); ProductionData = productionData; ReferenceData = referenceData; + FeatureDataTypeOverride = new ChangeTrackingDictionary(); SignalType = MonitoringSignalType.DataDrift; } /// Initializes a new instance of . + /// [Required] Specifies the type of signal to monitor. /// The current notification mode for this signal. /// Property dictionary. Properties can be added, but not removed or altered. - /// [Required] Specifies the type of signal to monitor. /// Keeps track of any properties unknown to the library. - /// A dictionary that maps feature names to their respective data types. - /// The settings for computing feature importance. /// /// The feature filter which identifies which feature to calculate drift over. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// + /// The settings for computing feature importance. /// /// [Required] A list of metrics to calculate and their associated thresholds. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -71,14 +70,15 @@ public DataDriftMonitoringSignal(IEnumerable metri /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - internal DataDriftMonitoringSignal(IList notificationTypes, IDictionary properties, MonitoringSignalType signalType, IDictionary serializedAdditionalRawData, IDictionary featureDataTypeOverride, FeatureImportanceSettings featureImportanceSettings, MonitoringFeatureFilterBase features, IList metricThresholds, MonitoringInputDataBase productionData, MonitoringInputDataBase referenceData) : base(notificationTypes, properties, signalType, serializedAdditionalRawData) + /// A dictionary that maps feature names to their respective data types. + internal DataDriftMonitoringSignal(MonitoringSignalType signalType, IList notificationTypes, IDictionary properties, IDictionary serializedAdditionalRawData, MonitoringFeatureFilterBase features, FeatureImportanceSettings featureImportanceSettings, IList metricThresholds, MonitoringInputDataBase productionData, MonitoringInputDataBase referenceData, IDictionary featureDataTypeOverride) : base(signalType, notificationTypes, properties, serializedAdditionalRawData) { - FeatureDataTypeOverride = featureDataTypeOverride; - FeatureImportanceSettings = featureImportanceSettings; Features = features; + FeatureImportanceSettings = featureImportanceSettings; MetricThresholds = metricThresholds; ProductionData = productionData; ReferenceData = referenceData; + FeatureDataTypeOverride = featureDataTypeOverride; SignalType = signalType; } @@ -87,16 +87,14 @@ internal DataDriftMonitoringSignal() { } - /// A dictionary that maps feature names to their respective data types. - public IDictionary FeatureDataTypeOverride { get; set; } - /// The settings for computing feature importance. - public FeatureImportanceSettings FeatureImportanceSettings { get; set; } /// /// The feature filter which identifies which feature to calculate drift over. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// public MonitoringFeatureFilterBase Features { get; set; } + /// The settings for computing feature importance. + public FeatureImportanceSettings FeatureImportanceSettings { get; set; } /// /// [Required] A list of metrics to calculate and their associated thresholds. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -115,5 +113,7 @@ internal DataDriftMonitoringSignal() /// The available derived classes include , and . /// public MonitoringInputDataBase ReferenceData { get; set; } + /// A dictionary that maps feature names to their respective data types. + public IDictionary FeatureDataTypeOverride { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.Serialization.cs index a306c83986c8c..57c583c946f68 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.Serialization.cs @@ -26,22 +26,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteStartObject(); - if (Optional.IsCollectionDefined(FeatureDataTypeOverride)) + if (Optional.IsDefined(Features)) { - if (FeatureDataTypeOverride != null) + if (Features != null) { - writer.WritePropertyName("featureDataTypeOverride"u8); - writer.WriteStartObject(); - foreach (var item in FeatureDataTypeOverride) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value.ToString()); - } - writer.WriteEndObject(); + writer.WritePropertyName("features"u8); + writer.WriteObjectValue(Features, options); } else { - writer.WriteNull("featureDataTypeOverride"); + writer.WriteNull("features"); } } if (Optional.IsDefined(FeatureImportanceSettings)) @@ -56,18 +50,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteNull("featureImportanceSettings"); } } - if (Optional.IsDefined(Features)) - { - if (Features != null) - { - writer.WritePropertyName("features"u8); - writer.WriteObjectValue(Features, options); - } - else - { - writer.WriteNull("features"); - } - } writer.WritePropertyName("metricThresholds"u8); writer.WriteStartArray(); foreach (var item in MetricThresholds) @@ -79,6 +61,26 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteObjectValue(ProductionData, options); writer.WritePropertyName("referenceData"u8); writer.WriteObjectValue(ReferenceData, options); + if (Optional.IsCollectionDefined(FeatureDataTypeOverride)) + { + if (FeatureDataTypeOverride != null) + { + writer.WritePropertyName("featureDataTypeOverride"u8); + writer.WriteStartObject(); + foreach (var item in FeatureDataTypeOverride) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value.ToString()); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("featureDataTypeOverride"); + } + } + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); if (Optional.IsCollectionDefined(NotificationTypes)) { if (NotificationTypes != null) @@ -114,8 +116,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteNull("properties"); } } - writer.WritePropertyName("signalType"u8); - writer.WriteStringValue(SignalType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -154,32 +154,27 @@ internal static DataQualityMonitoringSignal DeserializeDataQualityMonitoringSign { return null; } - IDictionary featureDataTypeOverride = default; - FeatureImportanceSettings featureImportanceSettings = default; MonitoringFeatureFilterBase features = default; + FeatureImportanceSettings featureImportanceSettings = default; IList metricThresholds = default; MonitoringInputDataBase productionData = default; MonitoringInputDataBase referenceData = default; + IDictionary featureDataTypeOverride = default; + MonitoringSignalType signalType = default; IList notificationTypes = default; IDictionary properties = default; - MonitoringSignalType signalType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("featureDataTypeOverride"u8)) + if (property.NameEquals("features"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - featureDataTypeOverride = null; + features = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, new MonitoringFeatureDataType(property0.Value.GetString())); - } - featureDataTypeOverride = dictionary; + features = MonitoringFeatureFilterBase.DeserializeMonitoringFeatureFilterBase(property.Value, options); continue; } if (property.NameEquals("featureImportanceSettings"u8)) @@ -192,16 +187,6 @@ internal static DataQualityMonitoringSignal DeserializeDataQualityMonitoringSign featureImportanceSettings = FeatureImportanceSettings.DeserializeFeatureImportanceSettings(property.Value, options); continue; } - if (property.NameEquals("features"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - features = null; - continue; - } - features = MonitoringFeatureFilterBase.DeserializeMonitoringFeatureFilterBase(property.Value, options); - continue; - } if (property.NameEquals("metricThresholds"u8)) { List array = new List(); @@ -222,6 +207,26 @@ internal static DataQualityMonitoringSignal DeserializeDataQualityMonitoringSign referenceData = MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property.Value, options); continue; } + if (property.NameEquals("featureDataTypeOverride"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + featureDataTypeOverride = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, new MonitoringFeatureDataType(property0.Value.GetString())); + } + featureDataTypeOverride = dictionary; + continue; + } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } if (property.NameEquals("notificationTypes"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -252,11 +257,6 @@ internal static DataQualityMonitoringSignal DeserializeDataQualityMonitoringSign properties = dictionary; continue; } - if (property.NameEquals("signalType"u8)) - { - signalType = new MonitoringSignalType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -264,16 +264,16 @@ internal static DataQualityMonitoringSignal DeserializeDataQualityMonitoringSign } serializedAdditionalRawData = rawDataDictionary; return new DataQualityMonitoringSignal( + signalType, notificationTypes ?? new ChangeTrackingList(), properties ?? new ChangeTrackingDictionary(), - signalType, serializedAdditionalRawData, - featureDataTypeOverride ?? new ChangeTrackingDictionary(), - featureImportanceSettings, features, + featureImportanceSettings, metricThresholds, productionData, - referenceData); + referenceData, + featureDataTypeOverride ?? new ChangeTrackingDictionary()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.cs index c33c8b7923324..17ce3cd36cb4c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataQualityMonitoringSignal.cs @@ -37,25 +37,24 @@ public DataQualityMonitoringSignal(IEnumerable m Argument.AssertNotNull(productionData, nameof(productionData)); Argument.AssertNotNull(referenceData, nameof(referenceData)); - FeatureDataTypeOverride = new ChangeTrackingDictionary(); MetricThresholds = metricThresholds.ToList(); ProductionData = productionData; ReferenceData = referenceData; + FeatureDataTypeOverride = new ChangeTrackingDictionary(); SignalType = MonitoringSignalType.DataQuality; } /// Initializes a new instance of . + /// [Required] Specifies the type of signal to monitor. /// The current notification mode for this signal. /// Property dictionary. Properties can be added, but not removed or altered. - /// [Required] Specifies the type of signal to monitor. /// Keeps track of any properties unknown to the library. - /// A dictionary that maps feature names to their respective data types. - /// The settings for computing feature importance. /// /// The features to calculate drift over. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// + /// The settings for computing feature importance. /// /// [Required] A list of metrics to calculate and their associated thresholds. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -71,14 +70,15 @@ public DataQualityMonitoringSignal(IEnumerable m /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - internal DataQualityMonitoringSignal(IList notificationTypes, IDictionary properties, MonitoringSignalType signalType, IDictionary serializedAdditionalRawData, IDictionary featureDataTypeOverride, FeatureImportanceSettings featureImportanceSettings, MonitoringFeatureFilterBase features, IList metricThresholds, MonitoringInputDataBase productionData, MonitoringInputDataBase referenceData) : base(notificationTypes, properties, signalType, serializedAdditionalRawData) + /// A dictionary that maps feature names to their respective data types. + internal DataQualityMonitoringSignal(MonitoringSignalType signalType, IList notificationTypes, IDictionary properties, IDictionary serializedAdditionalRawData, MonitoringFeatureFilterBase features, FeatureImportanceSettings featureImportanceSettings, IList metricThresholds, MonitoringInputDataBase productionData, MonitoringInputDataBase referenceData, IDictionary featureDataTypeOverride) : base(signalType, notificationTypes, properties, serializedAdditionalRawData) { - FeatureDataTypeOverride = featureDataTypeOverride; - FeatureImportanceSettings = featureImportanceSettings; Features = features; + FeatureImportanceSettings = featureImportanceSettings; MetricThresholds = metricThresholds; ProductionData = productionData; ReferenceData = referenceData; + FeatureDataTypeOverride = featureDataTypeOverride; SignalType = signalType; } @@ -87,16 +87,14 @@ internal DataQualityMonitoringSignal() { } - /// A dictionary that maps feature names to their respective data types. - public IDictionary FeatureDataTypeOverride { get; set; } - /// The settings for computing feature importance. - public FeatureImportanceSettings FeatureImportanceSettings { get; set; } /// /// The features to calculate drift over. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// public MonitoringFeatureFilterBase Features { get; set; } + /// The settings for computing feature importance. + public FeatureImportanceSettings FeatureImportanceSettings { get; set; } /// /// [Required] A list of metrics to calculate and their associated thresholds. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -115,5 +113,7 @@ internal DataQualityMonitoringSignal() /// The available derived classes include , and . /// public MonitoringInputDataBase ReferenceData { get; set; } + /// A dictionary that maps feature names to their respective data types. + public IDictionary FeatureDataTypeOverride { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.Serialization.cs index cdfb0b52159a7..61f255b3614bf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static DataVersionBaseResourceArmPaginatedResult DeserializeDataVersion { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static DataVersionBaseResourceArmPaginatedResult DeserializeDataVersion 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 DataVersionBaseResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new DataVersionBaseResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.cs index 112282bc5b755..685623e1e50d4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal DataVersionBaseResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of DataVersionBase objects. If null, there are no additional pages. /// An array of objects of type DataVersionBase. + /// The link to the next page of DataVersionBase objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal DataVersionBaseResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal DataVersionBaseResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of DataVersionBase objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type DataVersionBase. public IReadOnlyList Value { get; } + /// The link to the next page of DataVersionBase objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreResourceArmPaginatedResult.Serialization.cs index 363ad9fefe8f5..b7d5fffc49093 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter writer } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static DatastoreResourceArmPaginatedResult DeserializeDatastoreResource { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static DatastoreResourceArmPaginatedResult DeserializeDatastoreResource 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 DatastoreResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new DatastoreResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreResourceArmPaginatedResult.cs index 8f12494e7935e..a644ade134f67 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal DatastoreResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of Datastore objects. If null, there are no additional pages. /// An array of objects of type Datastore. + /// The link to the next page of Datastore objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal DatastoreResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal DatastoreResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of Datastore objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type Datastore. public IReadOnlyList Value { get; } + /// The link to the next page of Datastore objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DefaultResourceProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DefaultResourceProvisioningState.cs deleted file mode 100644 index 86281efb3fc5e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DefaultResourceProvisioningState.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The DefaultResourceProvisioningState. - public readonly partial struct DefaultResourceProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DefaultResourceProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotStartedValue = "NotStarted"; - private const string FailedValue = "Failed"; - private const string CreatingValue = "Creating"; - private const string UpdatingValue = "Updating"; - private const string SucceededValue = "Succeeded"; - private const string DeletingValue = "Deleting"; - private const string AcceptedValue = "Accepted"; - private const string CanceledValue = "Canceled"; - private const string ScalingValue = "Scaling"; - private const string DisabledValue = "Disabled"; - - /// NotStarted. - public static DefaultResourceProvisioningState NotStarted { get; } = new DefaultResourceProvisioningState(NotStartedValue); - /// Failed. - public static DefaultResourceProvisioningState Failed { get; } = new DefaultResourceProvisioningState(FailedValue); - /// Creating. - public static DefaultResourceProvisioningState Creating { get; } = new DefaultResourceProvisioningState(CreatingValue); - /// Updating. - public static DefaultResourceProvisioningState Updating { get; } = new DefaultResourceProvisioningState(UpdatingValue); - /// Succeeded. - public static DefaultResourceProvisioningState Succeeded { get; } = new DefaultResourceProvisioningState(SucceededValue); - /// Deleting. - public static DefaultResourceProvisioningState Deleting { get; } = new DefaultResourceProvisioningState(DeletingValue); - /// Accepted. - public static DefaultResourceProvisioningState Accepted { get; } = new DefaultResourceProvisioningState(AcceptedValue); - /// Canceled. - public static DefaultResourceProvisioningState Canceled { get; } = new DefaultResourceProvisioningState(CanceledValue); - /// Scaling. - public static DefaultResourceProvisioningState Scaling { get; } = new DefaultResourceProvisioningState(ScalingValue); - /// Disabled. - public static DefaultResourceProvisioningState Disabled { get; } = new DefaultResourceProvisioningState(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(DefaultResourceProvisioningState left, DefaultResourceProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DefaultResourceProvisioningState left, DefaultResourceProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DefaultResourceProvisioningState(string value) => new DefaultResourceProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DefaultResourceProvisioningState other && Equals(other); - /// - public bool Equals(DefaultResourceProvisioningState 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentModelVersionUpgradeOption.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentModelVersionUpgradeOption.cs deleted file mode 100644 index 71e8365741da1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentModelVersionUpgradeOption.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Deployment model version upgrade option. - public readonly partial struct DeploymentModelVersionUpgradeOption : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DeploymentModelVersionUpgradeOption(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string OnceNewDefaultVersionAvailableValue = "OnceNewDefaultVersionAvailable"; - private const string OnceCurrentVersionExpiredValue = "OnceCurrentVersionExpired"; - private const string NoAutoUpgradeValue = "NoAutoUpgrade"; - - /// OnceNewDefaultVersionAvailable. - public static DeploymentModelVersionUpgradeOption OnceNewDefaultVersionAvailable { get; } = new DeploymentModelVersionUpgradeOption(OnceNewDefaultVersionAvailableValue); - /// OnceCurrentVersionExpired. - public static DeploymentModelVersionUpgradeOption OnceCurrentVersionExpired { get; } = new DeploymentModelVersionUpgradeOption(OnceCurrentVersionExpiredValue); - /// NoAutoUpgrade. - public static DeploymentModelVersionUpgradeOption NoAutoUpgrade { get; } = new DeploymentModelVersionUpgradeOption(NoAutoUpgradeValue); - /// Determines if two values are the same. - public static bool operator ==(DeploymentModelVersionUpgradeOption left, DeploymentModelVersionUpgradeOption right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DeploymentModelVersionUpgradeOption left, DeploymentModelVersionUpgradeOption right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DeploymentModelVersionUpgradeOption(string value) => new DeploymentModelVersionUpgradeOption(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DeploymentModelVersionUpgradeOption other && Equals(other); - /// - public bool Equals(DeploymentModelVersionUpgradeOption 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DestinationAsset.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DestinationAsset.Serialization.cs index df0e662e5b33b..ffd7cb8aa44ff 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DestinationAsset.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DestinationAsset.Serialization.cs @@ -26,6 +26,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } writer.WriteStartObject(); + if (Optional.IsDefined(RegistryName)) + { + if (RegistryName != null) + { + writer.WritePropertyName("registryName"u8); + writer.WriteStringValue(RegistryName); + } + else + { + writer.WriteNull("registryName"); + } + } if (Optional.IsDefined(DestinationName)) { if (DestinationName != null) @@ -50,18 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteNull("destinationVersion"); } } - if (Optional.IsDefined(RegistryName)) - { - if (RegistryName != null) - { - writer.WritePropertyName("registryName"u8); - writer.WriteStringValue(RegistryName); - } - else - { - writer.WriteNull("registryName"); - } - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -100,41 +100,41 @@ internal static DestinationAsset DeserializeDestinationAsset(JsonElement element { return null; } + string registryName = default; string destinationName = default; string destinationVersion = default; - string registryName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("destinationName"u8)) + if (property.NameEquals("registryName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - destinationName = null; + registryName = null; continue; } - destinationName = property.Value.GetString(); + registryName = property.Value.GetString(); continue; } - if (property.NameEquals("destinationVersion"u8)) + if (property.NameEquals("destinationName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - destinationVersion = null; + destinationName = null; continue; } - destinationVersion = property.Value.GetString(); + destinationName = property.Value.GetString(); continue; } - if (property.NameEquals("registryName"u8)) + if (property.NameEquals("destinationVersion"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - registryName = null; + destinationVersion = null; continue; } - registryName = property.Value.GetString(); + destinationVersion = property.Value.GetString(); continue; } if (options.Format != "W") @@ -143,7 +143,7 @@ internal static DestinationAsset DeserializeDestinationAsset(JsonElement element } } serializedAdditionalRawData = rawDataDictionary; - return new DestinationAsset(destinationName, destinationVersion, registryName, serializedAdditionalRawData); + return new DestinationAsset(registryName, destinationName, destinationVersion, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DestinationAsset.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DestinationAsset.cs index bece271ecb213..08b02d3d81d54 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DestinationAsset.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DestinationAsset.cs @@ -51,23 +51,23 @@ public DestinationAsset() } /// Initializes a new instance of . + /// Destination registry name. /// Destination asset name. /// Destination asset version. - /// Destination registry name. /// Keeps track of any properties unknown to the library. - internal DestinationAsset(string destinationName, string destinationVersion, string registryName, IDictionary serializedAdditionalRawData) + internal DestinationAsset(string registryName, string destinationName, string destinationVersion, IDictionary serializedAdditionalRawData) { + RegistryName = registryName; DestinationName = destinationName; DestinationVersion = destinationVersion; - RegistryName = registryName; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Destination registry name. + public string RegistryName { get; set; } /// Destination asset name. public string DestinationName { get; set; } /// Destination asset version. public string DestinationVersion { get; set; } - /// Destination registry name. - public string RegistryName { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerCredential.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerCredential.Serialization.cs index 7803315daf2e1..5551abe71d229 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerCredential.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerCredential.Serialization.cs @@ -26,28 +26,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } writer.WriteStartObject(); - if (Optional.IsDefined(Password)) + if (Optional.IsDefined(UserName)) { - if (Password != null) + if (UserName != null) { - writer.WritePropertyName("password"u8); - writer.WriteStringValue(Password); + writer.WritePropertyName("userName"u8); + writer.WriteStringValue(UserName); } else { - writer.WriteNull("password"); + writer.WriteNull("userName"); } } - if (Optional.IsDefined(UserName)) + if (Optional.IsDefined(Password)) { - if (UserName != null) + if (Password != null) { - writer.WritePropertyName("userName"u8); - writer.WriteStringValue(UserName); + writer.WritePropertyName("password"u8); + writer.WriteStringValue(Password); } else { - writer.WriteNull("userName"); + writer.WriteNull("password"); } } writer.WritePropertyName("credentialType"u8); @@ -90,31 +90,31 @@ internal static DockerCredential DeserializeDockerCredential(JsonElement element { return null; } - string password = default; string userName = default; + string password = default; DataReferenceCredentialType credentialType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("password"u8)) + if (property.NameEquals("userName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - password = null; + userName = null; continue; } - password = property.Value.GetString(); + userName = property.Value.GetString(); continue; } - if (property.NameEquals("userName"u8)) + if (property.NameEquals("password"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - userName = null; + password = null; continue; } - userName = property.Value.GetString(); + password = property.Value.GetString(); continue; } if (property.NameEquals("credentialType"u8)) @@ -128,7 +128,7 @@ internal static DockerCredential DeserializeDockerCredential(JsonElement element } } serializedAdditionalRawData = rawDataDictionary; - return new DockerCredential(credentialType, serializedAdditionalRawData, password, userName); + return new DockerCredential(credentialType, serializedAdditionalRawData, userName, password); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerCredential.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerCredential.cs index 6d43ca5bb6c33..a846adb226910 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerCredential.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerCredential.cs @@ -22,18 +22,18 @@ internal DockerCredential() /// Initializes a new instance of . /// [Required] Credential type used to authentication with storage. /// Keeps track of any properties unknown to the library. - /// DockerCredential user password. /// DockerCredential user name. - internal DockerCredential(DataReferenceCredentialType credentialType, IDictionary serializedAdditionalRawData, string password, string userName) : base(credentialType, serializedAdditionalRawData) + /// DockerCredential user password. + internal DockerCredential(DataReferenceCredentialType credentialType, IDictionary serializedAdditionalRawData, string userName, string password) : base(credentialType, serializedAdditionalRawData) { - Password = password; UserName = userName; + Password = password; CredentialType = credentialType; } - /// DockerCredential user password. - public string Password { get; } /// DockerCredential user name. public string UserName { get; } + /// DockerCredential user password. + public string Password { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerSetting.cs index b8a53dc5edd62..d78989621c8ae 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerSetting.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DockerSetting.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The DockerSetting. + /// Docker container configuration. public partial class DockerSetting { /// Initializes a new instance of . diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentModel.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentModel.Serialization.cs deleted file mode 100644 index 292c2d1cbcdff..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentModel.Serialization.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointDeploymentModel : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointDeploymentModel)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Format)) - { - writer.WritePropertyName("format"u8); - writer.WriteStringValue(Format); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Source)) - { - writer.WritePropertyName("source"u8); - writer.WriteStringValue(Source); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version); - } - 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 - } - } - writer.WriteEndObject(); - } - - EndpointDeploymentModel 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(EndpointDeploymentModel)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointDeploymentModel(document.RootElement, options); - } - - internal static EndpointDeploymentModel DeserializeEndpointDeploymentModel(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string format = default; - string name = default; - string source = default; - string version = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("format"u8)) - { - format = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("source"u8)) - { - source = property.Value.GetString(); - continue; - } - if (property.NameEquals("version"u8)) - { - version = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointDeploymentModel(format, name, source, version, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointDeploymentModel)} does not support writing '{options.Format}' format."); - } - } - - EndpointDeploymentModel 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 DeserializeEndpointDeploymentModel(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointDeploymentModel)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentModel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentModel.cs deleted file mode 100644 index 4e1d3dc918e34..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentModel.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EndpointDeploymentModel. - public partial class EndpointDeploymentModel - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public EndpointDeploymentModel() - { - } - - /// Initializes a new instance of . - /// Model format. - /// Model name. - /// Optional. Deployment model source ARM resource ID. - /// Model version. - /// Keeps track of any properties unknown to the library. - internal EndpointDeploymentModel(string format, string name, string source, string version, IDictionary serializedAdditionalRawData) - { - Format = format; - Name = name; - Source = source; - Version = version; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Model format. - public string Format { get; set; } - /// Model name. - public string Name { get; set; } - /// Optional. Deployment model source ARM resource ID. - public string Source { get; set; } - /// Model version. - public string Version { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentResourceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentResourceProperties.Serialization.cs deleted file mode 100644 index e18d89d0b9391..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentResourceProperties.Serialization.cs +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - [PersistableModelProxy(typeof(UnknownEndpointDeploymentResourceProperties))] - public partial class EndpointDeploymentResourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointDeploymentResourceProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(FailureReason)) - { - writer.WritePropertyName("failureReason"u8); - writer.WriteStringValue(FailureReason); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(EndpointDeploymentResourcePropertiesType); - 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 - } - } - writer.WriteEndObject(); - } - - EndpointDeploymentResourceProperties 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(EndpointDeploymentResourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointDeploymentResourceProperties(document.RootElement, options); - } - - internal static EndpointDeploymentResourceProperties DeserializeEndpointDeploymentResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Azure.ContentSafety": return ContentSafetyEndpointDeploymentResourceProperties.DeserializeContentSafetyEndpointDeploymentResourceProperties(element, options); - case "Azure.OpenAI": return OpenAIEndpointDeploymentResourceProperties.DeserializeOpenAIEndpointDeploymentResourceProperties(element, options); - case "Azure.Speech": return SpeechEndpointDeploymentResourceProperties.DeserializeSpeechEndpointDeploymentResourceProperties(element, options); - case "managedOnlineEndpoint": return ManagedOnlineEndpointDeploymentResourceProperties.DeserializeManagedOnlineEndpointDeploymentResourceProperties(element, options); - } - } - return UnknownEndpointDeploymentResourceProperties.DeserializeUnknownEndpointDeploymentResourceProperties(element, options); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointDeploymentResourceProperties)} does not support writing '{options.Format}' format."); - } - } - - EndpointDeploymentResourceProperties 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 DeserializeEndpointDeploymentResourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointDeploymentResourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentResourceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentResourceProperties.cs deleted file mode 100644 index 15de34853098b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentResourceProperties.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . - /// - public abstract partial class EndpointDeploymentResourceProperties - { - /// - /// 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 protected IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - protected EndpointDeploymentResourceProperties() - { - } - - /// Initializes a new instance of . - /// The failure reason if the creation failed. - /// Read-only provision state status property. - /// Kind of the deployment. - /// Keeps track of any properties unknown to the library. - internal EndpointDeploymentResourceProperties(string failureReason, DefaultResourceProvisioningState? provisioningState, string endpointDeploymentResourcePropertiesType, IDictionary serializedAdditionalRawData) - { - FailureReason = failureReason; - ProvisioningState = provisioningState; - EndpointDeploymentResourcePropertiesType = endpointDeploymentResourcePropertiesType; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The failure reason if the creation failed. - public string FailureReason { get; set; } - /// Read-only provision state status property. - public DefaultResourceProvisioningState? ProvisioningState { get; } - /// Kind of the deployment. - internal string EndpointDeploymentResourcePropertiesType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index 22be7b3575b8b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - 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" && _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 - } - } - writer.WriteEndObject(); - } - - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult 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(EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement, options); - } - - internal static EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string nextLink = default; - IReadOnlyList value = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - 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(EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(item, options)); - } - value = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult)} does not support writing '{options.Format}' format."); - } - } - - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult 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 DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.cs deleted file mode 100644 index 6dc73af1f1d14..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult. - internal partial class EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult - { - /// - /// 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 EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// - /// Keeps track of any properties unknown to the library. - internal EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) - { - NextLink = nextLink; - Value = value; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets the next link. - public string NextLink { get; } - /// Gets the value. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointKeys.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointKeys.Serialization.cs deleted file mode 100644 index a8b023c028a57..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointKeys.Serialization.cs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointKeys : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointKeys)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Keys)) - { - writer.WritePropertyName("keys"u8); - writer.WriteObjectValue(Keys, 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 - } - } - writer.WriteEndObject(); - } - - EndpointKeys 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(EndpointKeys)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointKeys(document.RootElement, options); - } - - internal static EndpointKeys DeserializeEndpointKeys(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AccountApiKeys keys = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("keys"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - keys = AccountApiKeys.DeserializeAccountApiKeys(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointKeys(keys, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointKeys)} does not support writing '{options.Format}' format."); - } - } - - EndpointKeys 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 DeserializeEndpointKeys(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointKeys)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointKeys.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointKeys.cs deleted file mode 100644 index e4909d100d654..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointKeys.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EndpointKeys. - public partial class EndpointKeys - { - /// - /// 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 EndpointKeys() - { - } - - /// Initializes a new instance of . - /// Dictionary of Keys for the endpoint. - /// Keeps track of any properties unknown to the library. - internal EndpointKeys(AccountApiKeys keys, IDictionary serializedAdditionalRawData) - { - Keys = keys; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Dictionary of Keys for the endpoint. - public AccountApiKeys Keys { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelDeprecationProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelDeprecationProperties.Serialization.cs deleted file mode 100644 index 237093c21ec16..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelDeprecationProperties.Serialization.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointModelDeprecationProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointModelDeprecationProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(FineTune)) - { - writer.WritePropertyName("fineTune"u8); - writer.WriteStringValue(FineTune.Value, "O"); - } - if (Optional.IsDefined(Inference)) - { - writer.WritePropertyName("inference"u8); - writer.WriteStringValue(Inference.Value, "O"); - } - 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 - } - } - writer.WriteEndObject(); - } - - EndpointModelDeprecationProperties 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(EndpointModelDeprecationProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointModelDeprecationProperties(document.RootElement, options); - } - - internal static EndpointModelDeprecationProperties DeserializeEndpointModelDeprecationProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DateTimeOffset? fineTune = default; - DateTimeOffset? inference = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("fineTune"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fineTune = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("inference"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inference = property.Value.GetDateTimeOffset("O"); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointModelDeprecationProperties(fineTune, inference, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointModelDeprecationProperties)} does not support writing '{options.Format}' format."); - } - } - - EndpointModelDeprecationProperties 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 DeserializeEndpointModelDeprecationProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointModelDeprecationProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelDeprecationProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelDeprecationProperties.cs deleted file mode 100644 index dd07142c21de8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelDeprecationProperties.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EndpointModelDeprecationProperties. - public partial class EndpointModelDeprecationProperties - { - /// - /// 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 EndpointModelDeprecationProperties() - { - } - - /// Initializes a new instance of . - /// The datetime of deprecation of the fineTune Model. - /// The datetime of deprecation of the inference Model. - /// Keeps track of any properties unknown to the library. - internal EndpointModelDeprecationProperties(DateTimeOffset? fineTune, DateTimeOffset? inference, IDictionary serializedAdditionalRawData) - { - FineTune = fineTune; - Inference = inference; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The datetime of deprecation of the fineTune Model. - public DateTimeOffset? FineTune { get; } - /// The datetime of deprecation of the inference Model. - public DateTimeOffset? Inference { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelProperties.Serialization.cs deleted file mode 100644 index 6b63c91cf7e41..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelProperties.Serialization.cs +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointModelProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointModelProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Capabilities)) - { - writer.WritePropertyName("capabilities"u8); - writer.WriteStartObject(); - foreach (var item in Capabilities) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Deprecation)) - { - writer.WritePropertyName("deprecation"u8); - writer.WriteObjectValue(Deprecation, options); - } - if (Optional.IsCollectionDefined(FinetuneCapabilities)) - { - writer.WritePropertyName("finetuneCapabilities"u8); - writer.WriteStartObject(); - foreach (var item in FinetuneCapabilities) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Format)) - { - writer.WritePropertyName("format"u8); - writer.WriteStringValue(Format); - } - if (Optional.IsDefined(IsDefaultVersion)) - { - writer.WritePropertyName("isDefaultVersion"u8); - writer.WriteBooleanValue(IsDefaultVersion.Value); - } - if (Optional.IsDefined(LifecycleStatus)) - { - writer.WritePropertyName("lifecycleStatus"u8); - writer.WriteStringValue(LifecycleStatus.Value.ToString()); - } - if (Optional.IsDefined(MaxCapacity)) - { - writer.WritePropertyName("maxCapacity"u8); - writer.WriteNumberValue(MaxCapacity.Value); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - 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" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version); - } - 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 - } - } - writer.WriteEndObject(); - } - - EndpointModelProperties 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(EndpointModelProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointModelProperties(document.RootElement, options); - } - - internal static EndpointModelProperties DeserializeEndpointModelProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyDictionary capabilities = default; - EndpointModelDeprecationProperties deprecation = default; - IReadOnlyDictionary finetuneCapabilities = default; - string format = default; - bool? isDefaultVersion = default; - ModelLifecycleStatus? lifecycleStatus = default; - int? maxCapacity = default; - string name = default; - IReadOnlyList skus = default; - SystemData systemData = default; - string version = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("capabilities"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - capabilities = dictionary; - continue; - } - if (property.NameEquals("deprecation"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deprecation = EndpointModelDeprecationProperties.DeserializeEndpointModelDeprecationProperties(property.Value, options); - continue; - } - if (property.NameEquals("finetuneCapabilities"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - finetuneCapabilities = dictionary; - continue; - } - if (property.NameEquals("format"u8)) - { - format = property.Value.GetString(); - continue; - } - if (property.NameEquals("isDefaultVersion"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isDefaultVersion = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("lifecycleStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lifecycleStatus = new ModelLifecycleStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("maxCapacity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxCapacity = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - 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(EndpointModelSkuProperties.DeserializeEndpointModelSkuProperties(item, options)); - } - skus = array; - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("version"u8)) - { - version = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointModelProperties( - capabilities ?? new ChangeTrackingDictionary(), - deprecation, - finetuneCapabilities ?? new ChangeTrackingDictionary(), - format, - isDefaultVersion, - lifecycleStatus, - maxCapacity, - name, - skus ?? new ChangeTrackingList(), - systemData, - version, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointModelProperties)} does not support writing '{options.Format}' format."); - } - } - - EndpointModelProperties 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 DeserializeEndpointModelProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointModelProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelProperties.cs deleted file mode 100644 index a3b90e45318de..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelProperties.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Endpoint Model properties. - public partial class EndpointModelProperties - { - /// - /// 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 EndpointModelProperties() - { - Capabilities = new ChangeTrackingDictionary(); - FinetuneCapabilities = new ChangeTrackingDictionary(); - Skus = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The capabilities. - /// - /// The capabilities for finetune models. - /// Deployment model format. - /// If the model is default version. - /// Model lifecycle status. - /// The max capacity. - /// Deployment model name. - /// The list of Model Sku. - /// Metadata pertaining to creation and last modification of the resource. - /// Optional. Deployment model version. If version is not specified, a default version will be assigned. The default version is different for different models and might change when there is new version available for a model. Default version for a model could be found from list models API. - /// Keeps track of any properties unknown to the library. - internal EndpointModelProperties(IReadOnlyDictionary capabilities, EndpointModelDeprecationProperties deprecation, IReadOnlyDictionary finetuneCapabilities, string format, bool? isDefaultVersion, ModelLifecycleStatus? lifecycleStatus, int? maxCapacity, string name, IReadOnlyList skus, SystemData systemData, string version, IDictionary serializedAdditionalRawData) - { - Capabilities = capabilities; - Deprecation = deprecation; - FinetuneCapabilities = finetuneCapabilities; - Format = format; - IsDefaultVersion = isDefaultVersion; - LifecycleStatus = lifecycleStatus; - MaxCapacity = maxCapacity; - Name = name; - Skus = skus; - SystemData = systemData; - Version = version; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The capabilities. - public IReadOnlyDictionary Capabilities { get; } - /// Gets the deprecation. - public EndpointModelDeprecationProperties Deprecation { get; } - /// The capabilities for finetune models. - public IReadOnlyDictionary FinetuneCapabilities { get; } - /// Deployment model format. - public string Format { get; } - /// If the model is default version. - public bool? IsDefaultVersion { get; } - /// Model lifecycle status. - public ModelLifecycleStatus? LifecycleStatus { get; } - /// The max capacity. - public int? MaxCapacity { get; } - /// Deployment model name. - public string Name { get; } - /// The list of Model Sku. - public IReadOnlyList Skus { get; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - /// Optional. Deployment model version. If version is not specified, a default version will be assigned. The default version is different for different models and might change when there is new version available for a model. Default version for a model could be found from list models API. - public string Version { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuCapacityProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuCapacityProperties.Serialization.cs deleted file mode 100644 index f3984d3369c3e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuCapacityProperties.Serialization.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointModelSkuCapacityProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointModelSkuCapacityProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Default)) - { - writer.WritePropertyName("default"u8); - writer.WriteNumberValue(Default.Value); - } - if (Optional.IsDefined(Maximum)) - { - writer.WritePropertyName("maximum"u8); - writer.WriteNumberValue(Maximum.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 - } - } - writer.WriteEndObject(); - } - - EndpointModelSkuCapacityProperties 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(EndpointModelSkuCapacityProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointModelSkuCapacityProperties(document.RootElement, options); - } - - internal static EndpointModelSkuCapacityProperties DeserializeEndpointModelSkuCapacityProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int? @default = default; - int? maximum = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("default"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - @default = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maximum"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maximum = property.Value.GetInt32(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointModelSkuCapacityProperties(@default, maximum, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointModelSkuCapacityProperties)} does not support writing '{options.Format}' format."); - } - } - - EndpointModelSkuCapacityProperties 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 DeserializeEndpointModelSkuCapacityProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointModelSkuCapacityProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuCapacityProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuCapacityProperties.cs deleted file mode 100644 index acdc267a87f2d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuCapacityProperties.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EndpointModelSkuCapacityProperties. - public partial class EndpointModelSkuCapacityProperties - { - /// - /// 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 EndpointModelSkuCapacityProperties() - { - } - - /// Initializes a new instance of . - /// The default capacity. - /// The maximum capacity. - /// Keeps track of any properties unknown to the library. - internal EndpointModelSkuCapacityProperties(int? @default, int? maximum, IDictionary serializedAdditionalRawData) - { - Default = @default; - Maximum = maximum; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The default capacity. - public int? Default { get; } - /// The maximum capacity. - public int? Maximum { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuProperties.Serialization.cs deleted file mode 100644 index 64bd30a6de0ed..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuProperties.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointModelSkuProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointModelSkuProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Capacity)) - { - writer.WritePropertyName("capacity"u8); - writer.WriteObjectValue(Capacity, options); - } - if (Optional.IsCollectionDefined(ConnectionIds)) - { - writer.WritePropertyName("connectionIds"u8); - writer.WriteStartArray(); - foreach (var item in ConnectionIds) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(DeprecationOn)) - { - writer.WritePropertyName("deprecationDate"u8); - writer.WriteStringValue(DeprecationOn.Value, "O"); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsCollectionDefined(RateLimits)) - { - writer.WritePropertyName("rateLimits"u8); - writer.WriteStartArray(); - foreach (var item in RateLimits) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(UsageName)) - { - writer.WritePropertyName("usageName"u8); - writer.WriteStringValue(UsageName); - } - 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 - } - } - writer.WriteEndObject(); - } - - EndpointModelSkuProperties 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(EndpointModelSkuProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointModelSkuProperties(document.RootElement, options); - } - - internal static EndpointModelSkuProperties DeserializeEndpointModelSkuProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - EndpointModelSkuCapacityProperties capacity = default; - IReadOnlyList connectionIds = default; - DateTimeOffset? deprecationDate = default; - string name = default; - IReadOnlyList rateLimits = default; - string usageName = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("capacity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - capacity = EndpointModelSkuCapacityProperties.DeserializeEndpointModelSkuCapacityProperties(property.Value, options); - continue; - } - if (property.NameEquals("connectionIds"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(new ResourceIdentifier(item.GetString())); - } - } - connectionIds = array; - continue; - } - if (property.NameEquals("deprecationDate"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - deprecationDate = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("rateLimits"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EndpointModelSkuRateLimitProperties.DeserializeEndpointModelSkuRateLimitProperties(item, options)); - } - rateLimits = array; - continue; - } - if (property.NameEquals("usageName"u8)) - { - usageName = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointModelSkuProperties( - capacity, - connectionIds ?? new ChangeTrackingList(), - deprecationDate, - name, - rateLimits ?? new ChangeTrackingList(), - usageName, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointModelSkuProperties)} does not support writing '{options.Format}' format."); - } - } - - EndpointModelSkuProperties 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 DeserializeEndpointModelSkuProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointModelSkuProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuProperties.cs deleted file mode 100644 index a66d13356c5e5..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuProperties.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EndpointModelSkuProperties. - public partial class EndpointModelSkuProperties - { - /// - /// 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 EndpointModelSkuProperties() - { - ConnectionIds = new ChangeTrackingList(); - RateLimits = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// The list of ARM id for the connection support this SKU. - /// The datetime of deprecation of the model SKU. - /// The name of the model SKU. - /// - /// The usage name of the model SKU. - /// Keeps track of any properties unknown to the library. - internal EndpointModelSkuProperties(EndpointModelSkuCapacityProperties capacity, IReadOnlyList connectionIds, DateTimeOffset? deprecationOn, string name, IReadOnlyList rateLimits, string usageName, IDictionary serializedAdditionalRawData) - { - Capacity = capacity; - ConnectionIds = connectionIds; - DeprecationOn = deprecationOn; - Name = name; - RateLimits = rateLimits; - UsageName = usageName; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets the capacity. - public EndpointModelSkuCapacityProperties Capacity { get; } - /// The list of ARM id for the connection support this SKU. - public IReadOnlyList ConnectionIds { get; } - /// The datetime of deprecation of the model SKU. - public DateTimeOffset? DeprecationOn { get; } - /// The name of the model SKU. - public string Name { get; } - /// Gets the rate limits. - public IReadOnlyList RateLimits { get; } - /// The usage name of the model SKU. - public string UsageName { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitProperties.Serialization.cs deleted file mode 100644 index c5881ffcc7cdb..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitProperties.Serialization.cs +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointModelSkuRateLimitProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointModelSkuRateLimitProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Count)) - { - writer.WritePropertyName("count"u8); - writer.WriteNumberValue(Count.Value); - } - if (Optional.IsDefined(RenewalPeriod)) - { - writer.WritePropertyName("renewalPeriod"u8); - writer.WriteNumberValue(RenewalPeriod.Value); - } - if (Optional.IsCollectionDefined(Rules)) - { - writer.WritePropertyName("rules"u8); - writer.WriteStartArray(); - foreach (var item in Rules) - { - 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 - } - } - writer.WriteEndObject(); - } - - EndpointModelSkuRateLimitProperties 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(EndpointModelSkuRateLimitProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointModelSkuRateLimitProperties(document.RootElement, options); - } - - internal static EndpointModelSkuRateLimitProperties DeserializeEndpointModelSkuRateLimitProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - float? count = default; - float? renewalPeriod = default; - IReadOnlyList rules = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("count"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - count = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("renewalPeriod"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - renewalPeriod = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("rules"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EndpointModelSkuRateLimitRuleProperties.DeserializeEndpointModelSkuRateLimitRuleProperties(item, options)); - } - rules = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointModelSkuRateLimitProperties(count, renewalPeriod, rules ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointModelSkuRateLimitProperties)} does not support writing '{options.Format}' format."); - } - } - - EndpointModelSkuRateLimitProperties 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 DeserializeEndpointModelSkuRateLimitProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointModelSkuRateLimitProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitProperties.cs deleted file mode 100644 index 2d3c8862689ae..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitProperties.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EndpointModelSkuRateLimitProperties. - public partial class EndpointModelSkuRateLimitProperties - { - /// - /// 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 EndpointModelSkuRateLimitProperties() - { - Rules = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The count value of Call Rate Limit. - /// The renewal period in seconds of Call Rate Limit. - /// The call rate limit for the model. - /// Keeps track of any properties unknown to the library. - internal EndpointModelSkuRateLimitProperties(float? count, float? renewalPeriod, IReadOnlyList rules, IDictionary serializedAdditionalRawData) - { - Count = count; - RenewalPeriod = renewalPeriod; - Rules = rules; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The count value of Call Rate Limit. - public float? Count { get; } - /// The renewal period in seconds of Call Rate Limit. - public float? RenewalPeriod { get; } - /// The call rate limit for the model. - public IReadOnlyList Rules { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitRulePatternProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitRulePatternProperties.Serialization.cs deleted file mode 100644 index ee3fd37ac487a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitRulePatternProperties.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointModelSkuRateLimitRulePatternProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointModelSkuRateLimitRulePatternProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Method)) - { - writer.WritePropertyName("method"u8); - writer.WriteStringValue(Method); - } - if (Optional.IsDefined(Path)) - { - writer.WritePropertyName("path"u8); - writer.WriteStringValue(Path); - } - 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 - } - } - writer.WriteEndObject(); - } - - EndpointModelSkuRateLimitRulePatternProperties 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(EndpointModelSkuRateLimitRulePatternProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointModelSkuRateLimitRulePatternProperties(document.RootElement, options); - } - - internal static EndpointModelSkuRateLimitRulePatternProperties DeserializeEndpointModelSkuRateLimitRulePatternProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string method = default; - string path = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("method"u8)) - { - method = property.Value.GetString(); - continue; - } - if (property.NameEquals("path"u8)) - { - path = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointModelSkuRateLimitRulePatternProperties(method, path, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointModelSkuRateLimitRulePatternProperties)} does not support writing '{options.Format}' format."); - } - } - - EndpointModelSkuRateLimitRulePatternProperties 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 DeserializeEndpointModelSkuRateLimitRulePatternProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointModelSkuRateLimitRulePatternProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitRulePatternProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitRulePatternProperties.cs deleted file mode 100644 index d29360a98c739..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitRulePatternProperties.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EndpointModelSkuRateLimitRulePatternProperties. - public partial class EndpointModelSkuRateLimitRulePatternProperties - { - /// - /// 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 EndpointModelSkuRateLimitRulePatternProperties() - { - } - - /// Initializes a new instance of . - /// - /// - /// Keeps track of any properties unknown to the library. - internal EndpointModelSkuRateLimitRulePatternProperties(string method, string path, IDictionary serializedAdditionalRawData) - { - Method = method; - Path = path; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets the method. - public string Method { get; } - /// Gets the path. - public string Path { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitRuleProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitRuleProperties.Serialization.cs deleted file mode 100644 index 7c8109967e7e6..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitRuleProperties.Serialization.cs +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointModelSkuRateLimitRuleProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointModelSkuRateLimitRuleProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Count)) - { - writer.WritePropertyName("count"u8); - writer.WriteNumberValue(Count.Value); - } - if (Optional.IsDefined(DynamicThrottlingEnabled)) - { - writer.WritePropertyName("dynamicThrottlingEnabled"u8); - writer.WriteBooleanValue(DynamicThrottlingEnabled.Value); - } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (Optional.IsCollectionDefined(MatchPatterns)) - { - writer.WritePropertyName("matchPatterns"u8); - writer.WriteStartArray(); - foreach (var item in MatchPatterns) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(MinCount)) - { - writer.WritePropertyName("minCount"u8); - writer.WriteNumberValue(MinCount.Value); - } - if (Optional.IsDefined(RenewalPeriod)) - { - writer.WritePropertyName("renewalPeriod"u8); - writer.WriteNumberValue(RenewalPeriod.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 - } - } - writer.WriteEndObject(); - } - - EndpointModelSkuRateLimitRuleProperties 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(EndpointModelSkuRateLimitRuleProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointModelSkuRateLimitRuleProperties(document.RootElement, options); - } - - internal static EndpointModelSkuRateLimitRuleProperties DeserializeEndpointModelSkuRateLimitRuleProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - float? count = default; - bool? dynamicThrottlingEnabled = default; - string key = default; - IReadOnlyList matchPatterns = default; - float? minCount = default; - float? renewalPeriod = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("count"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - count = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("dynamicThrottlingEnabled"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dynamicThrottlingEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("key"u8)) - { - key = property.Value.GetString(); - continue; - } - if (property.NameEquals("matchPatterns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EndpointModelSkuRateLimitRulePatternProperties.DeserializeEndpointModelSkuRateLimitRulePatternProperties(item, options)); - } - matchPatterns = array; - continue; - } - if (property.NameEquals("minCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - minCount = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("renewalPeriod"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - renewalPeriod = property.Value.GetSingle(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointModelSkuRateLimitRuleProperties( - count, - dynamicThrottlingEnabled, - key, - matchPatterns ?? new ChangeTrackingList(), - minCount, - renewalPeriod, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointModelSkuRateLimitRuleProperties)} does not support writing '{options.Format}' format."); - } - } - - EndpointModelSkuRateLimitRuleProperties 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 DeserializeEndpointModelSkuRateLimitRuleProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointModelSkuRateLimitRuleProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitRuleProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitRuleProperties.cs deleted file mode 100644 index 7e849da74a33e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModelSkuRateLimitRuleProperties.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EndpointModelSkuRateLimitRuleProperties. - public partial class EndpointModelSkuRateLimitRuleProperties - { - /// - /// 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 EndpointModelSkuRateLimitRuleProperties() - { - MatchPatterns = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// If the dynamic throttling is enabled. - /// - /// - /// - /// - /// Keeps track of any properties unknown to the library. - internal EndpointModelSkuRateLimitRuleProperties(float? count, bool? dynamicThrottlingEnabled, string key, IReadOnlyList matchPatterns, float? minCount, float? renewalPeriod, IDictionary serializedAdditionalRawData) - { - Count = count; - DynamicThrottlingEnabled = dynamicThrottlingEnabled; - Key = key; - MatchPatterns = matchPatterns; - MinCount = minCount; - RenewalPeriod = renewalPeriod; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets the count. - public float? Count { get; } - /// If the dynamic throttling is enabled. - public bool? DynamicThrottlingEnabled { get; } - /// Gets the key. - public string Key { get; } - /// Gets the match patterns. - public IReadOnlyList MatchPatterns { get; } - /// Gets the min count. - public float? MinCount { get; } - /// Gets the renewal period. - public float? RenewalPeriod { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModels.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModels.Serialization.cs deleted file mode 100644 index 7ae88a9ca51f0..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModels.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class EndpointModels : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointModels)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - 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" && _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 - } - } - writer.WriteEndObject(); - } - - EndpointModels 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(EndpointModels)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointModels(document.RootElement, options); - } - - internal static EndpointModels DeserializeEndpointModels(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string nextLink = default; - IReadOnlyList value = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - 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(EndpointModelProperties.DeserializeEndpointModelProperties(item, options)); - } - value = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointModels(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointModels)} does not support writing '{options.Format}' format."); - } - } - - EndpointModels 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 DeserializeEndpointModels(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointModels)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModels.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModels.cs deleted file mode 100644 index 2cf98fe420c23..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointModels.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EndpointModels. - internal partial class EndpointModels - { - /// - /// 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 EndpointModels() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The link to the next page constructed using the continuationToken. If null, there are no additional pages. - /// List of models. - /// Keeps track of any properties unknown to the library. - internal EndpointModels(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) - { - NextLink = nextLink; - Value = value; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The link to the next page constructed using the continuationToken. If null, there are no additional pages. - public string NextLink { get; } - /// List of models. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointResourceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointResourceProperties.Serialization.cs deleted file mode 100644 index 4ceab833aebad..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointResourceProperties.Serialization.cs +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - [PersistableModelProxy(typeof(UnknownEndpointResourceProperties))] - public partial class EndpointResourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointResourceProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(AssociatedResourceId)) - { - writer.WritePropertyName("associatedResourceId"u8); - writer.WriteStringValue(AssociatedResourceId); - } - if (Optional.IsCollectionDefined(Deployments)) - { - writer.WritePropertyName("deployments"u8); - writer.WriteStartArray(); - foreach (var item in Deployments) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (Optional.IsDefined(EndpointUri)) - { - writer.WritePropertyName("endpointUri"u8); - writer.WriteStringValue(EndpointUri.AbsoluteUri); - } - if (Optional.IsDefined(FailureReason)) - { - writer.WritePropertyName("failureReason"u8); - writer.WriteStringValue(FailureReason); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(ShouldCreateAiServicesEndpoint)) - { - writer.WritePropertyName("shouldCreateAiServicesEndpoint"u8); - writer.WriteBooleanValue(ShouldCreateAiServicesEndpoint.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 - } - } - writer.WriteEndObject(); - } - - EndpointResourceProperties 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(EndpointResourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointResourceProperties(document.RootElement, options); - } - - internal static EndpointResourceProperties DeserializeEndpointResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("endpointType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Azure.ContentSafety": return ContentSafetyEndpointResourceProperties.DeserializeContentSafetyEndpointResourceProperties(element, options); - case "Azure.OpenAI": return OpenAIEndpointResourceProperties.DeserializeOpenAIEndpointResourceProperties(element, options); - case "Azure.Speech": return SpeechEndpointResourceProperties.DeserializeSpeechEndpointResourceProperties(element, options); - case "managedOnlineEndpoint": return ManagedOnlineEndpointResourceProperties.DeserializeManagedOnlineEndpointResourceProperties(element, options); - case "serverlessEndpoint": return ServerlessEndpointResourceProperties.DeserializeServerlessEndpointResourceProperties(element, options); - } - } - return UnknownEndpointResourceProperties.DeserializeUnknownEndpointResourceProperties(element, options); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointResourceProperties)} does not support writing '{options.Format}' format."); - } - } - - EndpointResourceProperties 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 DeserializeEndpointResourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointResourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointResourceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointResourceProperties.cs deleted file mode 100644 index 3c637ddc48a0d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointResourceProperties.cs +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - public abstract partial class EndpointResourceProperties - { - /// - /// 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 protected IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - protected EndpointResourceProperties() - { - Deployments = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Byo resource id for creating the built-in model service endpoints. - /// Deployments info. - /// Type of the endpoint. - /// Uri of the endpoint. - /// The failure reason if the creation failed. - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace - /// - /// Name of the endpoint. - /// Read-only provision state status property. - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - /// Keeps track of any properties unknown to the library. - internal EndpointResourceProperties(ResourceIdentifier associatedResourceId, IList deployments, EndpointType endpointType, Uri endpointUri, string failureReason, AzureLocation? location, string name, DefaultResourceProvisioningState? provisioningState, bool? shouldCreateAiServicesEndpoint, IDictionary serializedAdditionalRawData) - { - AssociatedResourceId = associatedResourceId; - Deployments = deployments; - EndpointType = endpointType; - EndpointUri = endpointUri; - FailureReason = failureReason; - Location = location; - Name = name; - ProvisioningState = provisioningState; - ShouldCreateAiServicesEndpoint = shouldCreateAiServicesEndpoint; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Byo resource id for creating the built-in model service endpoints. - public ResourceIdentifier AssociatedResourceId { get; set; } - /// Deployments info. - public IList Deployments { get; } - /// Type of the endpoint. - internal EndpointType EndpointType { get; set; } - /// Uri of the endpoint. - public Uri EndpointUri { get; set; } - /// The failure reason if the creation failed. - public string FailureReason { get; set; } - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace - /// - public AzureLocation? Location { get; set; } - /// Name of the endpoint. - public string Name { get; set; } - /// Read-only provision state status property. - public DefaultResourceProvisioningState? ProvisioningState { get; } - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - public bool? ShouldCreateAiServicesEndpoint { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index 243169e08d6da..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class EndpointResourcePropertiesBasicResourceArmPaginatedResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointResourcePropertiesBasicResourceArmPaginatedResult)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - 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" && _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 - } - } - writer.WriteEndObject(); - } - - EndpointResourcePropertiesBasicResourceArmPaginatedResult 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(EndpointResourcePropertiesBasicResourceArmPaginatedResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement, options); - } - - internal static EndpointResourcePropertiesBasicResourceArmPaginatedResult DeserializeEndpointResourcePropertiesBasicResourceArmPaginatedResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string nextLink = default; - IReadOnlyList value = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - 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(EndpointResourcePropertiesBasicResourceData.DeserializeEndpointResourcePropertiesBasicResourceData(item, options)); - } - value = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EndpointResourcePropertiesBasicResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointResourcePropertiesBasicResourceArmPaginatedResult)} does not support writing '{options.Format}' format."); - } - } - - EndpointResourcePropertiesBasicResourceArmPaginatedResult 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 DeserializeEndpointResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointResourcePropertiesBasicResourceArmPaginatedResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.cs deleted file mode 100644 index a5c86ae427eee..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EndpointResourcePropertiesBasicResourceArmPaginatedResult. - internal partial class EndpointResourcePropertiesBasicResourceArmPaginatedResult - { - /// - /// 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 EndpointResourcePropertiesBasicResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// - /// Keeps track of any properties unknown to the library. - internal EndpointResourcePropertiesBasicResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) - { - NextLink = nextLink; - Value = value; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets the next link. - public string NextLink { get; } - /// Gets the value. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointServiceConnectionStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointServiceConnectionStatus.cs new file mode 100644 index 0000000000000..03aa16b8d8c06 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointServiceConnectionStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// Connection status of the service consumer with the service provider. + public readonly partial struct EndpointServiceConnectionStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public EndpointServiceConnectionStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ApprovedValue = "Approved"; + private const string PendingValue = "Pending"; + private const string RejectedValue = "Rejected"; + private const string DisconnectedValue = "Disconnected"; + + /// Approved. + public static EndpointServiceConnectionStatus Approved { get; } = new EndpointServiceConnectionStatus(ApprovedValue); + /// Pending. + public static EndpointServiceConnectionStatus Pending { get; } = new EndpointServiceConnectionStatus(PendingValue); + /// Rejected. + public static EndpointServiceConnectionStatus Rejected { get; } = new EndpointServiceConnectionStatus(RejectedValue); + /// Disconnected. + public static EndpointServiceConnectionStatus Disconnected { get; } = new EndpointServiceConnectionStatus(DisconnectedValue); + /// Determines if two values are the same. + public static bool operator ==(EndpointServiceConnectionStatus left, EndpointServiceConnectionStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(EndpointServiceConnectionStatus left, EndpointServiceConnectionStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator EndpointServiceConnectionStatus(string value) => new EndpointServiceConnectionStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EndpointServiceConnectionStatus other && Equals(other); + /// + public bool Equals(EndpointServiceConnectionStatus 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointType.cs deleted file mode 100644 index d021f7f1d0906..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointType.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Type of the endpoint. - public readonly partial struct EndpointType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EndpointType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AzureOpenAIValue = "Azure.OpenAI"; - private const string AzureSpeechValue = "Azure.Speech"; - private const string AzureContentSafetyValue = "Azure.ContentSafety"; - private const string AzureLlamaValue = "Azure.Llama"; - private const string ManagedOnlineEndpointValue = "managedOnlineEndpoint"; - private const string ServerlessEndpointValue = "serverlessEndpoint"; - - /// Azure.OpenAI. - public static EndpointType AzureOpenAI { get; } = new EndpointType(AzureOpenAIValue); - /// Azure.Speech. - public static EndpointType AzureSpeech { get; } = new EndpointType(AzureSpeechValue); - /// Azure.ContentSafety. - public static EndpointType AzureContentSafety { get; } = new EndpointType(AzureContentSafetyValue); - /// Azure.Llama. - public static EndpointType AzureLlama { get; } = new EndpointType(AzureLlamaValue); - /// managedOnlineEndpoint. - public static EndpointType ManagedOnlineEndpoint { get; } = new EndpointType(ManagedOnlineEndpointValue); - /// serverlessEndpoint. - public static EndpointType ServerlessEndpoint { get; } = new EndpointType(ServerlessEndpointValue); - /// Determines if two values are the same. - public static bool operator ==(EndpointType left, EndpointType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EndpointType left, EndpointType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EndpointType(string value) => new EndpointType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EndpointType other && Equals(other); - /// - public bool Equals(EndpointType 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.Serialization.cs index 13eeab71ab47d..1af7d25b82de0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static EnvironmentContainerResourceArmPaginatedResult DeserializeEnviro { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static EnvironmentContainerResourceArmPaginatedResult DeserializeEnviro 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 EnvironmentContainerResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new EnvironmentContainerResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.cs index 07ed7148de7a2..cba98317b9b94 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal EnvironmentContainerResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. /// An array of objects of type EnvironmentContainer. + /// The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal EnvironmentContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal EnvironmentContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type EnvironmentContainer. public IReadOnlyList Value { get; } + /// The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariable.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariable.cs index fbed5789a6959..30aed003b8261 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariable.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVariable.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The EnvironmentVariable. + /// Environment Variables for the container. public partial class EnvironmentVariable { /// Initializes a new instance of . diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionResourceArmPaginatedResult.Serialization.cs index b9684bfa97f3e..46c53c92ecb82 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWrit } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static EnvironmentVersionResourceArmPaginatedResult DeserializeEnvironm { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static EnvironmentVersionResourceArmPaginatedResult DeserializeEnvironm 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 EnvironmentVersionResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new EnvironmentVersionResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionResourceArmPaginatedResult.cs index 47873a83fbe31..be0a0f49ef049 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal EnvironmentVersionResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. /// An array of objects of type EnvironmentVersion. + /// The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal EnvironmentVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal EnvironmentVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type EnvironmentVersion. public IReadOnlyList Value { get; } + /// The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.Serialization.cs index 23340100c00bd..19579a7757758 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.Serialization.cs @@ -26,6 +26,19 @@ void IJsonModel.Write(Utf8JsonWriter wr } writer.WriteStartObject(); + writer.WritePropertyName("metricThreshold"u8); + writer.WriteObjectValue(MetricThreshold, options); + writer.WritePropertyName("featureImportanceSettings"u8); + writer.WriteObjectValue(FeatureImportanceSettings, options); + writer.WritePropertyName("productionData"u8); + writer.WriteStartArray(); + foreach (var item in ProductionData) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("referenceData"u8); + writer.WriteObjectValue(ReferenceData, options); if (Optional.IsCollectionDefined(FeatureDataTypeOverride)) { if (FeatureDataTypeOverride != null) @@ -44,19 +57,8 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteNull("featureDataTypeOverride"); } } - writer.WritePropertyName("featureImportanceSettings"u8); - writer.WriteObjectValue(FeatureImportanceSettings, options); - writer.WritePropertyName("metricThreshold"u8); - writer.WriteObjectValue(MetricThreshold, options); - writer.WritePropertyName("productionData"u8); - writer.WriteStartArray(); - foreach (var item in ProductionData) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("referenceData"u8); - writer.WriteObjectValue(ReferenceData, options); + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); if (Optional.IsCollectionDefined(NotificationTypes)) { if (NotificationTypes != null) @@ -92,8 +94,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteNull("properties"); } } - writer.WritePropertyName("signalType"u8); - writer.WriteStringValue(SignalType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -132,31 +132,21 @@ internal static FeatureAttributionDriftMonitoringSignal DeserializeFeatureAttrib { return null; } - IDictionary featureDataTypeOverride = default; - FeatureImportanceSettings featureImportanceSettings = default; FeatureAttributionMetricThreshold metricThreshold = default; + FeatureImportanceSettings featureImportanceSettings = default; IList productionData = default; MonitoringInputDataBase referenceData = default; + IDictionary featureDataTypeOverride = default; + MonitoringSignalType signalType = default; IList notificationTypes = default; IDictionary properties = default; - MonitoringSignalType signalType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("featureDataTypeOverride"u8)) + if (property.NameEquals("metricThreshold"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - featureDataTypeOverride = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, new MonitoringFeatureDataType(property0.Value.GetString())); - } - featureDataTypeOverride = dictionary; + metricThreshold = FeatureAttributionMetricThreshold.DeserializeFeatureAttributionMetricThreshold(property.Value, options); continue; } if (property.NameEquals("featureImportanceSettings"u8)) @@ -164,11 +154,6 @@ internal static FeatureAttributionDriftMonitoringSignal DeserializeFeatureAttrib featureImportanceSettings = FeatureImportanceSettings.DeserializeFeatureImportanceSettings(property.Value, options); continue; } - if (property.NameEquals("metricThreshold"u8)) - { - metricThreshold = FeatureAttributionMetricThreshold.DeserializeFeatureAttributionMetricThreshold(property.Value, options); - continue; - } if (property.NameEquals("productionData"u8)) { List array = new List(); @@ -184,6 +169,26 @@ internal static FeatureAttributionDriftMonitoringSignal DeserializeFeatureAttrib referenceData = MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property.Value, options); continue; } + if (property.NameEquals("featureDataTypeOverride"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + featureDataTypeOverride = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, new MonitoringFeatureDataType(property0.Value.GetString())); + } + featureDataTypeOverride = dictionary; + continue; + } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } if (property.NameEquals("notificationTypes"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -214,11 +219,6 @@ internal static FeatureAttributionDriftMonitoringSignal DeserializeFeatureAttrib properties = dictionary; continue; } - if (property.NameEquals("signalType"u8)) - { - signalType = new MonitoringSignalType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -226,15 +226,15 @@ internal static FeatureAttributionDriftMonitoringSignal DeserializeFeatureAttrib } serializedAdditionalRawData = rawDataDictionary; return new FeatureAttributionDriftMonitoringSignal( + signalType, notificationTypes ?? new ChangeTrackingList(), properties ?? new ChangeTrackingDictionary(), - signalType, serializedAdditionalRawData, - featureDataTypeOverride ?? new ChangeTrackingDictionary(), - featureImportanceSettings, metricThreshold, + featureImportanceSettings, productionData, - referenceData); + referenceData, + featureDataTypeOverride ?? new ChangeTrackingDictionary()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.cs index dcb53dc2ddd02..8d447ecd38383 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionDriftMonitoringSignal.cs @@ -15,8 +15,8 @@ namespace Azure.ResourceManager.MachineLearning.Models public partial class FeatureAttributionDriftMonitoringSignal : MonitoringSignalBase { /// Initializes a new instance of . - /// [Required] The settings for computing feature importance. /// [Required] A list of metrics to calculate and their associated thresholds. + /// [Required] The settings for computing feature importance. /// /// [Required] The data which drift will be calculated for. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -27,30 +27,29 @@ public partial class FeatureAttributionDriftMonitoringSignal : MonitoringSignalB /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// , , or is null. - public FeatureAttributionDriftMonitoringSignal(FeatureImportanceSettings featureImportanceSettings, FeatureAttributionMetricThreshold metricThreshold, IEnumerable productionData, MonitoringInputDataBase referenceData) + /// , , or is null. + public FeatureAttributionDriftMonitoringSignal(FeatureAttributionMetricThreshold metricThreshold, FeatureImportanceSettings featureImportanceSettings, IEnumerable productionData, MonitoringInputDataBase referenceData) { - Argument.AssertNotNull(featureImportanceSettings, nameof(featureImportanceSettings)); Argument.AssertNotNull(metricThreshold, nameof(metricThreshold)); + Argument.AssertNotNull(featureImportanceSettings, nameof(featureImportanceSettings)); Argument.AssertNotNull(productionData, nameof(productionData)); Argument.AssertNotNull(referenceData, nameof(referenceData)); - FeatureDataTypeOverride = new ChangeTrackingDictionary(); - FeatureImportanceSettings = featureImportanceSettings; MetricThreshold = metricThreshold; + FeatureImportanceSettings = featureImportanceSettings; ProductionData = productionData.ToList(); ReferenceData = referenceData; + FeatureDataTypeOverride = new ChangeTrackingDictionary(); SignalType = MonitoringSignalType.FeatureAttributionDrift; } /// Initializes a new instance of . + /// [Required] Specifies the type of signal to monitor. /// The current notification mode for this signal. /// Property dictionary. Properties can be added, but not removed or altered. - /// [Required] Specifies the type of signal to monitor. /// Keeps track of any properties unknown to the library. - /// A dictionary that maps feature names to their respective data types. - /// [Required] The settings for computing feature importance. /// [Required] A list of metrics to calculate and their associated thresholds. + /// [Required] The settings for computing feature importance. /// /// [Required] The data which drift will be calculated for. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -61,13 +60,14 @@ public FeatureAttributionDriftMonitoringSignal(FeatureImportanceSettings feature /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - internal FeatureAttributionDriftMonitoringSignal(IList notificationTypes, IDictionary properties, MonitoringSignalType signalType, IDictionary serializedAdditionalRawData, IDictionary featureDataTypeOverride, FeatureImportanceSettings featureImportanceSettings, FeatureAttributionMetricThreshold metricThreshold, IList productionData, MonitoringInputDataBase referenceData) : base(notificationTypes, properties, signalType, serializedAdditionalRawData) + /// A dictionary that maps feature names to their respective data types. + internal FeatureAttributionDriftMonitoringSignal(MonitoringSignalType signalType, IList notificationTypes, IDictionary properties, IDictionary serializedAdditionalRawData, FeatureAttributionMetricThreshold metricThreshold, FeatureImportanceSettings featureImportanceSettings, IList productionData, MonitoringInputDataBase referenceData, IDictionary featureDataTypeOverride) : base(signalType, notificationTypes, properties, serializedAdditionalRawData) { - FeatureDataTypeOverride = featureDataTypeOverride; - FeatureImportanceSettings = featureImportanceSettings; MetricThreshold = metricThreshold; + FeatureImportanceSettings = featureImportanceSettings; ProductionData = productionData; ReferenceData = referenceData; + FeatureDataTypeOverride = featureDataTypeOverride; SignalType = signalType; } @@ -76,12 +76,10 @@ internal FeatureAttributionDriftMonitoringSignal() { } - /// A dictionary that maps feature names to their respective data types. - public IDictionary FeatureDataTypeOverride { get; set; } - /// [Required] The settings for computing feature importance. - public FeatureImportanceSettings FeatureImportanceSettings { get; set; } /// [Required] A list of metrics to calculate and their associated thresholds. public FeatureAttributionMetricThreshold MetricThreshold { get; set; } + /// [Required] The settings for computing feature importance. + public FeatureImportanceSettings FeatureImportanceSettings { get; set; } /// /// [Required] The data which drift will be calculated for. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -94,5 +92,7 @@ internal FeatureAttributionDriftMonitoringSignal() /// The available derived classes include , and . /// public MonitoringInputDataBase ReferenceData { get; set; } + /// A dictionary that maps feature names to their respective data types. + public IDictionary FeatureDataTypeOverride { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.Serialization.cs index dda213cd028ff..9addafd24ae39 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.Serialization.cs @@ -26,8 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); - writer.WritePropertyName("metric"u8); - writer.WriteStringValue(Metric.ToString()); if (Optional.IsDefined(Threshold)) { if (Threshold != null) @@ -40,6 +38,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("threshold"); } } + writer.WritePropertyName("metric"u8); + writer.WriteStringValue(Metric.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,17 +78,12 @@ internal static FeatureAttributionMetricThreshold DeserializeFeatureAttributionM { return null; } - FeatureAttributionMetric metric = default; MonitoringThreshold threshold = default; + FeatureAttributionMetric metric = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("metric"u8)) - { - metric = new FeatureAttributionMetric(property.Value.GetString()); - continue; - } if (property.NameEquals("threshold"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -99,13 +94,18 @@ internal static FeatureAttributionMetricThreshold DeserializeFeatureAttributionM threshold = MonitoringThreshold.DeserializeMonitoringThreshold(property.Value, options); continue; } + if (property.NameEquals("metric"u8)) + { + metric = new FeatureAttributionMetric(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new FeatureAttributionMetricThreshold(metric, threshold, serializedAdditionalRawData); + return new FeatureAttributionMetricThreshold(threshold, metric, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.cs index 57d7e31626e43..15230efe511a5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureAttributionMetricThreshold.cs @@ -53,13 +53,13 @@ public FeatureAttributionMetricThreshold(FeatureAttributionMetric metric) } /// Initializes a new instance of . - /// [Required] The feature attribution metric to calculate. /// The threshold value. If null, a default value will be set depending on the selected metric. + /// [Required] The feature attribution metric to calculate. /// Keeps track of any properties unknown to the library. - internal FeatureAttributionMetricThreshold(FeatureAttributionMetric metric, MonitoringThreshold threshold, IDictionary serializedAdditionalRawData) + internal FeatureAttributionMetricThreshold(MonitoringThreshold threshold, FeatureAttributionMetric metric, IDictionary serializedAdditionalRawData) { - Metric = metric; Threshold = threshold; + Metric = metric; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -68,8 +68,6 @@ internal FeatureAttributionMetricThreshold() { } - /// [Required] The feature attribution metric to calculate. - public FeatureAttributionMetric Metric { get; set; } /// The threshold value. If null, a default value will be set depending on the selected metric. internal MonitoringThreshold Threshold { get; set; } /// The threshold value. If null, the set default is dependent on the metric type. @@ -83,5 +81,8 @@ public double? ThresholdValue Threshold.Value = value; } } + + /// [Required] The feature attribution metric to calculate. + public FeatureAttributionMetric Metric { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.Serialization.cs index 5e09f41c8615d..436b9c5a2c152 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static FeatureResourceArmPaginatedResult DeserializeFeatureResourceArmP { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static FeatureResourceArmPaginatedResult DeserializeFeatureResourceArmP 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 FeatureResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new FeatureResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.cs index 0489b54c9fe22..4e472fd47aaf3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal FeatureResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of Feature objects. If null, there are no additional pages. /// An array of objects of type Feature. + /// The link to the next page of Feature objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal FeatureResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal FeatureResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of Feature objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type Feature. public IReadOnlyList Value { get; } + /// The link to the next page of Feature objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.Serialization.cs index 7c0410b0d6063..90cd45361c93d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.Serialization.cs @@ -26,26 +26,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteStartObject(); - if (Optional.IsCollectionDefined(DataAvailabilityStatus)) + if (Optional.IsDefined(DisplayName)) { - writer.WritePropertyName("dataAvailabilityStatus"u8); - writer.WriteStartArray(); - foreach (var item in DataAvailabilityStatus) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); } if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } - if (Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } if (Optional.IsDefined(FeatureWindow)) { if (FeatureWindow != null) @@ -58,16 +48,26 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNull("featureWindow"); } } + if (Optional.IsCollectionDefined(DataAvailabilityStatus)) + { + writer.WritePropertyName("dataAvailabilityStatus"u8); + writer.WriteStartArray(); + foreach (var item in DataAvailabilityStatus) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(JobId)) { writer.WritePropertyName("jobId"u8); writer.WriteStringValue(JobId); } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -90,11 +90,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -139,31 +139,22 @@ internal static FeatureSetVersionBackfillContent DeserializeFeatureSetVersionBac { return null; } - IList dataAvailabilityStatus = default; - string description = default; string displayName = default; + string description = default; FeatureWindow featureWindow = default; + IList dataAvailabilityStatus = default; string jobId = default; - IDictionary properties = default; + IDictionary tags = default; MaterializationComputeResource resource = default; IDictionary sparkConfiguration = default; - IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("dataAvailabilityStatus"u8)) + if (property.NameEquals("displayName"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new DataAvailabilityStatus(item.GetString())); - } - dataAvailabilityStatus = array; + displayName = property.Value.GetString(); continue; } if (property.NameEquals("description"u8)) @@ -171,11 +162,6 @@ internal static FeatureSetVersionBackfillContent DeserializeFeatureSetVersionBac description = property.Value.GetString(); continue; } - if (property.NameEquals("displayName"u8)) - { - displayName = property.Value.GetString(); - continue; - } if (property.NameEquals("featureWindow"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -186,12 +172,26 @@ internal static FeatureSetVersionBackfillContent DeserializeFeatureSetVersionBac featureWindow = FeatureWindow.DeserializeFeatureWindow(property.Value, options); continue; } + if (property.NameEquals("dataAvailabilityStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new DataAvailabilityStatus(item.GetString())); + } + dataAvailabilityStatus = array; + continue; + } if (property.NameEquals("jobId"u8)) { jobId = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -202,7 +202,7 @@ internal static FeatureSetVersionBackfillContent DeserializeFeatureSetVersionBac { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } if (property.NameEquals("resource"u8)) @@ -228,7 +228,7 @@ internal static FeatureSetVersionBackfillContent DeserializeFeatureSetVersionBac sparkConfiguration = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -239,7 +239,7 @@ internal static FeatureSetVersionBackfillContent DeserializeFeatureSetVersionBac { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -249,15 +249,15 @@ internal static FeatureSetVersionBackfillContent DeserializeFeatureSetVersionBac } serializedAdditionalRawData = rawDataDictionary; return new FeatureSetVersionBackfillContent( - dataAvailabilityStatus ?? new ChangeTrackingList(), - description, displayName, + description, featureWindow, + dataAvailabilityStatus ?? new ChangeTrackingList(), jobId, - properties ?? new ChangeTrackingDictionary(), + tags ?? new ChangeTrackingDictionary(), resource, sparkConfiguration ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.cs index fcc75358704ff..2ca2a59b99a14 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureSetVersionBackfillContent.cs @@ -49,48 +49,48 @@ public partial class FeatureSetVersionBackfillContent public FeatureSetVersionBackfillContent() { DataAvailabilityStatus = new ChangeTrackingList(); - Properties = new ChangeTrackingDictionary(); - SparkConfiguration = new ChangeTrackingDictionary(); Tags = new ChangeTrackingDictionary(); + SparkConfiguration = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// Specified the data availability status that you want to backfill. - /// Specifies description. /// Specifies description. + /// Specifies description. /// Specifies the backfill feature window to be materialized. + /// Specified the data availability status that you want to backfill. /// Specify the jobId to retry the failed materialization. - /// Specifies the properties. + /// Specifies the tags. /// Specifies the compute resource settings. /// Specifies the spark compute settings. - /// Specifies the tags. + /// Specifies the properties. /// Keeps track of any properties unknown to the library. - internal FeatureSetVersionBackfillContent(IList dataAvailabilityStatus, string description, string displayName, FeatureWindow featureWindow, string jobId, IDictionary properties, MaterializationComputeResource resource, IDictionary sparkConfiguration, IDictionary tags, IDictionary serializedAdditionalRawData) + internal FeatureSetVersionBackfillContent(string displayName, string description, FeatureWindow featureWindow, IList dataAvailabilityStatus, string jobId, IDictionary tags, MaterializationComputeResource resource, IDictionary sparkConfiguration, IDictionary properties, IDictionary serializedAdditionalRawData) { - DataAvailabilityStatus = dataAvailabilityStatus; - Description = description; DisplayName = displayName; + Description = description; FeatureWindow = featureWindow; + DataAvailabilityStatus = dataAvailabilityStatus; JobId = jobId; - Properties = properties; + Tags = tags; Resource = resource; SparkConfiguration = sparkConfiguration; - Tags = tags; + Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Specified the data availability status that you want to backfill. - public IList DataAvailabilityStatus { get; } - /// Specifies description. - public string Description { get; set; } /// Specifies description. public string DisplayName { get; set; } + /// Specifies description. + public string Description { get; set; } /// Specifies the backfill feature window to be materialized. public FeatureWindow FeatureWindow { get; set; } + /// Specified the data availability status that you want to backfill. + public IList DataAvailabilityStatus { get; } /// Specify the jobId to retry the failed materialization. public string JobId { get; set; } - /// Specifies the properties. - public IDictionary Properties { get; } + /// Specifies the tags. + public IDictionary Tags { get; } /// Specifies the compute resource settings. internal MaterializationComputeResource Resource { get; set; } /// Specifies the instance type. @@ -107,7 +107,7 @@ public string ResourceInstanceType /// Specifies the spark compute settings. public IDictionary SparkConfiguration { get; } - /// Specifies the tags. - public IDictionary Tags { get; } + /// Specifies the properties. + public IDictionary Properties { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreSettings.cs index 7706524849013..94d41ab92951a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureStoreSettings.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The FeatureStoreSettings. + /// Settings for feature store type workspace. public partial class FeatureStoreSettings { /// @@ -51,7 +51,7 @@ public FeatureStoreSettings() } /// Initializes a new instance of . - /// + /// Compute runtime config for feature store type workspace. /// /// /// Keeps track of any properties unknown to the library. @@ -63,7 +63,7 @@ internal FeatureStoreSettings(ComputeRuntimeDto computeRuntime, string offlineSt _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the compute runtime. + /// Compute runtime config for feature store type workspace. internal ComputeRuntimeDto ComputeRuntime { get; set; } /// Gets or sets the spark runtime version. public string SparkRuntimeVersion diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.Serialization.cs index a5e42da1657f9..5fe5b551dfde8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.Serialization.cs @@ -26,28 +26,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt } writer.WriteStartObject(); - if (Optional.IsDefined(FeatureWindowEnd)) + if (Optional.IsDefined(FeatureWindowStart)) { - if (FeatureWindowEnd != null) + if (FeatureWindowStart != null) { - writer.WritePropertyName("featureWindowEnd"u8); - writer.WriteStringValue(FeatureWindowEnd.Value, "O"); + writer.WritePropertyName("featureWindowStart"u8); + writer.WriteStringValue(FeatureWindowStart.Value, "O"); } else { - writer.WriteNull("featureWindowEnd"); + writer.WriteNull("featureWindowStart"); } } - if (Optional.IsDefined(FeatureWindowStart)) + if (Optional.IsDefined(FeatureWindowEnd)) { - if (FeatureWindowStart != null) + if (FeatureWindowEnd != null) { - writer.WritePropertyName("featureWindowStart"u8); - writer.WriteStringValue(FeatureWindowStart.Value, "O"); + writer.WritePropertyName("featureWindowEnd"u8); + writer.WriteStringValue(FeatureWindowEnd.Value, "O"); } else { - writer.WriteNull("featureWindowStart"); + writer.WriteNull("featureWindowEnd"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -88,30 +88,30 @@ internal static FeatureWindow DeserializeFeatureWindow(JsonElement element, Mode { return null; } - DateTimeOffset? featureWindowEnd = default; DateTimeOffset? featureWindowStart = default; + DateTimeOffset? featureWindowEnd = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("featureWindowEnd"u8)) + if (property.NameEquals("featureWindowStart"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - featureWindowEnd = null; + featureWindowStart = null; continue; } - featureWindowEnd = property.Value.GetDateTimeOffset("O"); + featureWindowStart = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("featureWindowStart"u8)) + if (property.NameEquals("featureWindowEnd"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - featureWindowStart = null; + featureWindowEnd = null; continue; } - featureWindowStart = property.Value.GetDateTimeOffset("O"); + featureWindowEnd = property.Value.GetDateTimeOffset("O"); continue; } if (options.Format != "W") @@ -120,7 +120,7 @@ internal static FeatureWindow DeserializeFeatureWindow(JsonElement element, Mode } } serializedAdditionalRawData = rawDataDictionary; - return new FeatureWindow(featureWindowEnd, featureWindowStart, serializedAdditionalRawData); + return new FeatureWindow(featureWindowStart, featureWindowEnd, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.cs index ad9baf97fe24c..89c828d77f35b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureWindow.cs @@ -51,19 +51,19 @@ public FeatureWindow() } /// Initializes a new instance of . - /// Specifies the feature window end time. /// Specifies the feature window start time. + /// Specifies the feature window end time. /// Keeps track of any properties unknown to the library. - internal FeatureWindow(DateTimeOffset? featureWindowEnd, DateTimeOffset? featureWindowStart, IDictionary serializedAdditionalRawData) + internal FeatureWindow(DateTimeOffset? featureWindowStart, DateTimeOffset? featureWindowEnd, IDictionary serializedAdditionalRawData) { - FeatureWindowEnd = featureWindowEnd; FeatureWindowStart = featureWindowStart; + FeatureWindowEnd = featureWindowEnd; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Specifies the feature window end time. - public DateTimeOffset? FeatureWindowEnd { get; set; } /// Specifies the feature window start time. public DateTimeOffset? FeatureWindowStart { get; set; } + /// Specifies the feature window end time. + public DateTimeOffset? FeatureWindowEnd { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.Serialization.cs index 1272b54906025..fac925825fe10 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWri } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWri } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static FeaturesetContainerResourceArmPaginatedResult DeserializeFeature { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static FeaturesetContainerResourceArmPaginatedResult DeserializeFeature 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 FeaturesetContainerResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new FeaturesetContainerResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.cs index 61dc349d0387c..3036377e3a405 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetContainerResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal FeaturesetContainerResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. /// An array of objects of type FeaturesetContainer. + /// The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal FeaturesetContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal FeaturesetContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type FeaturesetContainer. public IReadOnlyList Value { get; } + /// The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.Serialization.cs index 819e330a38170..8a25980c0f9c4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWrite } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWrite } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static FeaturesetVersionResourceArmPaginatedResult DeserializeFeaturese { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static FeaturesetVersionResourceArmPaginatedResult DeserializeFeaturese 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 FeaturesetVersionResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new FeaturesetVersionResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.cs index e06f18d355260..b3ca9c4f96d59 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturesetVersionResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal FeaturesetVersionResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. /// An array of objects of type FeaturesetVersion. + /// The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal FeaturesetVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal FeaturesetVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type FeaturesetVersion. public IReadOnlyList Value { get; } + /// The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.Serialization.cs index 286c9b7d9a24d..a82ce7a4b867e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static FeaturestoreEntityContainerResourceArmPaginatedResult Deserializ { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static FeaturestoreEntityContainerResourceArmPaginatedResult Deserializ 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 FeaturestoreEntityContainerResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new FeaturestoreEntityContainerResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.cs index 43a553cbba400..994b16266b82d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityContainerResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal FeaturestoreEntityContainerResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. /// An array of objects of type FeaturestoreEntityContainer. + /// The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal FeaturestoreEntityContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal FeaturestoreEntityContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type FeaturestoreEntityContainer. public IReadOnlyList Value { get; } + /// The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.Serialization.cs index 544a498b8d433..fbaab7cabea89 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8J } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8J } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static FeaturestoreEntityVersionResourceArmPaginatedResult DeserializeF { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static FeaturestoreEntityVersionResourceArmPaginatedResult DeserializeF 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 FeaturestoreEntityVersionResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new FeaturestoreEntityVersionResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.cs index 289537efdacde..72ef28ef99429 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturestoreEntityVersionResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal FeaturestoreEntityVersionResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. /// An array of objects of type FeaturestoreEntityVersion. + /// The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal FeaturestoreEntityVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal FeaturestoreEntityVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type FeaturestoreEntityVersion. public IReadOnlyList Value { get; } + /// The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningJob.Serialization.cs deleted file mode 100644 index 82961ef25abaf..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningJob.Serialization.cs +++ /dev/null @@ -1,483 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class FineTuningJob : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(FineTuningJob)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("fineTuningDetails"u8); - writer.WriteObjectValue(FineTuningDetails, options); - if (Optional.IsDefined(Resources)) - { - writer.WritePropertyName("resources"u8); - writer.WriteObjectValue(Resources, options); - } - if (Optional.IsDefined(QueueSettings)) - { - if (QueueSettings != null) - { - writer.WritePropertyName("queueSettings"u8); - writer.WriteObjectValue(QueueSettings, options); - } - else - { - writer.WriteNull("queueSettings"); - } - } - writer.WritePropertyName("outputs"u8); - writer.WriteStartObject(); - foreach (var item in Outputs) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); - if (Optional.IsDefined(ComponentId)) - { - if (ComponentId != null) - { - writer.WritePropertyName("componentId"u8); - writer.WriteStringValue(ComponentId); - } - else - { - writer.WriteNull("componentId"); - } - } - if (Optional.IsDefined(ComputeId)) - { - if (ComputeId != null) - { - writer.WritePropertyName("computeId"u8); - writer.WriteStringValue(ComputeId); - } - else - { - writer.WriteNull("computeId"); - } - } - if (Optional.IsDefined(DisplayName)) - { - if (DisplayName != null) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - else - { - writer.WriteNull("displayName"); - } - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(Identity)) - { - if (Identity != null) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity, options); - } - else - { - writer.WriteNull("identity"); - } - } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"u8); - writer.WriteBooleanValue(IsArchived.Value); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsDefined(NotificationSetting)) - { - if (NotificationSetting != null) - { - writer.WritePropertyName("notificationSetting"u8); - writer.WriteObjectValue(NotificationSetting, options); - } - else - { - writer.WriteNull("notificationSetting"); - } - } - if (Optional.IsCollectionDefined(Services)) - { - if (Services != null) - { - writer.WritePropertyName("services"u8); - writer.WriteStartObject(); - foreach (var item in Services) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("services"); - } - } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } - if (Optional.IsCollectionDefined(Tags)) - { - if (Tags != null) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - 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 - } - } - writer.WriteEndObject(); - } - - FineTuningJob 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(FineTuningJob)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFineTuningJob(document.RootElement, options); - } - - internal static FineTuningJob DeserializeFineTuningJob(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - FineTuningVertical fineTuningDetails = default; - JobResources resources = default; - JobQueueSettings queueSettings = default; - IDictionary outputs = default; - ResourceIdentifier componentId = default; - ResourceIdentifier computeId = default; - string displayName = default; - string experimentName = default; - MachineLearningIdentityConfiguration identity = default; - bool? isArchived = default; - JobType jobType = default; - NotificationSetting notificationSetting = default; - IDictionary services = default; - MachineLearningJobStatus? status = default; - string description = default; - IDictionary properties = default; - IDictionary tags = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("fineTuningDetails"u8)) - { - fineTuningDetails = FineTuningVertical.DeserializeFineTuningVertical(property.Value, options); - continue; - } - if (property.NameEquals("resources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resources = JobResources.DeserializeJobResources(property.Value, options); - continue; - } - if (property.NameEquals("queueSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - queueSettings = null; - continue; - } - queueSettings = JobQueueSettings.DeserializeJobQueueSettings(property.Value, options); - continue; - } - if (property.NameEquals("outputs"u8)) - { - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, MachineLearningJobOutput.DeserializeMachineLearningJobOutput(property0.Value, options)); - } - outputs = dictionary; - continue; - } - if (property.NameEquals("componentId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - componentId = null; - continue; - } - componentId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("computeId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - computeId = null; - continue; - } - computeId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("displayName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - displayName = null; - continue; - } - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("experimentName"u8)) - { - experimentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - identity = null; - continue; - } - identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value, options); - continue; - } - if (property.NameEquals("isArchived"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("jobType"u8)) - { - jobType = new JobType(property.Value.GetString()); - continue; - } - if (property.NameEquals("notificationSetting"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - notificationSetting = null; - continue; - } - notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value, options); - continue; - } - if (property.NameEquals("services"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - services = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value, options)); - } - services = dictionary; - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new MachineLearningJobStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("description"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new FineTuningJob( - description, - properties ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), - serializedAdditionalRawData, - componentId, - computeId, - displayName, - experimentName, - identity, - isArchived, - jobType, - notificationSetting, - services ?? new ChangeTrackingDictionary(), - status, - fineTuningDetails, - resources, - queueSettings, - outputs); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(FineTuningJob)} does not support writing '{options.Format}' format."); - } - } - - FineTuningJob 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 DeserializeFineTuningJob(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(FineTuningJob)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningJob.cs deleted file mode 100644 index f18a5f65c7684..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningJob.cs +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// FineTuning Job definition. - public partial class FineTuningJob : MachineLearningJobProperties - { - /// Initializes a new instance of . - /// - /// [Required] - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// - /// [Required] - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - /// or is null. - public FineTuningJob(FineTuningVertical fineTuningDetails, IDictionary outputs) - { - Argument.AssertNotNull(fineTuningDetails, nameof(fineTuningDetails)); - Argument.AssertNotNull(outputs, nameof(outputs)); - - FineTuningDetails = fineTuningDetails; - Outputs = outputs; - JobType = JobType.FineTuning; - } - - /// Initializes a new instance of . - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - /// Keeps track of any properties unknown to the library. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. - /// Display name of job. - /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. - /// - /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. - /// Defaults to AmlToken if null. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// Is the asset archived?. - /// [Required] Specifies the type of job. - /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. - /// - /// [Required] - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// Instance types and other resources for the job. - /// Queue settings for the job. - /// - /// [Required] - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - internal FineTuningJob(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary services, MachineLearningJobStatus? status, FineTuningVertical fineTuningDetails, JobResources resources, JobQueueSettings queueSettings, IDictionary outputs) : base(description, properties, tags, serializedAdditionalRawData, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, services, status) - { - FineTuningDetails = fineTuningDetails; - Resources = resources; - QueueSettings = queueSettings; - Outputs = outputs; - JobType = jobType; - } - - /// Initializes a new instance of for deserialization. - internal FineTuningJob() - { - } - - /// - /// [Required] - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public FineTuningVertical FineTuningDetails { get; set; } - /// Instance types and other resources for the job. - internal JobResources Resources { get; set; } - /// List of instance types to choose from. - public IList ResourcesInstanceTypes - { - get - { - if (Resources is null) - Resources = new JobResources(); - return Resources.InstanceTypes; - } - } - - /// Queue settings for the job. - internal JobQueueSettings QueueSettings { get; set; } - /// Controls the compute job tier. - public JobTier? QueueJobTier - { - get => QueueSettings is null ? default : QueueSettings.JobTier; - set - { - if (QueueSettings is null) - QueueSettings = new JobQueueSettings(); - QueueSettings.JobTier = value; - } - } - - /// - /// [Required] - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - public IDictionary Outputs { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningTaskType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningTaskType.cs deleted file mode 100644 index d4dea3c5db188..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningTaskType.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The FineTuningTaskType. - public readonly partial struct FineTuningTaskType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FineTuningTaskType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ChatCompletionValue = "ChatCompletion"; - private const string TextCompletionValue = "TextCompletion"; - private const string TextClassificationValue = "TextClassification"; - private const string QuestionAnsweringValue = "QuestionAnswering"; - private const string TextSummarizationValue = "TextSummarization"; - private const string TokenClassificationValue = "TokenClassification"; - private const string TextTranslationValue = "TextTranslation"; - private const string ImageClassificationValue = "ImageClassification"; - private const string ImageInstanceSegmentationValue = "ImageInstanceSegmentation"; - private const string ImageObjectDetectionValue = "ImageObjectDetection"; - private const string VideoMultiObjectTrackingValue = "VideoMultiObjectTracking"; - - /// ChatCompletion. - public static FineTuningTaskType ChatCompletion { get; } = new FineTuningTaskType(ChatCompletionValue); - /// TextCompletion. - public static FineTuningTaskType TextCompletion { get; } = new FineTuningTaskType(TextCompletionValue); - /// TextClassification. - public static FineTuningTaskType TextClassification { get; } = new FineTuningTaskType(TextClassificationValue); - /// QuestionAnswering. - public static FineTuningTaskType QuestionAnswering { get; } = new FineTuningTaskType(QuestionAnsweringValue); - /// TextSummarization. - public static FineTuningTaskType TextSummarization { get; } = new FineTuningTaskType(TextSummarizationValue); - /// TokenClassification. - public static FineTuningTaskType TokenClassification { get; } = new FineTuningTaskType(TokenClassificationValue); - /// TextTranslation. - public static FineTuningTaskType TextTranslation { get; } = new FineTuningTaskType(TextTranslationValue); - /// ImageClassification. - public static FineTuningTaskType ImageClassification { get; } = new FineTuningTaskType(ImageClassificationValue); - /// ImageInstanceSegmentation. - public static FineTuningTaskType ImageInstanceSegmentation { get; } = new FineTuningTaskType(ImageInstanceSegmentationValue); - /// ImageObjectDetection. - public static FineTuningTaskType ImageObjectDetection { get; } = new FineTuningTaskType(ImageObjectDetectionValue); - /// VideoMultiObjectTracking. - public static FineTuningTaskType VideoMultiObjectTracking { get; } = new FineTuningTaskType(VideoMultiObjectTrackingValue); - /// Determines if two values are the same. - public static bool operator ==(FineTuningTaskType left, FineTuningTaskType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FineTuningTaskType left, FineTuningTaskType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator FineTuningTaskType(string value) => new FineTuningTaskType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FineTuningTaskType other && Equals(other); - /// - public bool Equals(FineTuningTaskType 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningVertical.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningVertical.Serialization.cs deleted file mode 100644 index eea74c37f607b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningVertical.Serialization.cs +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - [PersistableModelProxy(typeof(UnknownFineTuningVertical))] - public partial class FineTuningVertical : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(FineTuningVertical)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("modelProvider"u8); - writer.WriteStringValue(ModelProvider.ToString()); - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); - if (Optional.IsDefined(ValidationData)) - { - if (ValidationData != null) - { - writer.WritePropertyName("validationData"u8); - writer.WriteObjectValue(ValidationData, options); - } - else - { - writer.WriteNull("validationData"); - } - } - writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, 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 - } - } - writer.WriteEndObject(); - } - - FineTuningVertical 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(FineTuningVertical)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFineTuningVertical(document.RootElement, options); - } - - internal static FineTuningVertical DeserializeFineTuningVertical(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("modelProvider", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AzureOpenAI": return AzureOpenAiFineTuning.DeserializeAzureOpenAiFineTuning(element, options); - case "Custom": return CustomModelFineTuning.DeserializeCustomModelFineTuning(element, options); - } - } - return UnknownFineTuningVertical.DeserializeUnknownFineTuningVertical(element, options); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(FineTuningVertical)} does not support writing '{options.Format}' format."); - } - } - - FineTuningVertical 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 DeserializeFineTuningVertical(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(FineTuningVertical)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningVertical.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningVertical.cs deleted file mode 100644 index 1e159dda8452b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FineTuningVertical.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public abstract partial class FineTuningVertical - { - /// - /// 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 protected IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// [Required] Fine tuning task type. - /// - /// [Required] Training data for fine tuning. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// [Required] Input model for fine tuning. - /// or is null. - protected FineTuningVertical(FineTuningTaskType taskType, MachineLearningJobInput trainingData, MachineLearningFlowModelJobInput model) - { - Argument.AssertNotNull(trainingData, nameof(trainingData)); - Argument.AssertNotNull(model, nameof(model)); - - TaskType = taskType; - TrainingData = trainingData; - Model = model; - } - - /// Initializes a new instance of . - /// [Required] Enum to determine the type of fine tuning. - /// [Required] Fine tuning task type. - /// - /// [Required] Training data for fine tuning. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// - /// Validation data for fine tuning. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// [Required] Input model for fine tuning. - /// Keeps track of any properties unknown to the library. - internal FineTuningVertical(ModelProvider modelProvider, FineTuningTaskType taskType, MachineLearningJobInput trainingData, MachineLearningJobInput validationData, MachineLearningFlowModelJobInput model, IDictionary serializedAdditionalRawData) - { - ModelProvider = modelProvider; - TaskType = taskType; - TrainingData = trainingData; - ValidationData = validationData; - Model = model; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal FineTuningVertical() - { - } - - /// [Required] Enum to determine the type of fine tuning. - internal ModelProvider ModelProvider { get; set; } - /// [Required] Fine tuning task type. - public FineTuningTaskType TaskType { get; set; } - /// - /// [Required] Training data for fine tuning. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - public MachineLearningJobInput TrainingData { get; set; } - /// - /// Validation data for fine tuning. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - public MachineLearningJobInput ValidationData { get; set; } - /// [Required] Input model for fine tuning. - public MachineLearningFlowModelJobInput Model { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.Serialization.cs index fc22a22947a75..ce3f264eead1a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.Serialization.cs @@ -26,6 +26,24 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp } writer.WriteStartObject(); + writer.WritePropertyName("inputDataType"u8); + writer.WriteStringValue(InputDataType.ToString()); + if (Optional.IsDefined(DataContext)) + { + if (DataContext != null) + { + writer.WritePropertyName("dataContext"u8); + writer.WriteStringValue(DataContext); + } + else + { + writer.WriteNull("dataContext"); + } + } + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); if (Optional.IsCollectionDefined(Columns)) { if (Columns != null) @@ -44,24 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteNull("columns"); } } - if (Optional.IsDefined(DataContext)) - { - if (DataContext != null) - { - writer.WritePropertyName("dataContext"u8); - writer.WriteStringValue(DataContext); - } - else - { - writer.WriteNull("dataContext"); - } - } - writer.WritePropertyName("inputDataType"u8); - writer.WriteStringValue(InputDataType.ToString()); - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -100,28 +100,18 @@ internal static FixedInputData DeserializeFixedInputData(JsonElement element, Mo { return null; } - IDictionary columns = default; - string dataContext = default; MonitoringInputDataType inputDataType = default; + string dataContext = default; JobInputType jobInputType = default; Uri uri = default; + IDictionary columns = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("columns"u8)) + if (property.NameEquals("inputDataType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - columns = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - columns = dictionary; + inputDataType = new MonitoringInputDataType(property.Value.GetString()); continue; } if (property.NameEquals("dataContext"u8)) @@ -134,11 +124,6 @@ internal static FixedInputData DeserializeFixedInputData(JsonElement element, Mo dataContext = property.Value.GetString(); continue; } - if (property.NameEquals("inputDataType"u8)) - { - inputDataType = new MonitoringInputDataType(property.Value.GetString()); - continue; - } if (property.NameEquals("jobInputType"u8)) { jobInputType = new JobInputType(property.Value.GetString()); @@ -149,6 +134,21 @@ internal static FixedInputData DeserializeFixedInputData(JsonElement element, Mo uri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("columns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + columns = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + columns = dictionary; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -156,11 +156,11 @@ internal static FixedInputData DeserializeFixedInputData(JsonElement element, Mo } serializedAdditionalRawData = rawDataDictionary; return new FixedInputData( - columns ?? new ChangeTrackingDictionary(), - dataContext, inputDataType, + dataContext, jobInputType, uri, + columns ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.cs index 8a0d372a92c9b..46ac54bd9a40b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FixedInputData.cs @@ -25,13 +25,13 @@ public FixedInputData(JobInputType jobInputType, Uri uri) : base(jobInputType, u } /// Initializes a new instance of . - /// Mapping of column names to special uses. - /// The context metadata of the data source. /// [Required] Specifies the type of signal to monitor. + /// The context metadata of the data source. /// [Required] Specifies the type of job. /// [Required] Input Asset URI. + /// Mapping of column names to special uses. /// Keeps track of any properties unknown to the library. - internal FixedInputData(IDictionary columns, string dataContext, MonitoringInputDataType inputDataType, JobInputType jobInputType, Uri uri, IDictionary serializedAdditionalRawData) : base(columns, dataContext, inputDataType, jobInputType, uri, serializedAdditionalRawData) + internal FixedInputData(MonitoringInputDataType inputDataType, string dataContext, JobInputType jobInputType, Uri uri, IDictionary columns, IDictionary serializedAdditionalRawData) : base(inputDataType, dataContext, jobInputType, uri, columns, serializedAdditionalRawData) { InputDataType = inputDataType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.Serialization.cs index 63d4631f965de..1728fe0ad35d9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.Serialization.cs @@ -38,55 +38,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteNull("countryOrRegionForHolidays"); } } - if (Optional.IsDefined(CvStepSize)) - { - if (CvStepSize != null) - { - writer.WritePropertyName("cvStepSize"u8); - writer.WriteNumberValue(CvStepSize.Value); - } - else - { - writer.WriteNull("cvStepSize"); - } - } - if (Optional.IsDefined(FeatureLags)) - { - writer.WritePropertyName("featureLags"u8); - writer.WriteStringValue(FeatureLags.Value.ToString()); - } - if (Optional.IsDefined(ForecastHorizon)) - { - writer.WritePropertyName("forecastHorizon"u8); - writer.WriteObjectValue(ForecastHorizon, options); - } - if (Optional.IsDefined(Frequency)) + if (Optional.IsDefined(TimeColumnName)) { - if (Frequency != null) + if (TimeColumnName != null) { - writer.WritePropertyName("frequency"u8); - writer.WriteStringValue(Frequency); + writer.WritePropertyName("timeColumnName"u8); + writer.WriteStringValue(TimeColumnName); } else { - writer.WriteNull("frequency"); + writer.WriteNull("timeColumnName"); } } - if (Optional.IsDefined(Seasonality)) - { - writer.WritePropertyName("seasonality"u8); - writer.WriteObjectValue(Seasonality, options); - } - if (Optional.IsDefined(ShortSeriesHandlingConfig)) - { - writer.WritePropertyName("shortSeriesHandlingConfig"u8); - writer.WriteStringValue(ShortSeriesHandlingConfig.Value.ToString()); - } - if (Optional.IsDefined(TargetAggregateFunction)) - { - writer.WritePropertyName("targetAggregateFunction"u8); - writer.WriteStringValue(TargetAggregateFunction.Value.ToString()); - } if (Optional.IsDefined(TargetLags)) { if (TargetLags != null) @@ -111,17 +74,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteNull("targetRollingWindowSize"); } } - if (Optional.IsDefined(TimeColumnName)) + if (Optional.IsDefined(ForecastHorizon)) { - if (TimeColumnName != null) - { - writer.WritePropertyName("timeColumnName"u8); - writer.WriteStringValue(TimeColumnName); - } - else - { - writer.WriteNull("timeColumnName"); - } + writer.WritePropertyName("forecastHorizon"u8); + writer.WriteObjectValue(ForecastHorizon, options); } if (Optional.IsCollectionDefined(TimeSeriesIdColumnNames)) { @@ -140,11 +96,55 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteNull("timeSeriesIdColumnNames"); } } + if (Optional.IsDefined(Frequency)) + { + if (Frequency != null) + { + writer.WritePropertyName("frequency"u8); + writer.WriteStringValue(Frequency); + } + else + { + writer.WriteNull("frequency"); + } + } + if (Optional.IsDefined(FeatureLags)) + { + writer.WritePropertyName("featureLags"u8); + writer.WriteStringValue(FeatureLags.Value.ToString()); + } + if (Optional.IsDefined(Seasonality)) + { + writer.WritePropertyName("seasonality"u8); + writer.WriteObjectValue(Seasonality, options); + } + if (Optional.IsDefined(ShortSeriesHandlingConfig)) + { + writer.WritePropertyName("shortSeriesHandlingConfig"u8); + writer.WriteStringValue(ShortSeriesHandlingConfig.Value.ToString()); + } if (Optional.IsDefined(UseStl)) { writer.WritePropertyName("useStl"u8); writer.WriteStringValue(UseStl.Value.ToString()); } + if (Optional.IsDefined(TargetAggregateFunction)) + { + writer.WritePropertyName("targetAggregateFunction"u8); + writer.WriteStringValue(TargetAggregateFunction.Value.ToString()); + } + if (Optional.IsDefined(CvStepSize)) + { + if (CvStepSize != null) + { + writer.WritePropertyName("cvStepSize"u8); + writer.WriteNumberValue(CvStepSize.Value); + } + else + { + writer.WriteNull("cvStepSize"); + } + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -184,18 +184,18 @@ internal static ForecastingSettings DeserializeForecastingSettings(JsonElement e return null; } string countryOrRegionForHolidays = default; - int? cvStepSize = default; - MachineLearningFeatureLag? featureLags = default; + string timeColumnName = default; + TargetLags targetLags = default; + TargetRollingWindowSize targetRollingWindowSize = default; ForecastHorizon forecastHorizon = default; + IList timeSeriesIdColumnNames = default; string frequency = default; + MachineLearningFeatureLag? featureLags = default; ForecastingSeasonality seasonality = default; MachineLearningShortSeriesHandlingConfiguration? shortSeriesHandlingConfig = default; - TargetAggregationFunction? targetAggregateFunction = default; - TargetLags targetLags = default; - TargetRollingWindowSize targetRollingWindowSize = default; - string timeColumnName = default; - IList timeSeriesIdColumnNames = default; MachineLearningUseStl? useStl = default; + TargetAggregationFunction? targetAggregateFunction = default; + int? cvStepSize = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -210,123 +210,123 @@ internal static ForecastingSettings DeserializeForecastingSettings(JsonElement e countryOrRegionForHolidays = property.Value.GetString(); continue; } - if (property.NameEquals("cvStepSize"u8)) + if (property.NameEquals("timeColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - cvStepSize = null; + timeColumnName = null; continue; } - cvStepSize = property.Value.GetInt32(); + timeColumnName = property.Value.GetString(); continue; } - if (property.NameEquals("featureLags"u8)) + if (property.NameEquals("targetLags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + targetLags = null; continue; } - featureLags = new MachineLearningFeatureLag(property.Value.GetString()); + targetLags = TargetLags.DeserializeTargetLags(property.Value, options); continue; } - if (property.NameEquals("forecastHorizon"u8)) + if (property.NameEquals("targetRollingWindowSize"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + targetRollingWindowSize = null; continue; } - forecastHorizon = ForecastHorizon.DeserializeForecastHorizon(property.Value, options); + targetRollingWindowSize = TargetRollingWindowSize.DeserializeTargetRollingWindowSize(property.Value, options); continue; } - if (property.NameEquals("frequency"u8)) + if (property.NameEquals("forecastHorizon"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - frequency = null; continue; } - frequency = property.Value.GetString(); + forecastHorizon = ForecastHorizon.DeserializeForecastHorizon(property.Value, options); continue; } - if (property.NameEquals("seasonality"u8)) + if (property.NameEquals("timeSeriesIdColumnNames"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + timeSeriesIdColumnNames = null; continue; } - seasonality = ForecastingSeasonality.DeserializeForecastingSeasonality(property.Value, options); + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + timeSeriesIdColumnNames = array; continue; } - if (property.NameEquals("shortSeriesHandlingConfig"u8)) + if (property.NameEquals("frequency"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + frequency = null; continue; } - shortSeriesHandlingConfig = new MachineLearningShortSeriesHandlingConfiguration(property.Value.GetString()); + frequency = property.Value.GetString(); continue; } - if (property.NameEquals("targetAggregateFunction"u8)) + if (property.NameEquals("featureLags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - targetAggregateFunction = new TargetAggregationFunction(property.Value.GetString()); + featureLags = new MachineLearningFeatureLag(property.Value.GetString()); continue; } - if (property.NameEquals("targetLags"u8)) + if (property.NameEquals("seasonality"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - targetLags = null; continue; } - targetLags = TargetLags.DeserializeTargetLags(property.Value, options); + seasonality = ForecastingSeasonality.DeserializeForecastingSeasonality(property.Value, options); continue; } - if (property.NameEquals("targetRollingWindowSize"u8)) + if (property.NameEquals("shortSeriesHandlingConfig"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - targetRollingWindowSize = null; continue; } - targetRollingWindowSize = TargetRollingWindowSize.DeserializeTargetRollingWindowSize(property.Value, options); + shortSeriesHandlingConfig = new MachineLearningShortSeriesHandlingConfiguration(property.Value.GetString()); continue; } - if (property.NameEquals("timeColumnName"u8)) + if (property.NameEquals("useStl"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - timeColumnName = null; continue; } - timeColumnName = property.Value.GetString(); + useStl = new MachineLearningUseStl(property.Value.GetString()); continue; } - if (property.NameEquals("timeSeriesIdColumnNames"u8)) + if (property.NameEquals("targetAggregateFunction"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - timeSeriesIdColumnNames = null; continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - timeSeriesIdColumnNames = array; + targetAggregateFunction = new TargetAggregationFunction(property.Value.GetString()); continue; } - if (property.NameEquals("useStl"u8)) + if (property.NameEquals("cvStepSize"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + cvStepSize = null; continue; } - useStl = new MachineLearningUseStl(property.Value.GetString()); + cvStepSize = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -337,18 +337,18 @@ internal static ForecastingSettings DeserializeForecastingSettings(JsonElement e serializedAdditionalRawData = rawDataDictionary; return new ForecastingSettings( countryOrRegionForHolidays, - cvStepSize, - featureLags, + timeColumnName, + targetLags, + targetRollingWindowSize, forecastHorizon, + timeSeriesIdColumnNames ?? new ChangeTrackingList(), frequency, + featureLags, seasonality, shortSeriesHandlingConfig, - targetAggregateFunction, - targetLags, - targetRollingWindowSize, - timeColumnName, - timeSeriesIdColumnNames ?? new ChangeTrackingList(), useStl, + targetAggregateFunction, + cvStepSize, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.cs index 27a0f5bc4046f..0163af4fc46d1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.cs @@ -56,18 +56,28 @@ public ForecastingSettings() /// Country or region for holidays for forecasting tasks. /// These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. /// - /// - /// Number of periods between the origin time of one CV fold and the next fold. For - /// example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be - /// three days apart. + /// The name of the time column. This parameter is required when forecasting to specify the datetime column in the input data used for building the time series and inferring its frequency. + /// + /// The number of past periods to lag from the target column. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// The number of past periods used to create a rolling window average of the target column. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . /// - /// Flag for generating lags for the numeric features with 'auto' or null. /// /// The desired maximum forecast horizon in units of time-series frequency. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// + /// + /// The names of columns used to group a timeseries. It can be used to create multiple series. + /// If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type forecasting. + /// /// When forecasting, this parameter represents the period with which the forecast is desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default. + /// Flag for generating lags for the numeric features with 'auto' or null. /// /// Set time series seasonality as an integer multiple of the series frequency. /// If seasonality is set to 'auto', it will be inferred. @@ -75,42 +85,32 @@ public ForecastingSettings() /// The available derived classes include and . /// /// The parameter defining how if AutoML should handle short time series. + /// Configure STL Decomposition of the time-series target column. /// /// The function to be used to aggregate the time series target column to conform to a user specified frequency. /// If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. The possible target aggregation functions are: "sum", "max", "min" and "mean". /// - /// - /// The number of past periods to lag from the target column. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// - /// The number of past periods used to create a rolling window average of the target column. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - /// The name of the time column. This parameter is required when forecasting to specify the datetime column in the input data used for building the time series and inferring its frequency. - /// - /// The names of columns used to group a timeseries. It can be used to create multiple series. - /// If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type forecasting. + /// + /// Number of periods between the origin time of one CV fold and the next fold. For + /// example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be + /// three days apart. /// - /// Configure STL Decomposition of the time-series target column. /// Keeps track of any properties unknown to the library. - internal ForecastingSettings(string countryOrRegionForHolidays, int? cvStepSize, MachineLearningFeatureLag? featureLags, ForecastHorizon forecastHorizon, string frequency, ForecastingSeasonality seasonality, MachineLearningShortSeriesHandlingConfiguration? shortSeriesHandlingConfig, TargetAggregationFunction? targetAggregateFunction, TargetLags targetLags, TargetRollingWindowSize targetRollingWindowSize, string timeColumnName, IList timeSeriesIdColumnNames, MachineLearningUseStl? useStl, IDictionary serializedAdditionalRawData) + internal ForecastingSettings(string countryOrRegionForHolidays, string timeColumnName, TargetLags targetLags, TargetRollingWindowSize targetRollingWindowSize, ForecastHorizon forecastHorizon, IList timeSeriesIdColumnNames, string frequency, MachineLearningFeatureLag? featureLags, ForecastingSeasonality seasonality, MachineLearningShortSeriesHandlingConfiguration? shortSeriesHandlingConfig, MachineLearningUseStl? useStl, TargetAggregationFunction? targetAggregateFunction, int? cvStepSize, IDictionary serializedAdditionalRawData) { CountryOrRegionForHolidays = countryOrRegionForHolidays; - CvStepSize = cvStepSize; - FeatureLags = featureLags; + TimeColumnName = timeColumnName; + TargetLags = targetLags; + TargetRollingWindowSize = targetRollingWindowSize; ForecastHorizon = forecastHorizon; + TimeSeriesIdColumnNames = timeSeriesIdColumnNames; Frequency = frequency; + FeatureLags = featureLags; Seasonality = seasonality; ShortSeriesHandlingConfig = shortSeriesHandlingConfig; - TargetAggregateFunction = targetAggregateFunction; - TargetLags = targetLags; - TargetRollingWindowSize = targetRollingWindowSize; - TimeColumnName = timeColumnName; - TimeSeriesIdColumnNames = timeSeriesIdColumnNames; UseStl = useStl; + TargetAggregateFunction = targetAggregateFunction; + CvStepSize = cvStepSize; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -119,22 +119,35 @@ internal ForecastingSettings(string countryOrRegionForHolidays, int? cvStepSize, /// These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. /// public string CountryOrRegionForHolidays { get; set; } + /// The name of the time column. This parameter is required when forecasting to specify the datetime column in the input data used for building the time series and inferring its frequency. + public string TimeColumnName { get; set; } /// - /// Number of periods between the origin time of one CV fold and the next fold. For - /// example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be - /// three days apart. + /// The number of past periods to lag from the target column. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . /// - public int? CvStepSize { get; set; } - /// Flag for generating lags for the numeric features with 'auto' or null. - public MachineLearningFeatureLag? FeatureLags { get; set; } + public TargetLags TargetLags { get; set; } + /// + /// The number of past periods used to create a rolling window average of the target column. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public TargetRollingWindowSize TargetRollingWindowSize { get; set; } /// /// The desired maximum forecast horizon in units of time-series frequency. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// public ForecastHorizon ForecastHorizon { get; set; } + /// + /// The names of columns used to group a timeseries. It can be used to create multiple series. + /// If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type forecasting. + /// + public IList TimeSeriesIdColumnNames { get; set; } /// When forecasting, this parameter represents the period with which the forecast is desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default. public string Frequency { get; set; } + /// Flag for generating lags for the numeric features with 'auto' or null. + public MachineLearningFeatureLag? FeatureLags { get; set; } /// /// Set time series seasonality as an integer multiple of the series frequency. /// If seasonality is set to 'auto', it will be inferred. @@ -144,31 +157,18 @@ internal ForecastingSettings(string countryOrRegionForHolidays, int? cvStepSize, public ForecastingSeasonality Seasonality { get; set; } /// The parameter defining how if AutoML should handle short time series. public MachineLearningShortSeriesHandlingConfiguration? ShortSeriesHandlingConfig { get; set; } + /// Configure STL Decomposition of the time-series target column. + public MachineLearningUseStl? UseStl { get; set; } /// /// The function to be used to aggregate the time series target column to conform to a user specified frequency. /// If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. The possible target aggregation functions are: "sum", "max", "min" and "mean". /// public TargetAggregationFunction? TargetAggregateFunction { get; set; } /// - /// The number of past periods to lag from the target column. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public TargetLags TargetLags { get; set; } - /// - /// The number of past periods used to create a rolling window average of the target column. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// - public TargetRollingWindowSize TargetRollingWindowSize { get; set; } - /// The name of the time column. This parameter is required when forecasting to specify the datetime column in the input data used for building the time series and inferring its frequency. - public string TimeColumnName { get; set; } - /// - /// The names of columns used to group a timeseries. It can be used to create multiple series. - /// If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type forecasting. + /// Number of periods between the origin time of one CV fold and the next fold. For + /// example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be + /// three days apart. /// - public IList TimeSeriesIdColumnNames { get; set; } - /// Configure STL Decomposition of the time-series target column. - public MachineLearningUseStl? UseStl { get; set; } + public int? CvStepSize { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.Serialization.cs index dd2012704c136..fb17c101af649 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.Serialization.cs @@ -60,21 +60,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteNull("blockedTrainingAlgorithms"); } } - if (Optional.IsDefined(IsDnnTrainingEnabled)) - { - writer.WritePropertyName("enableDnnTraining"u8); - writer.WriteBooleanValue(IsDnnTrainingEnabled.Value); - } - if (Optional.IsDefined(IsModelExplainabilityEnabled)) - { - writer.WritePropertyName("enableModelExplainability"u8); - writer.WriteBooleanValue(IsModelExplainabilityEnabled.Value); - } if (Optional.IsDefined(IsOnnxCompatibleModelsEnabled)) { writer.WritePropertyName("enableOnnxCompatibleModels"u8); writer.WriteBooleanValue(IsOnnxCompatibleModelsEnabled.Value); } + if (Optional.IsDefined(StackEnsembleSettings)) + { + if (StackEnsembleSettings != null) + { + writer.WritePropertyName("stackEnsembleSettings"u8); + writer.WriteObjectValue(StackEnsembleSettings, options); + } + else + { + writer.WriteNull("stackEnsembleSettings"); + } + } if (Optional.IsDefined(IsStackEnsembleEnabled)) { writer.WritePropertyName("enableStackEnsemble"u8); @@ -90,17 +92,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("ensembleModelDownloadTimeout"u8); writer.WriteStringValue(EnsembleModelDownloadTimeout.Value, "P"); } - if (Optional.IsDefined(StackEnsembleSettings)) + if (Optional.IsDefined(IsModelExplainabilityEnabled)) { - if (StackEnsembleSettings != null) - { - writer.WritePropertyName("stackEnsembleSettings"u8); - writer.WriteObjectValue(StackEnsembleSettings, options); - } - else - { - writer.WriteNull("stackEnsembleSettings"); - } + writer.WritePropertyName("enableModelExplainability"u8); + writer.WriteBooleanValue(IsModelExplainabilityEnabled.Value); + } + if (Optional.IsDefined(IsDnnTrainingEnabled)) + { + writer.WritePropertyName("enableDnnTraining"u8); + writer.WriteBooleanValue(IsDnnTrainingEnabled.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -142,13 +142,13 @@ internal static ForecastingTrainingSettings DeserializeForecastingTrainingSettin } IList allowedTrainingAlgorithms = default; IList blockedTrainingAlgorithms = default; - bool? enableDnnTraining = default; - bool? enableModelExplainability = default; bool? enableOnnxCompatibleModels = default; + MachineLearningStackEnsembleSettings stackEnsembleSettings = default; bool? enableStackEnsemble = default; bool? enableVoteEnsemble = default; TimeSpan? ensembleModelDownloadTimeout = default; - MachineLearningStackEnsembleSettings stackEnsembleSettings = default; + bool? enableModelExplainability = default; + bool? enableDnnTraining = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -183,68 +183,68 @@ internal static ForecastingTrainingSettings DeserializeForecastingTrainingSettin blockedTrainingAlgorithms = array; continue; } - if (property.NameEquals("enableDnnTraining"u8)) + if (property.NameEquals("enableOnnxCompatibleModels"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableDnnTraining = property.Value.GetBoolean(); + enableOnnxCompatibleModels = property.Value.GetBoolean(); continue; } - if (property.NameEquals("enableModelExplainability"u8)) + if (property.NameEquals("stackEnsembleSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + stackEnsembleSettings = null; continue; } - enableModelExplainability = property.Value.GetBoolean(); + stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value, options); continue; } - if (property.NameEquals("enableOnnxCompatibleModels"u8)) + if (property.NameEquals("enableStackEnsemble"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableOnnxCompatibleModels = property.Value.GetBoolean(); + enableStackEnsemble = property.Value.GetBoolean(); continue; } - if (property.NameEquals("enableStackEnsemble"u8)) + if (property.NameEquals("enableVoteEnsemble"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableStackEnsemble = property.Value.GetBoolean(); + enableVoteEnsemble = property.Value.GetBoolean(); continue; } - if (property.NameEquals("enableVoteEnsemble"u8)) + if (property.NameEquals("ensembleModelDownloadTimeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableVoteEnsemble = property.Value.GetBoolean(); + ensembleModelDownloadTimeout = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("ensembleModelDownloadTimeout"u8)) + if (property.NameEquals("enableModelExplainability"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - ensembleModelDownloadTimeout = property.Value.GetTimeSpan("P"); + enableModelExplainability = property.Value.GetBoolean(); continue; } - if (property.NameEquals("stackEnsembleSettings"u8)) + if (property.NameEquals("enableDnnTraining"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - stackEnsembleSettings = null; continue; } - stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value, options); + enableDnnTraining = property.Value.GetBoolean(); continue; } if (options.Format != "W") @@ -254,13 +254,13 @@ internal static ForecastingTrainingSettings DeserializeForecastingTrainingSettin } serializedAdditionalRawData = rawDataDictionary; return new ForecastingTrainingSettings( - enableDnnTraining, - enableModelExplainability, enableOnnxCompatibleModels, + stackEnsembleSettings, enableStackEnsemble, enableVoteEnsemble, ensembleModelDownloadTimeout, - stackEnsembleSettings, + enableModelExplainability, + enableDnnTraining, serializedAdditionalRawData, allowedTrainingAlgorithms ?? new ChangeTrackingList(), blockedTrainingAlgorithms ?? new ChangeTrackingList()); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.cs index 54164528aa3f9..1b651e22fb92c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.cs @@ -21,20 +21,20 @@ public ForecastingTrainingSettings() } /// Initializes a new instance of . - /// Enable recommendation of DNN models. - /// Flag to turn on explainability on best model. /// Flag for enabling onnx compatible models. + /// Stack ensemble settings for stack ensemble run. /// Enable stack ensemble run. /// Enable voting ensemble run. /// /// During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. /// Configure this parameter with a higher value than 300 secs, if more time is needed. /// - /// Stack ensemble settings for stack ensemble run. + /// Flag to turn on explainability on best model. + /// Enable recommendation of DNN models. /// Keeps track of any properties unknown to the library. /// Allowed models for forecasting task. /// Blocked models for forecasting task. - internal ForecastingTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, IDictionary serializedAdditionalRawData, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isDnnTrainingEnabled, isModelExplainabilityEnabled, isOnnxCompatibleModelsEnabled, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, stackEnsembleSettings, serializedAdditionalRawData) + internal ForecastingTrainingSettings(bool? isOnnxCompatibleModelsEnabled, MachineLearningStackEnsembleSettings stackEnsembleSettings, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, bool? isModelExplainabilityEnabled, bool? isDnnTrainingEnabled, IDictionary serializedAdditionalRawData, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isOnnxCompatibleModelsEnabled, stackEnsembleSettings, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, isModelExplainabilityEnabled, isDnnTrainingEnabled, serializedAdditionalRawData) { AllowedTrainingAlgorithms = allowedTrainingAlgorithms; BlockedTrainingAlgorithms = blockedTrainingAlgorithms; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.Serialization.cs index 092782e3911c1..140c0f591f36e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.Serialization.cs @@ -36,16 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.Value.ToString()); } - if (options.Format != "W" && Optional.IsCollectionDefined(ParentRuleNames)) - { - writer.WritePropertyName("parentRuleNames"u8); - writer.WriteStartArray(); - foreach (var item in ParentRuleNames) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -93,7 +83,6 @@ internal static FqdnOutboundRule DeserializeFqdnOutboundRule(JsonElement element } string destination = default; OutboundRuleCategory? category = default; - IReadOnlyList parentRuleNames = default; OutboundRuleStatus? status = default; OutboundRuleType type = default; IDictionary serializedAdditionalRawData = default; @@ -114,20 +103,6 @@ internal static FqdnOutboundRule DeserializeFqdnOutboundRule(JsonElement element category = new OutboundRuleCategory(property.Value.GetString()); continue; } - if (property.NameEquals("parentRuleNames"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - parentRuleNames = array; - continue; - } if (property.NameEquals("status"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -148,13 +123,7 @@ internal static FqdnOutboundRule DeserializeFqdnOutboundRule(JsonElement element } } serializedAdditionalRawData = rawDataDictionary; - return new FqdnOutboundRule( - category, - parentRuleNames ?? new ChangeTrackingList(), - status, - type, - serializedAdditionalRawData, - destination); + return new FqdnOutboundRule(category, status, type, serializedAdditionalRawData, destination); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.cs index 2e894cb2e3b49..77d3b297e501c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnOutboundRule.cs @@ -21,12 +21,11 @@ public FqdnOutboundRule() /// Initializes a new instance of . /// Category of a managed network Outbound Rule of a machine learning workspace. - /// /// Type of a managed network Outbound Rule of a machine learning workspace. /// Type of a managed network Outbound Rule of a machine learning workspace. /// Keeps track of any properties unknown to the library. /// - internal FqdnOutboundRule(OutboundRuleCategory? category, IReadOnlyList parentRuleNames, OutboundRuleStatus? status, OutboundRuleType outboundRuleType, IDictionary serializedAdditionalRawData, string destination) : base(category, parentRuleNames, status, outboundRuleType, serializedAdditionalRawData) + internal FqdnOutboundRule(OutboundRuleCategory? category, OutboundRuleStatus? status, OutboundRuleType outboundRuleType, IDictionary serializedAdditionalRawData, string destination) : base(category, status, outboundRuleType, serializedAdditionalRawData) { Destination = destination; OutboundRuleType = outboundRuleType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GetBlobReferenceForConsumptionDto.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GetBlobReferenceForConsumptionDto.Serialization.cs index 3d9887f1f8464..2217a09f9bcdf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GetBlobReferenceForConsumptionDto.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GetBlobReferenceForConsumptionDto.Serialization.cs @@ -38,28 +38,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("blobUri"); } } - if (Optional.IsDefined(Credential)) + if (Optional.IsDefined(StorageAccountArmId)) { - if (Credential != null) + if (StorageAccountArmId != null) { - writer.WritePropertyName("credential"u8); - writer.WriteObjectValue(Credential, options); + writer.WritePropertyName("storageAccountArmId"u8); + writer.WriteStringValue(StorageAccountArmId); } else { - writer.WriteNull("credential"); + writer.WriteNull("storageAccountArmId"); } } - if (Optional.IsDefined(StorageAccountArmId)) + if (Optional.IsDefined(Credential)) { - if (StorageAccountArmId != null) + if (Credential != null) { - writer.WritePropertyName("storageAccountArmId"u8); - writer.WriteStringValue(StorageAccountArmId); + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential, options); } else { - writer.WriteNull("storageAccountArmId"); + writer.WriteNull("credential"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -101,8 +101,8 @@ internal static GetBlobReferenceForConsumptionDto DeserializeGetBlobReferenceFor return null; } Uri blobUri = default; - DataReferenceCredential credential = default; string storageAccountArmId = default; + DataReferenceCredential credential = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -117,24 +117,24 @@ internal static GetBlobReferenceForConsumptionDto DeserializeGetBlobReferenceFor blobUri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("credential"u8)) + if (property.NameEquals("storageAccountArmId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - credential = null; + storageAccountArmId = null; continue; } - credential = DataReferenceCredential.DeserializeDataReferenceCredential(property.Value, options); + storageAccountArmId = property.Value.GetString(); continue; } - if (property.NameEquals("storageAccountArmId"u8)) + if (property.NameEquals("credential"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - storageAccountArmId = null; + credential = null; continue; } - storageAccountArmId = property.Value.GetString(); + credential = DataReferenceCredential.DeserializeDataReferenceCredential(property.Value, options); continue; } if (options.Format != "W") @@ -143,7 +143,7 @@ internal static GetBlobReferenceForConsumptionDto DeserializeGetBlobReferenceFor } } serializedAdditionalRawData = rawDataDictionary; - return new GetBlobReferenceForConsumptionDto(blobUri, credential, storageAccountArmId, serializedAdditionalRawData); + return new GetBlobReferenceForConsumptionDto(blobUri, storageAccountArmId, credential, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GetBlobReferenceForConsumptionDto.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GetBlobReferenceForConsumptionDto.cs index 8ccc893decb10..b198e425aad76 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GetBlobReferenceForConsumptionDto.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GetBlobReferenceForConsumptionDto.cs @@ -52,30 +52,30 @@ internal GetBlobReferenceForConsumptionDto() /// Initializes a new instance of . /// Blob uri, example: https://blob.windows.core.net/Container/Path. + /// The ARM id of the storage account. /// /// Credential info to access storage account /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , and . /// - /// The ARM id of the storage account. /// Keeps track of any properties unknown to the library. - internal GetBlobReferenceForConsumptionDto(Uri blobUri, DataReferenceCredential credential, string storageAccountArmId, IDictionary serializedAdditionalRawData) + internal GetBlobReferenceForConsumptionDto(Uri blobUri, string storageAccountArmId, DataReferenceCredential credential, IDictionary serializedAdditionalRawData) { BlobUri = blobUri; - Credential = credential; StorageAccountArmId = storageAccountArmId; + Credential = credential; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Blob uri, example: https://blob.windows.core.net/Container/Path. public Uri BlobUri { get; } + /// The ARM id of the storage account. + public string StorageAccountArmId { get; } /// /// Credential info to access storage account /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , and . /// public DataReferenceCredential Credential { get; } - /// The ARM id of the storage account. - public string StorageAccountArmId { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.Serialization.cs deleted file mode 100644 index 55adb88cc6188..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.Serialization.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class IdleShutdownSetting : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(IdleShutdownSetting)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(IdleTimeBeforeShutdown)) - { - writer.WritePropertyName("idleTimeBeforeShutdown"u8); - writer.WriteStringValue(IdleTimeBeforeShutdown); - } - 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 - } - } - writer.WriteEndObject(); - } - - IdleShutdownSetting 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(IdleShutdownSetting)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeIdleShutdownSetting(document.RootElement, options); - } - - internal static IdleShutdownSetting DeserializeIdleShutdownSetting(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string idleTimeBeforeShutdown = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("idleTimeBeforeShutdown"u8)) - { - idleTimeBeforeShutdown = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new IdleShutdownSetting(idleTimeBeforeShutdown, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(IdleShutdownSetting)} does not support writing '{options.Format}' format."); - } - } - - IdleShutdownSetting 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 DeserializeIdleShutdownSetting(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(IdleShutdownSetting)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.cs deleted file mode 100644 index 43cc9165f1468..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdleShutdownSetting.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Stops compute instance after user defined period of inactivity. - public partial class IdleShutdownSetting - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public IdleShutdownSetting() - { - } - - /// Initializes a new instance of . - /// Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. - /// Keeps track of any properties unknown to the library. - internal IdleShutdownSetting(string idleTimeBeforeShutdown, IDictionary serializedAdditionalRawData) - { - IdleTimeBeforeShutdown = idleTimeBeforeShutdown; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. - public string IdleTimeBeforeShutdown { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassification.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassification.Serialization.cs index d82fca62355a7..47d4a714d7132 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassification.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassification.Serialization.cs @@ -98,11 +98,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteNull("validationDataSize"); } } + writer.WritePropertyName("taskType"u8); + writer.WriteStringValue(TaskType.ToString()); if (Optional.IsDefined(LogVerbosity)) { writer.WritePropertyName("logVerbosity"u8); writer.WriteStringValue(LogVerbosity.Value.ToString()); } + writer.WritePropertyName("trainingData"u8); + writer.WriteObjectValue(TrainingData, options); if (Optional.IsDefined(TargetColumnName)) { if (TargetColumnName != null) @@ -115,10 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri writer.WriteNull("targetColumnName"); } } - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -164,10 +164,10 @@ internal static ImageClassification DeserializeImageClassification(JsonElement e ImageSweepSettings sweepSettings = default; MachineLearningTableJobInput validationData = default; double? validationDataSize = default; - MachineLearningLogVerbosity? logVerbosity = default; - string targetColumnName = default; TaskType taskType = default; + MachineLearningLogVerbosity? logVerbosity = default; MachineLearningTableJobInput trainingData = default; + string targetColumnName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -241,6 +241,11 @@ internal static ImageClassification DeserializeImageClassification(JsonElement e validationDataSize = property.Value.GetDouble(); continue; } + if (property.NameEquals("taskType"u8)) + { + taskType = new TaskType(property.Value.GetString()); + continue; + } if (property.NameEquals("logVerbosity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -250,6 +255,11 @@ internal static ImageClassification DeserializeImageClassification(JsonElement e logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } + if (property.NameEquals("trainingData"u8)) + { + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); + continue; + } if (property.NameEquals("targetColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -260,16 +270,6 @@ internal static ImageClassification DeserializeImageClassification(JsonElement e targetColumnName = property.Value.GetString(); continue; } - if (property.NameEquals("taskType"u8)) - { - taskType = new TaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData"u8)) - { - trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -277,10 +277,10 @@ internal static ImageClassification DeserializeImageClassification(JsonElement e } serializedAdditionalRawData = rawDataDictionary; return new ImageClassification( - logVerbosity, - targetColumnName, taskType, + logVerbosity, trainingData, + targetColumnName, serializedAdditionalRawData, primaryMetric, modelSettings, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassification.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassification.cs index 1f4b4f62277c4..432c3c088cb0a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassification.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassification.cs @@ -31,13 +31,13 @@ public ImageClassification(MachineLearningTableJobInput trainingData, ImageLimit } /// Initializes a new instance of . + /// [Required] Task type for AutoMLJob. /// Log verbosity for the job. + /// [Required] Training data input. /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. /// Keeps track of any properties unknown to the library. /// Primary metric to optimize for this task. /// Settings used for training the model. @@ -50,7 +50,7 @@ public ImageClassification(MachineLearningTableJobInput trainingData, ImageLimit /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - internal ImageClassification(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, IDictionary serializedAdditionalRawData, ClassificationPrimaryMetric? primaryMetric, ImageModelSettingsClassification modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MachineLearningTableJobInput validationData, double? validationDataSize) : base(logVerbosity, targetColumnName, taskType, trainingData, serializedAdditionalRawData) + internal ImageClassification(TaskType taskType, MachineLearningLogVerbosity? logVerbosity, MachineLearningTableJobInput trainingData, string targetColumnName, IDictionary serializedAdditionalRawData, ClassificationPrimaryMetric? primaryMetric, ImageModelSettingsClassification modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MachineLearningTableJobInput validationData, double? validationDataSize) : base(taskType, logVerbosity, trainingData, targetColumnName, serializedAdditionalRawData) { PrimaryMetric = primaryMetric; ModelSettings = modelSettings; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassificationMultilabel.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassificationMultilabel.Serialization.cs index a1fdea0983f06..b49628ecb2d7d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassificationMultilabel.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassificationMultilabel.Serialization.cs @@ -98,11 +98,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteNull("validationDataSize"); } } + writer.WritePropertyName("taskType"u8); + writer.WriteStringValue(TaskType.ToString()); if (Optional.IsDefined(LogVerbosity)) { writer.WritePropertyName("logVerbosity"u8); writer.WriteStringValue(LogVerbosity.Value.ToString()); } + writer.WritePropertyName("trainingData"u8); + writer.WriteObjectValue(TrainingData, options); if (Optional.IsDefined(TargetColumnName)) { if (TargetColumnName != null) @@ -115,10 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteNull("targetColumnName"); } } - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -164,10 +164,10 @@ internal static ImageClassificationMultilabel DeserializeImageClassificationMult ImageSweepSettings sweepSettings = default; MachineLearningTableJobInput validationData = default; double? validationDataSize = default; - MachineLearningLogVerbosity? logVerbosity = default; - string targetColumnName = default; TaskType taskType = default; + MachineLearningLogVerbosity? logVerbosity = default; MachineLearningTableJobInput trainingData = default; + string targetColumnName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -241,6 +241,11 @@ internal static ImageClassificationMultilabel DeserializeImageClassificationMult validationDataSize = property.Value.GetDouble(); continue; } + if (property.NameEquals("taskType"u8)) + { + taskType = new TaskType(property.Value.GetString()); + continue; + } if (property.NameEquals("logVerbosity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -250,6 +255,11 @@ internal static ImageClassificationMultilabel DeserializeImageClassificationMult logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } + if (property.NameEquals("trainingData"u8)) + { + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); + continue; + } if (property.NameEquals("targetColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -260,16 +270,6 @@ internal static ImageClassificationMultilabel DeserializeImageClassificationMult targetColumnName = property.Value.GetString(); continue; } - if (property.NameEquals("taskType"u8)) - { - taskType = new TaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData"u8)) - { - trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -277,10 +277,10 @@ internal static ImageClassificationMultilabel DeserializeImageClassificationMult } serializedAdditionalRawData = rawDataDictionary; return new ImageClassificationMultilabel( - logVerbosity, - targetColumnName, taskType, + logVerbosity, trainingData, + targetColumnName, serializedAdditionalRawData, primaryMetric, modelSettings, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassificationMultilabel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassificationMultilabel.cs index 6940efdee6ba3..acd737fc2ba15 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassificationMultilabel.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassificationMultilabel.cs @@ -31,13 +31,13 @@ public ImageClassificationMultilabel(MachineLearningTableJobInput trainingData, } /// Initializes a new instance of . + /// [Required] Task type for AutoMLJob. /// Log verbosity for the job. + /// [Required] Training data input. /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. /// Keeps track of any properties unknown to the library. /// Primary metric to optimize for this task. /// Settings used for training the model. @@ -50,7 +50,7 @@ public ImageClassificationMultilabel(MachineLearningTableJobInput trainingData, /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - internal ImageClassificationMultilabel(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, IDictionary serializedAdditionalRawData, ClassificationMultilabelPrimaryMetric? primaryMetric, ImageModelSettingsClassification modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MachineLearningTableJobInput validationData, double? validationDataSize) : base(logVerbosity, targetColumnName, taskType, trainingData, serializedAdditionalRawData) + internal ImageClassificationMultilabel(TaskType taskType, MachineLearningLogVerbosity? logVerbosity, MachineLearningTableJobInput trainingData, string targetColumnName, IDictionary serializedAdditionalRawData, ClassificationMultilabelPrimaryMetric? primaryMetric, ImageModelSettingsClassification modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MachineLearningTableJobInput validationData, double? validationDataSize) : base(taskType, logVerbosity, trainingData, targetColumnName, serializedAdditionalRawData) { PrimaryMetric = primaryMetric; ModelSettings = modelSettings; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageInstanceSegmentation.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageInstanceSegmentation.Serialization.cs index 25138f1aa2e76..d6346637c598f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageInstanceSegmentation.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageInstanceSegmentation.Serialization.cs @@ -98,11 +98,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNull("validationDataSize"); } } + writer.WritePropertyName("taskType"u8); + writer.WriteStringValue(TaskType.ToString()); if (Optional.IsDefined(LogVerbosity)) { writer.WritePropertyName("logVerbosity"u8); writer.WriteStringValue(LogVerbosity.Value.ToString()); } + writer.WritePropertyName("trainingData"u8); + writer.WriteObjectValue(TrainingData, options); if (Optional.IsDefined(TargetColumnName)) { if (TargetColumnName != null) @@ -115,10 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNull("targetColumnName"); } } - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -164,10 +164,10 @@ internal static ImageInstanceSegmentation DeserializeImageInstanceSegmentation(J ImageSweepSettings sweepSettings = default; MachineLearningTableJobInput validationData = default; double? validationDataSize = default; - MachineLearningLogVerbosity? logVerbosity = default; - string targetColumnName = default; TaskType taskType = default; + MachineLearningLogVerbosity? logVerbosity = default; MachineLearningTableJobInput trainingData = default; + string targetColumnName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -241,6 +241,11 @@ internal static ImageInstanceSegmentation DeserializeImageInstanceSegmentation(J validationDataSize = property.Value.GetDouble(); continue; } + if (property.NameEquals("taskType"u8)) + { + taskType = new TaskType(property.Value.GetString()); + continue; + } if (property.NameEquals("logVerbosity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -250,6 +255,11 @@ internal static ImageInstanceSegmentation DeserializeImageInstanceSegmentation(J logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } + if (property.NameEquals("trainingData"u8)) + { + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); + continue; + } if (property.NameEquals("targetColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -260,16 +270,6 @@ internal static ImageInstanceSegmentation DeserializeImageInstanceSegmentation(J targetColumnName = property.Value.GetString(); continue; } - if (property.NameEquals("taskType"u8)) - { - taskType = new TaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData"u8)) - { - trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -277,10 +277,10 @@ internal static ImageInstanceSegmentation DeserializeImageInstanceSegmentation(J } serializedAdditionalRawData = rawDataDictionary; return new ImageInstanceSegmentation( - logVerbosity, - targetColumnName, taskType, + logVerbosity, trainingData, + targetColumnName, serializedAdditionalRawData, primaryMetric, modelSettings, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageInstanceSegmentation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageInstanceSegmentation.cs index 7e726c099a7d1..399499c15c01c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageInstanceSegmentation.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageInstanceSegmentation.cs @@ -31,13 +31,13 @@ public ImageInstanceSegmentation(MachineLearningTableJobInput trainingData, Imag } /// Initializes a new instance of . + /// [Required] Task type for AutoMLJob. /// Log verbosity for the job. + /// [Required] Training data input. /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. /// Keeps track of any properties unknown to the library. /// Primary metric to optimize for this task. /// Settings used for training the model. @@ -50,7 +50,7 @@ public ImageInstanceSegmentation(MachineLearningTableJobInput trainingData, Imag /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - internal ImageInstanceSegmentation(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, IDictionary serializedAdditionalRawData, InstanceSegmentationPrimaryMetric? primaryMetric, ImageModelSettingsObjectDetection modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MachineLearningTableJobInput validationData, double? validationDataSize) : base(logVerbosity, targetColumnName, taskType, trainingData, serializedAdditionalRawData) + internal ImageInstanceSegmentation(TaskType taskType, MachineLearningLogVerbosity? logVerbosity, MachineLearningTableJobInput trainingData, string targetColumnName, IDictionary serializedAdditionalRawData, InstanceSegmentationPrimaryMetric? primaryMetric, ImageModelSettingsObjectDetection modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MachineLearningTableJobInput validationData, double? validationDataSize) : base(taskType, logVerbosity, trainingData, targetColumnName, serializedAdditionalRawData) { PrimaryMetric = primaryMetric; ModelSettings = modelSettings; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageLimitSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageLimitSettings.Serialization.cs index 4c851e2e75948..f5c14191ef1d8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageLimitSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageLimitSettings.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteStartObject(); - if (Optional.IsDefined(MaxConcurrentTrials)) - { - writer.WritePropertyName("maxConcurrentTrials"u8); - writer.WriteNumberValue(MaxConcurrentTrials.Value); - } if (Optional.IsDefined(MaxTrials)) { writer.WritePropertyName("maxTrials"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("timeout"u8); writer.WriteStringValue(Timeout.Value, "P"); } + if (Optional.IsDefined(MaxConcurrentTrials)) + { + writer.WritePropertyName("maxConcurrentTrials"u8); + writer.WriteNumberValue(MaxConcurrentTrials.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,38 +79,38 @@ internal static ImageLimitSettings DeserializeImageLimitSettings(JsonElement ele { return null; } - int? maxConcurrentTrials = default; int? maxTrials = default; TimeSpan? timeout = default; + int? maxConcurrentTrials = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("maxConcurrentTrials"u8)) + if (property.NameEquals("maxTrials"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - maxConcurrentTrials = property.Value.GetInt32(); + maxTrials = property.Value.GetInt32(); continue; } - if (property.NameEquals("maxTrials"u8)) + if (property.NameEquals("timeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - maxTrials = property.Value.GetInt32(); + timeout = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("timeout"u8)) + if (property.NameEquals("maxConcurrentTrials"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - timeout = property.Value.GetTimeSpan("P"); + maxConcurrentTrials = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -119,7 +119,7 @@ internal static ImageLimitSettings DeserializeImageLimitSettings(JsonElement ele } } serializedAdditionalRawData = rawDataDictionary; - return new ImageLimitSettings(maxConcurrentTrials, maxTrials, timeout, serializedAdditionalRawData); + return new ImageLimitSettings(maxTrials, timeout, maxConcurrentTrials, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageLimitSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageLimitSettings.cs index 3b248add83a7a..c054deb65df55 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageLimitSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageLimitSettings.cs @@ -51,23 +51,23 @@ public ImageLimitSettings() } /// Initializes a new instance of . - /// Maximum number of concurrent AutoML iterations. /// Maximum number of AutoML iterations. /// AutoML job timeout. + /// Maximum number of concurrent AutoML iterations. /// Keeps track of any properties unknown to the library. - internal ImageLimitSettings(int? maxConcurrentTrials, int? maxTrials, TimeSpan? timeout, IDictionary serializedAdditionalRawData) + internal ImageLimitSettings(int? maxTrials, TimeSpan? timeout, int? maxConcurrentTrials, IDictionary serializedAdditionalRawData) { - MaxConcurrentTrials = maxConcurrentTrials; MaxTrials = maxTrials; Timeout = timeout; + MaxConcurrentTrials = maxConcurrentTrials; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Maximum number of concurrent AutoML iterations. - public int? MaxConcurrentTrials { get; set; } /// Maximum number of AutoML iterations. public int? MaxTrials { get; set; } /// AutoML job timeout. public TimeSpan? Timeout { get; set; } + /// Maximum number of concurrent AutoML iterations. + public int? MaxConcurrentTrials { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.Serialization.cs index be73136069480..b92f504003c2a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.Serialization.cs @@ -41,11 +41,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt writer.WritePropertyName("isLatestOsImageVersion"u8); writer.WriteBooleanValue(IsLatestOSImageVersion.Value); } - if (options.Format != "W" && Optional.IsDefined(OSPatchingStatus)) - { - writer.WritePropertyName("osPatchingStatus"u8); - writer.WriteObjectValue(OSPatchingStatus, options); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -87,7 +82,6 @@ internal static ImageMetadata DeserializeImageMetadata(JsonElement element, Mode string currentImageVersion = default; string latestImageVersion = default; bool? isLatestOSImageVersion = default; - OSPatchingStatus osPatchingStatus = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -111,22 +105,13 @@ internal static ImageMetadata DeserializeImageMetadata(JsonElement element, Mode isLatestOSImageVersion = property.Value.GetBoolean(); continue; } - if (property.NameEquals("osPatchingStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - osPatchingStatus = OSPatchingStatus.DeserializeOSPatchingStatus(property.Value, options); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ImageMetadata(currentImageVersion, latestImageVersion, isLatestOSImageVersion, osPatchingStatus, serializedAdditionalRawData); + return new ImageMetadata(currentImageVersion, latestImageVersion, isLatestOSImageVersion, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.cs index b469c7188effa..8ce59c4080654 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageMetadata.cs @@ -54,14 +54,12 @@ internal ImageMetadata() /// Specifies the current operating system image version this compute instance is running on. /// Specifies the latest available operating system image version. /// Specifies whether this compute instance is running on the latest operating system image. - /// Metadata about the os patching. /// Keeps track of any properties unknown to the library. - internal ImageMetadata(string currentImageVersion, string latestImageVersion, bool? isLatestOSImageVersion, OSPatchingStatus osPatchingStatus, IDictionary serializedAdditionalRawData) + internal ImageMetadata(string currentImageVersion, string latestImageVersion, bool? isLatestOSImageVersion, IDictionary serializedAdditionalRawData) { CurrentImageVersion = currentImageVersion; LatestImageVersion = latestImageVersion; IsLatestOSImageVersion = isLatestOSImageVersion; - OSPatchingStatus = osPatchingStatus; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -71,7 +69,5 @@ internal ImageMetadata(string currentImageVersion, string latestImageVersion, bo public string LatestImageVersion { get; } /// Specifies whether this compute instance is running on the latest operating system image. public bool? IsLatestOSImageVersion { get; } - /// Metadata about the os patching. - public OSPatchingStatus OSPatchingStatus { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.Serialization.cs index 5f7c7350e0dae..d0e090d6fe1e8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.Serialization.cs @@ -122,28 +122,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteNull("earlyStoppingPatience"); } } - if (Optional.IsDefined(EnableOnnxNormalization)) + if (Optional.IsDefined(EvaluationFrequency)) { - if (EnableOnnxNormalization != null) + if (EvaluationFrequency != null) { - writer.WritePropertyName("enableOnnxNormalization"u8); - writer.WriteStringValue(EnableOnnxNormalization); + writer.WritePropertyName("evaluationFrequency"u8); + writer.WriteStringValue(EvaluationFrequency); } else { - writer.WriteNull("enableOnnxNormalization"); + writer.WriteNull("evaluationFrequency"); } } - if (Optional.IsDefined(EvaluationFrequency)) + if (Optional.IsDefined(EnableOnnxNormalization)) { - if (EvaluationFrequency != null) + if (EnableOnnxNormalization != null) { - writer.WritePropertyName("evaluationFrequency"u8); - writer.WriteStringValue(EvaluationFrequency); + writer.WritePropertyName("enableOnnxNormalization"u8); + writer.WriteStringValue(EnableOnnxNormalization); } else { - writer.WriteNull("evaluationFrequency"); + writer.WriteNull("enableOnnxNormalization"); } } if (Optional.IsDefined(GradientAccumulationStep)) @@ -408,8 +408,8 @@ internal static ImageModelDistributionSettings DeserializeImageModelDistribution string earlyStopping = default; string earlyStoppingDelay = default; string earlyStoppingPatience = default; - string enableOnnxNormalization = default; string evaluationFrequency = default; + string enableOnnxNormalization = default; string gradientAccumulationStep = default; string layersToFreeze = default; string learningRate = default; @@ -512,24 +512,24 @@ internal static ImageModelDistributionSettings DeserializeImageModelDistribution earlyStoppingPatience = property.Value.GetString(); continue; } - if (property.NameEquals("enableOnnxNormalization"u8)) + if (property.NameEquals("evaluationFrequency"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - enableOnnxNormalization = null; + evaluationFrequency = null; continue; } - enableOnnxNormalization = property.Value.GetString(); + evaluationFrequency = property.Value.GetString(); continue; } - if (property.NameEquals("evaluationFrequency"u8)) + if (property.NameEquals("enableOnnxNormalization"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - evaluationFrequency = null; + enableOnnxNormalization = null; continue; } - evaluationFrequency = property.Value.GetString(); + enableOnnxNormalization = property.Value.GetString(); continue; } if (property.NameEquals("gradientAccumulationStep"u8)) @@ -727,8 +727,8 @@ internal static ImageModelDistributionSettings DeserializeImageModelDistribution earlyStopping, earlyStoppingDelay, earlyStoppingPatience, - enableOnnxNormalization, evaluationFrequency, + enableOnnxNormalization, gradientAccumulationStep, layersToFreeze, learningRate, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.cs index 9e6f2898b2038..b5302ae311aae 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.cs @@ -80,8 +80,8 @@ public ImageModelDistributionSettings() /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. /// - /// Enable normalization when exporting ONNX model. /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Enable normalization when exporting ONNX model. /// /// Gradient accumulation means running a configured number of "GradAccumulationStep" steps without /// updating the model weights while accumulating the gradients of those steps, and then using @@ -114,7 +114,7 @@ public ImageModelDistributionSettings() /// Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. /// Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. /// Keeps track of any properties unknown to the library. - internal ImageModelDistributionSettings(string amsGradient, string augmentations, string beta1, string beta2, string distributed, string earlyStopping, string earlyStoppingDelay, string earlyStoppingPatience, string enableOnnxNormalization, string evaluationFrequency, string gradientAccumulationStep, string layersToFreeze, string learningRate, string learningRateScheduler, string modelName, string momentum, string nesterov, string numberOfEpochs, string numberOfWorkers, string optimizer, string randomSeed, string stepLRGamma, string stepLRStepSize, string trainingBatchSize, string validationBatchSize, string warmupCosineLRCycles, string warmupCosineLRWarmupEpochs, string weightDecay, IDictionary serializedAdditionalRawData) + internal ImageModelDistributionSettings(string amsGradient, string augmentations, string beta1, string beta2, string distributed, string earlyStopping, string earlyStoppingDelay, string earlyStoppingPatience, string evaluationFrequency, string enableOnnxNormalization, string gradientAccumulationStep, string layersToFreeze, string learningRate, string learningRateScheduler, string modelName, string momentum, string nesterov, string numberOfEpochs, string numberOfWorkers, string optimizer, string randomSeed, string stepLRGamma, string stepLRStepSize, string trainingBatchSize, string validationBatchSize, string warmupCosineLRCycles, string warmupCosineLRWarmupEpochs, string weightDecay, IDictionary serializedAdditionalRawData) { AmsGradient = amsGradient; Augmentations = augmentations; @@ -124,8 +124,8 @@ internal ImageModelDistributionSettings(string amsGradient, string augmentations EarlyStopping = earlyStopping; EarlyStoppingDelay = earlyStoppingDelay; EarlyStoppingPatience = earlyStoppingPatience; - EnableOnnxNormalization = enableOnnxNormalization; EvaluationFrequency = evaluationFrequency; + EnableOnnxNormalization = enableOnnxNormalization; GradientAccumulationStep = gradientAccumulationStep; LayersToFreeze = layersToFreeze; LearningRate = learningRate; @@ -169,10 +169,10 @@ internal ImageModelDistributionSettings(string amsGradient, string augmentations /// the run is stopped. Must be a positive integer. /// public string EarlyStoppingPatience { get; set; } - /// Enable normalization when exporting ONNX model. - public string EnableOnnxNormalization { get; set; } /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. public string EvaluationFrequency { get; set; } + /// Enable normalization when exporting ONNX model. + public string EnableOnnxNormalization { get; set; } /// /// Gradient accumulation means running a configured number of "GradAccumulationStep" steps without /// updating the model weights while accumulating the gradients of those steps, and then using diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.Serialization.cs index a7d4403ba10da..4912df4a77e96 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.Serialization.cs @@ -170,28 +170,28 @@ void IJsonModel.Write(Utf8JsonWrit writer.WriteNull("earlyStoppingPatience"); } } - if (Optional.IsDefined(EnableOnnxNormalization)) + if (Optional.IsDefined(EvaluationFrequency)) { - if (EnableOnnxNormalization != null) + if (EvaluationFrequency != null) { - writer.WritePropertyName("enableOnnxNormalization"u8); - writer.WriteStringValue(EnableOnnxNormalization); + writer.WritePropertyName("evaluationFrequency"u8); + writer.WriteStringValue(EvaluationFrequency); } else { - writer.WriteNull("enableOnnxNormalization"); + writer.WriteNull("evaluationFrequency"); } } - if (Optional.IsDefined(EvaluationFrequency)) + if (Optional.IsDefined(EnableOnnxNormalization)) { - if (EvaluationFrequency != null) + if (EnableOnnxNormalization != null) { - writer.WritePropertyName("evaluationFrequency"u8); - writer.WriteStringValue(EvaluationFrequency); + writer.WritePropertyName("enableOnnxNormalization"u8); + writer.WriteStringValue(EnableOnnxNormalization); } else { - writer.WriteNull("evaluationFrequency"); + writer.WriteNull("enableOnnxNormalization"); } } if (Optional.IsDefined(GradientAccumulationStep)) @@ -460,8 +460,8 @@ internal static ImageModelDistributionSettingsClassification DeserializeImageMod string earlyStopping = default; string earlyStoppingDelay = default; string earlyStoppingPatience = default; - string enableOnnxNormalization = default; string evaluationFrequency = default; + string enableOnnxNormalization = default; string gradientAccumulationStep = default; string layersToFreeze = default; string learningRate = default; @@ -604,24 +604,24 @@ internal static ImageModelDistributionSettingsClassification DeserializeImageMod earlyStoppingPatience = property.Value.GetString(); continue; } - if (property.NameEquals("enableOnnxNormalization"u8)) + if (property.NameEquals("evaluationFrequency"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - enableOnnxNormalization = null; + evaluationFrequency = null; continue; } - enableOnnxNormalization = property.Value.GetString(); + evaluationFrequency = property.Value.GetString(); continue; } - if (property.NameEquals("evaluationFrequency"u8)) + if (property.NameEquals("enableOnnxNormalization"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - evaluationFrequency = null; + enableOnnxNormalization = null; continue; } - evaluationFrequency = property.Value.GetString(); + enableOnnxNormalization = property.Value.GetString(); continue; } if (property.NameEquals("gradientAccumulationStep"u8)) @@ -819,8 +819,8 @@ internal static ImageModelDistributionSettingsClassification DeserializeImageMod earlyStopping, earlyStoppingDelay, earlyStoppingPatience, - enableOnnxNormalization, evaluationFrequency, + enableOnnxNormalization, gradientAccumulationStep, layersToFreeze, learningRate, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.cs index 6133b02deb173..20782d46d8f12 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.cs @@ -46,8 +46,8 @@ public ImageModelDistributionSettingsClassification() /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. /// - /// Enable normalization when exporting ONNX model. /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Enable normalization when exporting ONNX model. /// /// Gradient accumulation means running a configured number of "GradAccumulationStep" steps without /// updating the model weights while accumulating the gradients of those steps, and then using @@ -87,7 +87,7 @@ public ImageModelDistributionSettingsClassification() /// Weighted loss. The accepted values are 0 for no weighted loss. /// 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. /// - internal ImageModelDistributionSettingsClassification(string amsGradient, string augmentations, string beta1, string beta2, string distributed, string earlyStopping, string earlyStoppingDelay, string earlyStoppingPatience, string enableOnnxNormalization, string evaluationFrequency, string gradientAccumulationStep, string layersToFreeze, string learningRate, string learningRateScheduler, string modelName, string momentum, string nesterov, string numberOfEpochs, string numberOfWorkers, string optimizer, string randomSeed, string stepLRGamma, string stepLRStepSize, string trainingBatchSize, string validationBatchSize, string warmupCosineLRCycles, string warmupCosineLRWarmupEpochs, string weightDecay, IDictionary serializedAdditionalRawData, string trainingCropSize, string validationCropSize, string validationResizeSize, string weightedLoss) : base(amsGradient, augmentations, beta1, beta2, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, enableOnnxNormalization, evaluationFrequency, gradientAccumulationStep, layersToFreeze, learningRate, learningRateScheduler, modelName, momentum, nesterov, numberOfEpochs, numberOfWorkers, optimizer, randomSeed, stepLRGamma, stepLRStepSize, trainingBatchSize, validationBatchSize, warmupCosineLRCycles, warmupCosineLRWarmupEpochs, weightDecay, serializedAdditionalRawData) + internal ImageModelDistributionSettingsClassification(string amsGradient, string augmentations, string beta1, string beta2, string distributed, string earlyStopping, string earlyStoppingDelay, string earlyStoppingPatience, string evaluationFrequency, string enableOnnxNormalization, string gradientAccumulationStep, string layersToFreeze, string learningRate, string learningRateScheduler, string modelName, string momentum, string nesterov, string numberOfEpochs, string numberOfWorkers, string optimizer, string randomSeed, string stepLRGamma, string stepLRStepSize, string trainingBatchSize, string validationBatchSize, string warmupCosineLRCycles, string warmupCosineLRWarmupEpochs, string weightDecay, IDictionary serializedAdditionalRawData, string trainingCropSize, string validationCropSize, string validationResizeSize, string weightedLoss) : base(amsGradient, augmentations, beta1, beta2, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, evaluationFrequency, enableOnnxNormalization, gradientAccumulationStep, layersToFreeze, learningRate, learningRateScheduler, modelName, momentum, nesterov, numberOfEpochs, numberOfWorkers, optimizer, randomSeed, stepLRGamma, stepLRStepSize, trainingBatchSize, validationBatchSize, warmupCosineLRCycles, warmupCosineLRWarmupEpochs, weightDecay, serializedAdditionalRawData) { TrainingCropSize = trainingCropSize; ValidationCropSize = validationCropSize; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.Serialization.cs index 3c1e44f2fac77..c17ef15feb41e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.Serialization.cs @@ -278,28 +278,28 @@ void IJsonModel.Write(Utf8JsonWri writer.WriteNull("earlyStoppingPatience"); } } - if (Optional.IsDefined(EnableOnnxNormalization)) + if (Optional.IsDefined(EvaluationFrequency)) { - if (EnableOnnxNormalization != null) + if (EvaluationFrequency != null) { - writer.WritePropertyName("enableOnnxNormalization"u8); - writer.WriteStringValue(EnableOnnxNormalization); + writer.WritePropertyName("evaluationFrequency"u8); + writer.WriteStringValue(EvaluationFrequency); } else { - writer.WriteNull("enableOnnxNormalization"); + writer.WriteNull("evaluationFrequency"); } } - if (Optional.IsDefined(EvaluationFrequency)) + if (Optional.IsDefined(EnableOnnxNormalization)) { - if (EvaluationFrequency != null) + if (EnableOnnxNormalization != null) { - writer.WritePropertyName("evaluationFrequency"u8); - writer.WriteStringValue(EvaluationFrequency); + writer.WritePropertyName("enableOnnxNormalization"u8); + writer.WriteStringValue(EnableOnnxNormalization); } else { - writer.WriteNull("evaluationFrequency"); + writer.WriteNull("enableOnnxNormalization"); } } if (Optional.IsDefined(GradientAccumulationStep)) @@ -577,8 +577,8 @@ internal static ImageModelDistributionSettingsObjectDetection DeserializeImageMo string earlyStopping = default; string earlyStoppingDelay = default; string earlyStoppingPatience = default; - string enableOnnxNormalization = default; string evaluationFrequency = default; + string enableOnnxNormalization = default; string gradientAccumulationStep = default; string layersToFreeze = default; string learningRate = default; @@ -811,24 +811,24 @@ internal static ImageModelDistributionSettingsObjectDetection DeserializeImageMo earlyStoppingPatience = property.Value.GetString(); continue; } - if (property.NameEquals("enableOnnxNormalization"u8)) + if (property.NameEquals("evaluationFrequency"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - enableOnnxNormalization = null; + evaluationFrequency = null; continue; } - enableOnnxNormalization = property.Value.GetString(); + evaluationFrequency = property.Value.GetString(); continue; } - if (property.NameEquals("evaluationFrequency"u8)) + if (property.NameEquals("enableOnnxNormalization"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - evaluationFrequency = null; + enableOnnxNormalization = null; continue; } - evaluationFrequency = property.Value.GetString(); + enableOnnxNormalization = property.Value.GetString(); continue; } if (property.NameEquals("gradientAccumulationStep"u8)) @@ -1026,8 +1026,8 @@ internal static ImageModelDistributionSettingsObjectDetection DeserializeImageMo earlyStopping, earlyStoppingDelay, earlyStoppingPatience, - enableOnnxNormalization, evaluationFrequency, + enableOnnxNormalization, gradientAccumulationStep, layersToFreeze, learningRate, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.cs index 40bc0074350f8..109b0872f74f8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.cs @@ -46,8 +46,8 @@ public ImageModelDistributionSettingsObjectDetection() /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. /// - /// Enable normalization when exporting ONNX model. /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Enable normalization when exporting ONNX model. /// /// Gradient accumulation means running a configured number of "GradAccumulationStep" steps without /// updating the model weights while accumulating the gradients of those steps, and then using @@ -131,7 +131,7 @@ public ImageModelDistributionSettingsObjectDetection() /// /// IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. /// Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'. - internal ImageModelDistributionSettingsObjectDetection(string amsGradient, string augmentations, string beta1, string beta2, string distributed, string earlyStopping, string earlyStoppingDelay, string earlyStoppingPatience, string enableOnnxNormalization, string evaluationFrequency, string gradientAccumulationStep, string layersToFreeze, string learningRate, string learningRateScheduler, string modelName, string momentum, string nesterov, string numberOfEpochs, string numberOfWorkers, string optimizer, string randomSeed, string stepLRGamma, string stepLRStepSize, string trainingBatchSize, string validationBatchSize, string warmupCosineLRCycles, string warmupCosineLRWarmupEpochs, string weightDecay, IDictionary serializedAdditionalRawData, string boxDetectionsPerImage, string boxScoreThreshold, string imageSize, string maxSize, string minSize, string modelSize, string multiScale, string nmsIouThreshold, string tileGridSize, string tileOverlapRatio, string tilePredictionsNmsThreshold, string validationIouThreshold, string validationMetricType) : base(amsGradient, augmentations, beta1, beta2, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, enableOnnxNormalization, evaluationFrequency, gradientAccumulationStep, layersToFreeze, learningRate, learningRateScheduler, modelName, momentum, nesterov, numberOfEpochs, numberOfWorkers, optimizer, randomSeed, stepLRGamma, stepLRStepSize, trainingBatchSize, validationBatchSize, warmupCosineLRCycles, warmupCosineLRWarmupEpochs, weightDecay, serializedAdditionalRawData) + internal ImageModelDistributionSettingsObjectDetection(string amsGradient, string augmentations, string beta1, string beta2, string distributed, string earlyStopping, string earlyStoppingDelay, string earlyStoppingPatience, string evaluationFrequency, string enableOnnxNormalization, string gradientAccumulationStep, string layersToFreeze, string learningRate, string learningRateScheduler, string modelName, string momentum, string nesterov, string numberOfEpochs, string numberOfWorkers, string optimizer, string randomSeed, string stepLRGamma, string stepLRStepSize, string trainingBatchSize, string validationBatchSize, string warmupCosineLRCycles, string warmupCosineLRWarmupEpochs, string weightDecay, IDictionary serializedAdditionalRawData, string boxDetectionsPerImage, string boxScoreThreshold, string imageSize, string maxSize, string minSize, string modelSize, string multiScale, string nmsIouThreshold, string tileGridSize, string tileOverlapRatio, string tilePredictionsNmsThreshold, string validationIouThreshold, string validationMetricType) : base(amsGradient, augmentations, beta1, beta2, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, evaluationFrequency, enableOnnxNormalization, gradientAccumulationStep, layersToFreeze, learningRate, learningRateScheduler, modelName, momentum, nesterov, numberOfEpochs, numberOfWorkers, optimizer, randomSeed, stepLRGamma, stepLRStepSize, trainingBatchSize, validationBatchSize, warmupCosineLRCycles, warmupCosineLRWarmupEpochs, weightDecay, serializedAdditionalRawData) { BoxDetectionsPerImage = boxDetectionsPerImage; BoxScoreThreshold = boxScoreThreshold; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettings.Serialization.cs index 7a7859a0ed1c2..aa53491fc2279 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettings.Serialization.cs @@ -26,28 +26,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteStartObject(); - if (Optional.IsDefined(AdvancedSettings)) + if (Optional.IsDefined(AmsGradient)) { - if (AdvancedSettings != null) + if (AmsGradient != null) { - writer.WritePropertyName("advancedSettings"u8); - writer.WriteStringValue(AdvancedSettings); + writer.WritePropertyName("amsGradient"u8); + writer.WriteBooleanValue(AmsGradient.Value); } else { - writer.WriteNull("advancedSettings"); + writer.WriteNull("amsGradient"); } } - if (Optional.IsDefined(AmsGradient)) + if (Optional.IsDefined(AdvancedSettings)) { - if (AmsGradient != null) + if (AdvancedSettings != null) { - writer.WritePropertyName("amsGradient"u8); - writer.WriteBooleanValue(AmsGradient.Value); + writer.WritePropertyName("advancedSettings"u8); + writer.WriteStringValue(AdvancedSettings); } else { - writer.WriteNull("amsGradient"); + writer.WriteNull("advancedSettings"); } } if (Optional.IsDefined(Augmentations)) @@ -98,28 +98,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("checkpointFrequency"); } } - if (Optional.IsDefined(CheckpointModel)) + if (Optional.IsDefined(CheckpointRunId)) { - if (CheckpointModel != null) + if (CheckpointRunId != null) { - writer.WritePropertyName("checkpointModel"u8); - writer.WriteObjectValue(CheckpointModel, options); + writer.WritePropertyName("checkpointRunId"u8); + writer.WriteStringValue(CheckpointRunId); } else { - writer.WriteNull("checkpointModel"); + writer.WriteNull("checkpointRunId"); } } - if (Optional.IsDefined(CheckpointRunId)) + if (Optional.IsDefined(CheckpointModel)) { - if (CheckpointRunId != null) + if (CheckpointModel != null) { - writer.WritePropertyName("checkpointRunId"u8); - writer.WriteStringValue(CheckpointRunId); + writer.WritePropertyName("checkpointModel"u8); + writer.WriteObjectValue(CheckpointModel, options); } else { - writer.WriteNull("checkpointRunId"); + writer.WriteNull("checkpointModel"); } } if (Optional.IsDefined(Distributed)) @@ -170,28 +170,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("earlyStoppingPatience"); } } - if (Optional.IsDefined(EnableOnnxNormalization)) + if (Optional.IsDefined(EvaluationFrequency)) { - if (EnableOnnxNormalization != null) + if (EvaluationFrequency != null) { - writer.WritePropertyName("enableOnnxNormalization"u8); - writer.WriteBooleanValue(EnableOnnxNormalization.Value); + writer.WritePropertyName("evaluationFrequency"u8); + writer.WriteNumberValue(EvaluationFrequency.Value); } else { - writer.WriteNull("enableOnnxNormalization"); + writer.WriteNull("evaluationFrequency"); } } - if (Optional.IsDefined(EvaluationFrequency)) + if (Optional.IsDefined(EnableOnnxNormalization)) { - if (EvaluationFrequency != null) + if (EnableOnnxNormalization != null) { - writer.WritePropertyName("evaluationFrequency"u8); - writer.WriteNumberValue(EvaluationFrequency.Value); + writer.WritePropertyName("enableOnnxNormalization"u8); + writer.WriteBooleanValue(EnableOnnxNormalization.Value); } else { - writer.WriteNull("evaluationFrequency"); + writer.WriteNull("enableOnnxNormalization"); } } if (Optional.IsDefined(GradientAccumulationStep)) @@ -434,20 +434,20 @@ internal static ImageModelSettings DeserializeImageModelSettings(JsonElement ele { return null; } - string advancedSettings = default; bool? amsGradient = default; + string advancedSettings = default; string augmentations = default; float? beta1 = default; float? beta2 = default; int? checkpointFrequency = default; - MachineLearningFlowModelJobInput checkpointModel = default; string checkpointRunId = default; + MachineLearningFlowModelJobInput checkpointModel = default; bool? distributed = default; bool? earlyStopping = default; int? earlyStoppingDelay = default; int? earlyStoppingPatience = default; - bool? enableOnnxNormalization = default; int? evaluationFrequency = default; + bool? enableOnnxNormalization = default; int? gradientAccumulationStep = default; int? layersToFreeze = default; float? learningRate = default; @@ -470,24 +470,24 @@ internal static ImageModelSettings DeserializeImageModelSettings(JsonElement ele Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("advancedSettings"u8)) + if (property.NameEquals("amsGradient"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - advancedSettings = null; + amsGradient = null; continue; } - advancedSettings = property.Value.GetString(); + amsGradient = property.Value.GetBoolean(); continue; } - if (property.NameEquals("amsGradient"u8)) + if (property.NameEquals("advancedSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - amsGradient = null; + advancedSettings = null; continue; } - amsGradient = property.Value.GetBoolean(); + advancedSettings = property.Value.GetString(); continue; } if (property.NameEquals("augmentations"u8)) @@ -530,24 +530,24 @@ internal static ImageModelSettings DeserializeImageModelSettings(JsonElement ele checkpointFrequency = property.Value.GetInt32(); continue; } - if (property.NameEquals("checkpointModel"u8)) + if (property.NameEquals("checkpointRunId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - checkpointModel = null; + checkpointRunId = null; continue; } - checkpointModel = MachineLearningFlowModelJobInput.DeserializeMachineLearningFlowModelJobInput(property.Value, options); + checkpointRunId = property.Value.GetString(); continue; } - if (property.NameEquals("checkpointRunId"u8)) + if (property.NameEquals("checkpointModel"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - checkpointRunId = null; + checkpointModel = null; continue; } - checkpointRunId = property.Value.GetString(); + checkpointModel = MachineLearningFlowModelJobInput.DeserializeMachineLearningFlowModelJobInput(property.Value, options); continue; } if (property.NameEquals("distributed"u8)) @@ -590,24 +590,24 @@ internal static ImageModelSettings DeserializeImageModelSettings(JsonElement ele earlyStoppingPatience = property.Value.GetInt32(); continue; } - if (property.NameEquals("enableOnnxNormalization"u8)) + if (property.NameEquals("evaluationFrequency"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - enableOnnxNormalization = null; + evaluationFrequency = null; continue; } - enableOnnxNormalization = property.Value.GetBoolean(); + evaluationFrequency = property.Value.GetInt32(); continue; } - if (property.NameEquals("evaluationFrequency"u8)) + if (property.NameEquals("enableOnnxNormalization"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - evaluationFrequency = null; + enableOnnxNormalization = null; continue; } - evaluationFrequency = property.Value.GetInt32(); + enableOnnxNormalization = property.Value.GetBoolean(); continue; } if (property.NameEquals("gradientAccumulationStep"u8)) @@ -795,20 +795,20 @@ internal static ImageModelSettings DeserializeImageModelSettings(JsonElement ele } serializedAdditionalRawData = rawDataDictionary; return new ImageModelSettings( - advancedSettings, amsGradient, + advancedSettings, augmentations, beta1, beta2, checkpointFrequency, - checkpointModel, checkpointRunId, + checkpointModel, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, - enableOnnxNormalization, evaluationFrequency, + enableOnnxNormalization, gradientAccumulationStep, layersToFreeze, learningRate, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettings.cs index 010e631ec5d58..81badfcc32cf4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettings.cs @@ -55,14 +55,14 @@ public ImageModelSettings() } /// Initializes a new instance of . - /// Settings for advanced scenarios. /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. + /// Settings for advanced scenarios. /// Settings for using Augmentations. /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. /// Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. /// Frequency to store model checkpoints. Must be a positive integer. - /// The pretrained checkpoint model for incremental training. /// The id of a previous run that has a pretrained checkpoint for incremental training. + /// The pretrained checkpoint model for incremental training. /// Whether to use distributed training. /// Enable early stopping logic during training. /// @@ -73,8 +73,8 @@ public ImageModelSettings() /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. /// - /// Enable normalization when exporting ONNX model. /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Enable normalization when exporting ONNX model. /// /// Gradient accumulation means running a configured number of "GradAccumulationStep" steps without /// updating the model weights while accumulating the gradients of those steps, and then using @@ -107,22 +107,22 @@ public ImageModelSettings() /// Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. /// Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. /// Keeps track of any properties unknown to the library. - internal ImageModelSettings(string advancedSettings, bool? amsGradient, string augmentations, float? beta1, float? beta2, int? checkpointFrequency, MachineLearningFlowModelJobInput checkpointModel, string checkpointRunId, bool? distributed, bool? earlyStopping, int? earlyStoppingDelay, int? earlyStoppingPatience, bool? enableOnnxNormalization, int? evaluationFrequency, int? gradientAccumulationStep, int? layersToFreeze, float? learningRate, LearningRateScheduler? learningRateScheduler, string modelName, float? momentum, bool? nesterov, int? numberOfEpochs, int? numberOfWorkers, StochasticOptimizer? optimizer, int? randomSeed, float? stepLRGamma, int? stepLRStepSize, int? trainingBatchSize, int? validationBatchSize, float? warmupCosineLRCycles, int? warmupCosineLRWarmupEpochs, float? weightDecay, IDictionary serializedAdditionalRawData) + internal ImageModelSettings(bool? amsGradient, string advancedSettings, string augmentations, float? beta1, float? beta2, int? checkpointFrequency, string checkpointRunId, MachineLearningFlowModelJobInput checkpointModel, bool? distributed, bool? earlyStopping, int? earlyStoppingDelay, int? earlyStoppingPatience, int? evaluationFrequency, bool? enableOnnxNormalization, int? gradientAccumulationStep, int? layersToFreeze, float? learningRate, LearningRateScheduler? learningRateScheduler, string modelName, float? momentum, bool? nesterov, int? numberOfEpochs, int? numberOfWorkers, StochasticOptimizer? optimizer, int? randomSeed, float? stepLRGamma, int? stepLRStepSize, int? trainingBatchSize, int? validationBatchSize, float? warmupCosineLRCycles, int? warmupCosineLRWarmupEpochs, float? weightDecay, IDictionary serializedAdditionalRawData) { - AdvancedSettings = advancedSettings; AmsGradient = amsGradient; + AdvancedSettings = advancedSettings; Augmentations = augmentations; Beta1 = beta1; Beta2 = beta2; CheckpointFrequency = checkpointFrequency; - CheckpointModel = checkpointModel; CheckpointRunId = checkpointRunId; + CheckpointModel = checkpointModel; Distributed = distributed; EarlyStopping = earlyStopping; EarlyStoppingDelay = earlyStoppingDelay; EarlyStoppingPatience = earlyStoppingPatience; - EnableOnnxNormalization = enableOnnxNormalization; EvaluationFrequency = evaluationFrequency; + EnableOnnxNormalization = enableOnnxNormalization; GradientAccumulationStep = gradientAccumulationStep; LayersToFreeze = layersToFreeze; LearningRate = learningRate; @@ -144,10 +144,10 @@ internal ImageModelSettings(string advancedSettings, bool? amsGradient, string a _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Settings for advanced scenarios. - public string AdvancedSettings { get; set; } /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. public bool? AmsGradient { get; set; } + /// Settings for advanced scenarios. + public string AdvancedSettings { get; set; } /// Settings for using Augmentations. public string Augmentations { get; set; } /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. @@ -156,10 +156,10 @@ internal ImageModelSettings(string advancedSettings, bool? amsGradient, string a public float? Beta2 { get; set; } /// Frequency to store model checkpoints. Must be a positive integer. public int? CheckpointFrequency { get; set; } - /// The pretrained checkpoint model for incremental training. - public MachineLearningFlowModelJobInput CheckpointModel { get; set; } /// The id of a previous run that has a pretrained checkpoint for incremental training. public string CheckpointRunId { get; set; } + /// The pretrained checkpoint model for incremental training. + public MachineLearningFlowModelJobInput CheckpointModel { get; set; } /// Whether to use distributed training. public bool? Distributed { get; set; } /// Enable early stopping logic during training. @@ -174,10 +174,10 @@ internal ImageModelSettings(string advancedSettings, bool? amsGradient, string a /// the run is stopped. Must be a positive integer. /// public int? EarlyStoppingPatience { get; set; } - /// Enable normalization when exporting ONNX model. - public bool? EnableOnnxNormalization { get; set; } /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. public int? EvaluationFrequency { get; set; } + /// Enable normalization when exporting ONNX model. + public bool? EnableOnnxNormalization { get; set; } /// /// Gradient accumulation means running a configured number of "GradAccumulationStep" steps without /// updating the model weights while accumulating the gradients of those steps, and then using diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsClassification.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsClassification.Serialization.cs index 8adb56075d7af..723c232806e9f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsClassification.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsClassification.Serialization.cs @@ -74,28 +74,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNull("weightedLoss"); } } - if (Optional.IsDefined(AdvancedSettings)) + if (Optional.IsDefined(AmsGradient)) { - if (AdvancedSettings != null) + if (AmsGradient != null) { - writer.WritePropertyName("advancedSettings"u8); - writer.WriteStringValue(AdvancedSettings); + writer.WritePropertyName("amsGradient"u8); + writer.WriteBooleanValue(AmsGradient.Value); } else { - writer.WriteNull("advancedSettings"); + writer.WriteNull("amsGradient"); } } - if (Optional.IsDefined(AmsGradient)) + if (Optional.IsDefined(AdvancedSettings)) { - if (AmsGradient != null) + if (AdvancedSettings != null) { - writer.WritePropertyName("amsGradient"u8); - writer.WriteBooleanValue(AmsGradient.Value); + writer.WritePropertyName("advancedSettings"u8); + writer.WriteStringValue(AdvancedSettings); } else { - writer.WriteNull("amsGradient"); + writer.WriteNull("advancedSettings"); } } if (Optional.IsDefined(Augmentations)) @@ -146,28 +146,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNull("checkpointFrequency"); } } - if (Optional.IsDefined(CheckpointModel)) + if (Optional.IsDefined(CheckpointRunId)) { - if (CheckpointModel != null) + if (CheckpointRunId != null) { - writer.WritePropertyName("checkpointModel"u8); - writer.WriteObjectValue(CheckpointModel, options); + writer.WritePropertyName("checkpointRunId"u8); + writer.WriteStringValue(CheckpointRunId); } else { - writer.WriteNull("checkpointModel"); + writer.WriteNull("checkpointRunId"); } } - if (Optional.IsDefined(CheckpointRunId)) + if (Optional.IsDefined(CheckpointModel)) { - if (CheckpointRunId != null) + if (CheckpointModel != null) { - writer.WritePropertyName("checkpointRunId"u8); - writer.WriteStringValue(CheckpointRunId); + writer.WritePropertyName("checkpointModel"u8); + writer.WriteObjectValue(CheckpointModel, options); } else { - writer.WriteNull("checkpointRunId"); + writer.WriteNull("checkpointModel"); } } if (Optional.IsDefined(Distributed)) @@ -218,28 +218,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNull("earlyStoppingPatience"); } } - if (Optional.IsDefined(EnableOnnxNormalization)) + if (Optional.IsDefined(EvaluationFrequency)) { - if (EnableOnnxNormalization != null) + if (EvaluationFrequency != null) { - writer.WritePropertyName("enableOnnxNormalization"u8); - writer.WriteBooleanValue(EnableOnnxNormalization.Value); + writer.WritePropertyName("evaluationFrequency"u8); + writer.WriteNumberValue(EvaluationFrequency.Value); } else { - writer.WriteNull("enableOnnxNormalization"); + writer.WriteNull("evaluationFrequency"); } } - if (Optional.IsDefined(EvaluationFrequency)) + if (Optional.IsDefined(EnableOnnxNormalization)) { - if (EvaluationFrequency != null) + if (EnableOnnxNormalization != null) { - writer.WritePropertyName("evaluationFrequency"u8); - writer.WriteNumberValue(EvaluationFrequency.Value); + writer.WritePropertyName("enableOnnxNormalization"u8); + writer.WriteBooleanValue(EnableOnnxNormalization.Value); } else { - writer.WriteNull("evaluationFrequency"); + writer.WriteNull("enableOnnxNormalization"); } } if (Optional.IsDefined(GradientAccumulationStep)) @@ -486,20 +486,20 @@ internal static ImageModelSettingsClassification DeserializeImageModelSettingsCl int? validationCropSize = default; int? validationResizeSize = default; int? weightedLoss = default; - string advancedSettings = default; bool? amsGradient = default; + string advancedSettings = default; string augmentations = default; float? beta1 = default; float? beta2 = default; int? checkpointFrequency = default; - MachineLearningFlowModelJobInput checkpointModel = default; string checkpointRunId = default; + MachineLearningFlowModelJobInput checkpointModel = default; bool? distributed = default; bool? earlyStopping = default; int? earlyStoppingDelay = default; int? earlyStoppingPatience = default; - bool? enableOnnxNormalization = default; int? evaluationFrequency = default; + bool? enableOnnxNormalization = default; int? gradientAccumulationStep = default; int? layersToFreeze = default; float? learningRate = default; @@ -562,24 +562,24 @@ internal static ImageModelSettingsClassification DeserializeImageModelSettingsCl weightedLoss = property.Value.GetInt32(); continue; } - if (property.NameEquals("advancedSettings"u8)) + if (property.NameEquals("amsGradient"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - advancedSettings = null; + amsGradient = null; continue; } - advancedSettings = property.Value.GetString(); + amsGradient = property.Value.GetBoolean(); continue; } - if (property.NameEquals("amsGradient"u8)) + if (property.NameEquals("advancedSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - amsGradient = null; + advancedSettings = null; continue; } - amsGradient = property.Value.GetBoolean(); + advancedSettings = property.Value.GetString(); continue; } if (property.NameEquals("augmentations"u8)) @@ -622,24 +622,24 @@ internal static ImageModelSettingsClassification DeserializeImageModelSettingsCl checkpointFrequency = property.Value.GetInt32(); continue; } - if (property.NameEquals("checkpointModel"u8)) + if (property.NameEquals("checkpointRunId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - checkpointModel = null; + checkpointRunId = null; continue; } - checkpointModel = MachineLearningFlowModelJobInput.DeserializeMachineLearningFlowModelJobInput(property.Value, options); + checkpointRunId = property.Value.GetString(); continue; } - if (property.NameEquals("checkpointRunId"u8)) + if (property.NameEquals("checkpointModel"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - checkpointRunId = null; + checkpointModel = null; continue; } - checkpointRunId = property.Value.GetString(); + checkpointModel = MachineLearningFlowModelJobInput.DeserializeMachineLearningFlowModelJobInput(property.Value, options); continue; } if (property.NameEquals("distributed"u8)) @@ -682,24 +682,24 @@ internal static ImageModelSettingsClassification DeserializeImageModelSettingsCl earlyStoppingPatience = property.Value.GetInt32(); continue; } - if (property.NameEquals("enableOnnxNormalization"u8)) + if (property.NameEquals("evaluationFrequency"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - enableOnnxNormalization = null; + evaluationFrequency = null; continue; } - enableOnnxNormalization = property.Value.GetBoolean(); + evaluationFrequency = property.Value.GetInt32(); continue; } - if (property.NameEquals("evaluationFrequency"u8)) + if (property.NameEquals("enableOnnxNormalization"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - evaluationFrequency = null; + enableOnnxNormalization = null; continue; } - evaluationFrequency = property.Value.GetInt32(); + enableOnnxNormalization = property.Value.GetBoolean(); continue; } if (property.NameEquals("gradientAccumulationStep"u8)) @@ -887,20 +887,20 @@ internal static ImageModelSettingsClassification DeserializeImageModelSettingsCl } serializedAdditionalRawData = rawDataDictionary; return new ImageModelSettingsClassification( - advancedSettings, amsGradient, + advancedSettings, augmentations, beta1, beta2, checkpointFrequency, - checkpointModel, checkpointRunId, + checkpointModel, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, - enableOnnxNormalization, evaluationFrequency, + enableOnnxNormalization, gradientAccumulationStep, layersToFreeze, learningRate, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsClassification.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsClassification.cs index 1674dc6e62e6d..75dd34d438d1a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsClassification.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsClassification.cs @@ -23,14 +23,14 @@ public ImageModelSettingsClassification() } /// Initializes a new instance of . - /// Settings for advanced scenarios. /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. + /// Settings for advanced scenarios. /// Settings for using Augmentations. /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. /// Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. /// Frequency to store model checkpoints. Must be a positive integer. - /// The pretrained checkpoint model for incremental training. /// The id of a previous run that has a pretrained checkpoint for incremental training. + /// The pretrained checkpoint model for incremental training. /// Whether to use distributed training. /// Enable early stopping logic during training. /// @@ -41,8 +41,8 @@ public ImageModelSettingsClassification() /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. /// - /// Enable normalization when exporting ONNX model. /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Enable normalization when exporting ONNX model. /// /// Gradient accumulation means running a configured number of "GradAccumulationStep" steps without /// updating the model weights while accumulating the gradients of those steps, and then using @@ -82,7 +82,7 @@ public ImageModelSettingsClassification() /// Weighted loss. The accepted values are 0 for no weighted loss. /// 1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. /// - internal ImageModelSettingsClassification(string advancedSettings, bool? amsGradient, string augmentations, float? beta1, float? beta2, int? checkpointFrequency, MachineLearningFlowModelJobInput checkpointModel, string checkpointRunId, bool? distributed, bool? earlyStopping, int? earlyStoppingDelay, int? earlyStoppingPatience, bool? enableOnnxNormalization, int? evaluationFrequency, int? gradientAccumulationStep, int? layersToFreeze, float? learningRate, LearningRateScheduler? learningRateScheduler, string modelName, float? momentum, bool? nesterov, int? numberOfEpochs, int? numberOfWorkers, StochasticOptimizer? optimizer, int? randomSeed, float? stepLRGamma, int? stepLRStepSize, int? trainingBatchSize, int? validationBatchSize, float? warmupCosineLRCycles, int? warmupCosineLRWarmupEpochs, float? weightDecay, IDictionary serializedAdditionalRawData, int? trainingCropSize, int? validationCropSize, int? validationResizeSize, int? weightedLoss) : base(advancedSettings, amsGradient, augmentations, beta1, beta2, checkpointFrequency, checkpointModel, checkpointRunId, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, enableOnnxNormalization, evaluationFrequency, gradientAccumulationStep, layersToFreeze, learningRate, learningRateScheduler, modelName, momentum, nesterov, numberOfEpochs, numberOfWorkers, optimizer, randomSeed, stepLRGamma, stepLRStepSize, trainingBatchSize, validationBatchSize, warmupCosineLRCycles, warmupCosineLRWarmupEpochs, weightDecay, serializedAdditionalRawData) + internal ImageModelSettingsClassification(bool? amsGradient, string advancedSettings, string augmentations, float? beta1, float? beta2, int? checkpointFrequency, string checkpointRunId, MachineLearningFlowModelJobInput checkpointModel, bool? distributed, bool? earlyStopping, int? earlyStoppingDelay, int? earlyStoppingPatience, int? evaluationFrequency, bool? enableOnnxNormalization, int? gradientAccumulationStep, int? layersToFreeze, float? learningRate, LearningRateScheduler? learningRateScheduler, string modelName, float? momentum, bool? nesterov, int? numberOfEpochs, int? numberOfWorkers, StochasticOptimizer? optimizer, int? randomSeed, float? stepLRGamma, int? stepLRStepSize, int? trainingBatchSize, int? validationBatchSize, float? warmupCosineLRCycles, int? warmupCosineLRWarmupEpochs, float? weightDecay, IDictionary serializedAdditionalRawData, int? trainingCropSize, int? validationCropSize, int? validationResizeSize, int? weightedLoss) : base(amsGradient, advancedSettings, augmentations, beta1, beta2, checkpointFrequency, checkpointRunId, checkpointModel, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, evaluationFrequency, enableOnnxNormalization, gradientAccumulationStep, layersToFreeze, learningRate, learningRateScheduler, modelName, momentum, nesterov, numberOfEpochs, numberOfWorkers, optimizer, randomSeed, stepLRGamma, stepLRStepSize, trainingBatchSize, validationBatchSize, warmupCosineLRCycles, warmupCosineLRWarmupEpochs, weightDecay, serializedAdditionalRawData) { TrainingCropSize = trainingCropSize; ValidationCropSize = validationCropSize; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.Serialization.cs index cf9df54411cbf..b0774e64b61f1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.Serialization.cs @@ -168,28 +168,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("validationMetricType"u8); writer.WriteStringValue(ValidationMetricType.Value.ToString()); } - if (Optional.IsDefined(AdvancedSettings)) + if (Optional.IsDefined(AmsGradient)) { - if (AdvancedSettings != null) + if (AmsGradient != null) { - writer.WritePropertyName("advancedSettings"u8); - writer.WriteStringValue(AdvancedSettings); + writer.WritePropertyName("amsGradient"u8); + writer.WriteBooleanValue(AmsGradient.Value); } else { - writer.WriteNull("advancedSettings"); + writer.WriteNull("amsGradient"); } } - if (Optional.IsDefined(AmsGradient)) + if (Optional.IsDefined(AdvancedSettings)) { - if (AmsGradient != null) + if (AdvancedSettings != null) { - writer.WritePropertyName("amsGradient"u8); - writer.WriteBooleanValue(AmsGradient.Value); + writer.WritePropertyName("advancedSettings"u8); + writer.WriteStringValue(AdvancedSettings); } else { - writer.WriteNull("amsGradient"); + writer.WriteNull("advancedSettings"); } } if (Optional.IsDefined(Augmentations)) @@ -240,28 +240,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("checkpointFrequency"); } } - if (Optional.IsDefined(CheckpointModel)) + if (Optional.IsDefined(CheckpointRunId)) { - if (CheckpointModel != null) + if (CheckpointRunId != null) { - writer.WritePropertyName("checkpointModel"u8); - writer.WriteObjectValue(CheckpointModel, options); + writer.WritePropertyName("checkpointRunId"u8); + writer.WriteStringValue(CheckpointRunId); } else { - writer.WriteNull("checkpointModel"); + writer.WriteNull("checkpointRunId"); } } - if (Optional.IsDefined(CheckpointRunId)) + if (Optional.IsDefined(CheckpointModel)) { - if (CheckpointRunId != null) + if (CheckpointModel != null) { - writer.WritePropertyName("checkpointRunId"u8); - writer.WriteStringValue(CheckpointRunId); + writer.WritePropertyName("checkpointModel"u8); + writer.WriteObjectValue(CheckpointModel, options); } else { - writer.WriteNull("checkpointRunId"); + writer.WriteNull("checkpointModel"); } } if (Optional.IsDefined(Distributed)) @@ -312,28 +312,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("earlyStoppingPatience"); } } - if (Optional.IsDefined(EnableOnnxNormalization)) + if (Optional.IsDefined(EvaluationFrequency)) { - if (EnableOnnxNormalization != null) + if (EvaluationFrequency != null) { - writer.WritePropertyName("enableOnnxNormalization"u8); - writer.WriteBooleanValue(EnableOnnxNormalization.Value); + writer.WritePropertyName("evaluationFrequency"u8); + writer.WriteNumberValue(EvaluationFrequency.Value); } else { - writer.WriteNull("enableOnnxNormalization"); + writer.WriteNull("evaluationFrequency"); } } - if (Optional.IsDefined(EvaluationFrequency)) + if (Optional.IsDefined(EnableOnnxNormalization)) { - if (EvaluationFrequency != null) + if (EnableOnnxNormalization != null) { - writer.WritePropertyName("evaluationFrequency"u8); - writer.WriteNumberValue(EvaluationFrequency.Value); + writer.WritePropertyName("enableOnnxNormalization"u8); + writer.WriteBooleanValue(EnableOnnxNormalization.Value); } else { - writer.WriteNull("evaluationFrequency"); + writer.WriteNull("enableOnnxNormalization"); } } if (Optional.IsDefined(GradientAccumulationStep)) @@ -589,20 +589,20 @@ internal static ImageModelSettingsObjectDetection DeserializeImageModelSettingsO float? tilePredictionsNmsThreshold = default; float? validationIouThreshold = default; ValidationMetricType? validationMetricType = default; - string advancedSettings = default; bool? amsGradient = default; + string advancedSettings = default; string augmentations = default; float? beta1 = default; float? beta2 = default; int? checkpointFrequency = default; - MachineLearningFlowModelJobInput checkpointModel = default; string checkpointRunId = default; + MachineLearningFlowModelJobInput checkpointModel = default; bool? distributed = default; bool? earlyStopping = default; int? earlyStoppingDelay = default; int? earlyStoppingPatience = default; - bool? enableOnnxNormalization = default; int? evaluationFrequency = default; + bool? enableOnnxNormalization = default; int? gradientAccumulationStep = default; int? layersToFreeze = default; float? learningRate = default; @@ -753,24 +753,24 @@ internal static ImageModelSettingsObjectDetection DeserializeImageModelSettingsO validationMetricType = new ValidationMetricType(property.Value.GetString()); continue; } - if (property.NameEquals("advancedSettings"u8)) + if (property.NameEquals("amsGradient"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - advancedSettings = null; + amsGradient = null; continue; } - advancedSettings = property.Value.GetString(); + amsGradient = property.Value.GetBoolean(); continue; } - if (property.NameEquals("amsGradient"u8)) + if (property.NameEquals("advancedSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - amsGradient = null; + advancedSettings = null; continue; } - amsGradient = property.Value.GetBoolean(); + advancedSettings = property.Value.GetString(); continue; } if (property.NameEquals("augmentations"u8)) @@ -813,24 +813,24 @@ internal static ImageModelSettingsObjectDetection DeserializeImageModelSettingsO checkpointFrequency = property.Value.GetInt32(); continue; } - if (property.NameEquals("checkpointModel"u8)) + if (property.NameEquals("checkpointRunId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - checkpointModel = null; + checkpointRunId = null; continue; } - checkpointModel = MachineLearningFlowModelJobInput.DeserializeMachineLearningFlowModelJobInput(property.Value, options); + checkpointRunId = property.Value.GetString(); continue; } - if (property.NameEquals("checkpointRunId"u8)) + if (property.NameEquals("checkpointModel"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - checkpointRunId = null; + checkpointModel = null; continue; } - checkpointRunId = property.Value.GetString(); + checkpointModel = MachineLearningFlowModelJobInput.DeserializeMachineLearningFlowModelJobInput(property.Value, options); continue; } if (property.NameEquals("distributed"u8)) @@ -873,24 +873,24 @@ internal static ImageModelSettingsObjectDetection DeserializeImageModelSettingsO earlyStoppingPatience = property.Value.GetInt32(); continue; } - if (property.NameEquals("enableOnnxNormalization"u8)) + if (property.NameEquals("evaluationFrequency"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - enableOnnxNormalization = null; + evaluationFrequency = null; continue; } - enableOnnxNormalization = property.Value.GetBoolean(); + evaluationFrequency = property.Value.GetInt32(); continue; } - if (property.NameEquals("evaluationFrequency"u8)) + if (property.NameEquals("enableOnnxNormalization"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - evaluationFrequency = null; + enableOnnxNormalization = null; continue; } - evaluationFrequency = property.Value.GetInt32(); + enableOnnxNormalization = property.Value.GetBoolean(); continue; } if (property.NameEquals("gradientAccumulationStep"u8)) @@ -1078,20 +1078,20 @@ internal static ImageModelSettingsObjectDetection DeserializeImageModelSettingsO } serializedAdditionalRawData = rawDataDictionary; return new ImageModelSettingsObjectDetection( - advancedSettings, amsGradient, + advancedSettings, augmentations, beta1, beta2, checkpointFrequency, - checkpointModel, checkpointRunId, + checkpointModel, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, - enableOnnxNormalization, evaluationFrequency, + enableOnnxNormalization, gradientAccumulationStep, layersToFreeze, learningRate, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.cs index 8c7361f6720ab..3cdd3ca6e007e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.cs @@ -23,14 +23,14 @@ public ImageModelSettingsObjectDetection() } /// Initializes a new instance of . - /// Settings for advanced scenarios. /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. + /// Settings for advanced scenarios. /// Settings for using Augmentations. /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. /// Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. /// Frequency to store model checkpoints. Must be a positive integer. - /// The pretrained checkpoint model for incremental training. /// The id of a previous run that has a pretrained checkpoint for incremental training. + /// The pretrained checkpoint model for incremental training. /// Whether to use distributed training. /// Enable early stopping logic during training. /// @@ -41,8 +41,8 @@ public ImageModelSettingsObjectDetection() /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. /// - /// Enable normalization when exporting ONNX model. /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Enable normalization when exporting ONNX model. /// /// Gradient accumulation means running a configured number of "GradAccumulationStep" steps without /// updating the model weights while accumulating the gradients of those steps, and then using @@ -125,7 +125,7 @@ public ImageModelSettingsObjectDetection() /// /// IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. /// Metric computation method to use for validation metrics. - internal ImageModelSettingsObjectDetection(string advancedSettings, bool? amsGradient, string augmentations, float? beta1, float? beta2, int? checkpointFrequency, MachineLearningFlowModelJobInput checkpointModel, string checkpointRunId, bool? distributed, bool? earlyStopping, int? earlyStoppingDelay, int? earlyStoppingPatience, bool? enableOnnxNormalization, int? evaluationFrequency, int? gradientAccumulationStep, int? layersToFreeze, float? learningRate, LearningRateScheduler? learningRateScheduler, string modelName, float? momentum, bool? nesterov, int? numberOfEpochs, int? numberOfWorkers, StochasticOptimizer? optimizer, int? randomSeed, float? stepLRGamma, int? stepLRStepSize, int? trainingBatchSize, int? validationBatchSize, float? warmupCosineLRCycles, int? warmupCosineLRWarmupEpochs, float? weightDecay, IDictionary serializedAdditionalRawData, int? boxDetectionsPerImage, float? boxScoreThreshold, int? imageSize, int? maxSize, int? minSize, MachineLearningModelSize? modelSize, bool? multiScale, float? nmsIouThreshold, string tileGridSize, float? tileOverlapRatio, float? tilePredictionsNmsThreshold, float? validationIouThreshold, ValidationMetricType? validationMetricType) : base(advancedSettings, amsGradient, augmentations, beta1, beta2, checkpointFrequency, checkpointModel, checkpointRunId, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, enableOnnxNormalization, evaluationFrequency, gradientAccumulationStep, layersToFreeze, learningRate, learningRateScheduler, modelName, momentum, nesterov, numberOfEpochs, numberOfWorkers, optimizer, randomSeed, stepLRGamma, stepLRStepSize, trainingBatchSize, validationBatchSize, warmupCosineLRCycles, warmupCosineLRWarmupEpochs, weightDecay, serializedAdditionalRawData) + internal ImageModelSettingsObjectDetection(bool? amsGradient, string advancedSettings, string augmentations, float? beta1, float? beta2, int? checkpointFrequency, string checkpointRunId, MachineLearningFlowModelJobInput checkpointModel, bool? distributed, bool? earlyStopping, int? earlyStoppingDelay, int? earlyStoppingPatience, int? evaluationFrequency, bool? enableOnnxNormalization, int? gradientAccumulationStep, int? layersToFreeze, float? learningRate, LearningRateScheduler? learningRateScheduler, string modelName, float? momentum, bool? nesterov, int? numberOfEpochs, int? numberOfWorkers, StochasticOptimizer? optimizer, int? randomSeed, float? stepLRGamma, int? stepLRStepSize, int? trainingBatchSize, int? validationBatchSize, float? warmupCosineLRCycles, int? warmupCosineLRWarmupEpochs, float? weightDecay, IDictionary serializedAdditionalRawData, int? boxDetectionsPerImage, float? boxScoreThreshold, int? imageSize, int? maxSize, int? minSize, MachineLearningModelSize? modelSize, bool? multiScale, float? nmsIouThreshold, string tileGridSize, float? tileOverlapRatio, float? tilePredictionsNmsThreshold, float? validationIouThreshold, ValidationMetricType? validationMetricType) : base(amsGradient, advancedSettings, augmentations, beta1, beta2, checkpointFrequency, checkpointRunId, checkpointModel, distributed, earlyStopping, earlyStoppingDelay, earlyStoppingPatience, evaluationFrequency, enableOnnxNormalization, gradientAccumulationStep, layersToFreeze, learningRate, learningRateScheduler, modelName, momentum, nesterov, numberOfEpochs, numberOfWorkers, optimizer, randomSeed, stepLRGamma, stepLRStepSize, trainingBatchSize, validationBatchSize, warmupCosineLRCycles, warmupCosineLRWarmupEpochs, weightDecay, serializedAdditionalRawData) { BoxDetectionsPerImage = boxDetectionsPerImage; BoxScoreThreshold = boxScoreThreshold; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageObjectDetection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageObjectDetection.Serialization.cs index e1c343128b635..c575720ad7ba9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageObjectDetection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageObjectDetection.Serialization.cs @@ -98,11 +98,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("validationDataSize"); } } + writer.WritePropertyName("taskType"u8); + writer.WriteStringValue(TaskType.ToString()); if (Optional.IsDefined(LogVerbosity)) { writer.WritePropertyName("logVerbosity"u8); writer.WriteStringValue(LogVerbosity.Value.ToString()); } + writer.WritePropertyName("trainingData"u8); + writer.WriteObjectValue(TrainingData, options); if (Optional.IsDefined(TargetColumnName)) { if (TargetColumnName != null) @@ -115,10 +119,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("targetColumnName"); } } - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -164,10 +164,10 @@ internal static ImageObjectDetection DeserializeImageObjectDetection(JsonElement ImageSweepSettings sweepSettings = default; MachineLearningTableJobInput validationData = default; double? validationDataSize = default; - MachineLearningLogVerbosity? logVerbosity = default; - string targetColumnName = default; TaskType taskType = default; + MachineLearningLogVerbosity? logVerbosity = default; MachineLearningTableJobInput trainingData = default; + string targetColumnName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -241,6 +241,11 @@ internal static ImageObjectDetection DeserializeImageObjectDetection(JsonElement validationDataSize = property.Value.GetDouble(); continue; } + if (property.NameEquals("taskType"u8)) + { + taskType = new TaskType(property.Value.GetString()); + continue; + } if (property.NameEquals("logVerbosity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -250,6 +255,11 @@ internal static ImageObjectDetection DeserializeImageObjectDetection(JsonElement logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } + if (property.NameEquals("trainingData"u8)) + { + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); + continue; + } if (property.NameEquals("targetColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -260,16 +270,6 @@ internal static ImageObjectDetection DeserializeImageObjectDetection(JsonElement targetColumnName = property.Value.GetString(); continue; } - if (property.NameEquals("taskType"u8)) - { - taskType = new TaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData"u8)) - { - trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -277,10 +277,10 @@ internal static ImageObjectDetection DeserializeImageObjectDetection(JsonElement } serializedAdditionalRawData = rawDataDictionary; return new ImageObjectDetection( - logVerbosity, - targetColumnName, taskType, + logVerbosity, trainingData, + targetColumnName, serializedAdditionalRawData, primaryMetric, modelSettings, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageObjectDetection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageObjectDetection.cs index fdbcc2329472c..89a3f714b28a5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageObjectDetection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageObjectDetection.cs @@ -31,13 +31,13 @@ public ImageObjectDetection(MachineLearningTableJobInput trainingData, ImageLimi } /// Initializes a new instance of . + /// [Required] Task type for AutoMLJob. /// Log verbosity for the job. + /// [Required] Training data input. /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. /// Keeps track of any properties unknown to the library. /// Primary metric to optimize for this task. /// Settings used for training the model. @@ -50,7 +50,7 @@ public ImageObjectDetection(MachineLearningTableJobInput trainingData, ImageLimi /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - internal ImageObjectDetection(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, IDictionary serializedAdditionalRawData, ObjectDetectionPrimaryMetric? primaryMetric, ImageModelSettingsObjectDetection modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MachineLearningTableJobInput validationData, double? validationDataSize) : base(logVerbosity, targetColumnName, taskType, trainingData, serializedAdditionalRawData) + internal ImageObjectDetection(TaskType taskType, MachineLearningLogVerbosity? logVerbosity, MachineLearningTableJobInput trainingData, string targetColumnName, IDictionary serializedAdditionalRawData, ObjectDetectionPrimaryMetric? primaryMetric, ImageModelSettingsObjectDetection modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MachineLearningTableJobInput validationData, double? validationDataSize) : base(taskType, logVerbosity, trainingData, targetColumnName, serializedAdditionalRawData) { PrimaryMetric = primaryMetric; ModelSettings = modelSettings; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.Serialization.cs index b3d8dbe0babe5..8b0b6b9dfe696 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.Serialization.cs @@ -36,11 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpti writer.WritePropertyName("reference"u8); writer.WriteStringValue(Reference); } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version); - } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -78,7 +73,6 @@ internal static ImageSetting DeserializeImageSetting(JsonElement element, ModelR } ImageType? type = default; string reference = default; - string version = default; IDictionary additionalProperties = default; Dictionary additionalPropertiesDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -97,15 +91,10 @@ internal static ImageSetting DeserializeImageSetting(JsonElement element, ModelR reference = property.Value.GetString(); continue; } - if (property.NameEquals("version"u8)) - { - version = property.Value.GetString(); - continue; - } additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } additionalProperties = additionalPropertiesDictionary; - return new ImageSetting(type, reference, version, additionalProperties); + return new ImageSetting(type, reference, additionalProperties); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.cs index 8a86ab8a2086f..2bf9c49c9d821 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSetting.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The ImageSetting. + /// Describes the Image Specifications. public partial class ImageSetting { /// Initializes a new instance of . @@ -20,24 +20,20 @@ public ImageSetting() } /// Initializes a new instance of . - /// Type of the image. Possible values are: docker - For docker images. azureml - For AzureML Environment images (custom and curated). - /// Image reference URL if type is docker. Environment name if type is azureml. - /// Version of image being used. If latest then skip this field. + /// Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images. + /// Image reference. /// Additional Properties. - internal ImageSetting(ImageType? imageType, string reference, string version, IDictionary additionalProperties) + internal ImageSetting(ImageType? imageType, string reference, IDictionary additionalProperties) { ImageType = imageType; Reference = reference; - Version = version; AdditionalProperties = additionalProperties; } - /// Type of the image. Possible values are: docker - For docker images. azureml - For AzureML Environment images (custom and curated). + /// Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images. public ImageType? ImageType { get; set; } - /// Image reference URL if type is docker. Environment name if type is azureml. + /// Image reference. public string Reference { get; set; } - /// Version of image being used. If latest then skip this field. - public string Version { get; set; } /// /// Additional Properties /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSweepSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSweepSettings.Serialization.cs index a1c5c09bc43c3..907ff5ee403b8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSweepSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSweepSettings.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteStartObject(); + writer.WritePropertyName("samplingAlgorithm"u8); + writer.WriteStringValue(SamplingAlgorithm.ToString()); if (Optional.IsDefined(EarlyTermination)) { if (EarlyTermination != null) @@ -38,8 +40,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("earlyTermination"); } } - writer.WritePropertyName("samplingAlgorithm"u8); - writer.WriteStringValue(SamplingAlgorithm.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,12 +78,17 @@ internal static ImageSweepSettings DeserializeImageSweepSettings(JsonElement ele { return null; } - MachineLearningEarlyTerminationPolicy earlyTermination = default; SamplingAlgorithmType samplingAlgorithm = default; + MachineLearningEarlyTerminationPolicy earlyTermination = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("samplingAlgorithm"u8)) + { + samplingAlgorithm = new SamplingAlgorithmType(property.Value.GetString()); + continue; + } if (property.NameEquals("earlyTermination"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -94,18 +99,13 @@ internal static ImageSweepSettings DeserializeImageSweepSettings(JsonElement ele earlyTermination = MachineLearningEarlyTerminationPolicy.DeserializeMachineLearningEarlyTerminationPolicy(property.Value, options); continue; } - if (property.NameEquals("samplingAlgorithm"u8)) - { - samplingAlgorithm = new SamplingAlgorithmType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ImageSweepSettings(earlyTermination, samplingAlgorithm, serializedAdditionalRawData); + return new ImageSweepSettings(samplingAlgorithm, earlyTermination, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSweepSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSweepSettings.cs index 63a451c6922aa..ec0146a81c876 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSweepSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSweepSettings.cs @@ -53,17 +53,17 @@ public ImageSweepSettings(SamplingAlgorithmType samplingAlgorithm) } /// Initializes a new instance of . + /// [Required] Type of the hyperparameter sampling algorithms. /// /// Type of early termination policy. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// [Required] Type of the hyperparameter sampling algorithms. /// Keeps track of any properties unknown to the library. - internal ImageSweepSettings(MachineLearningEarlyTerminationPolicy earlyTermination, SamplingAlgorithmType samplingAlgorithm, IDictionary serializedAdditionalRawData) + internal ImageSweepSettings(SamplingAlgorithmType samplingAlgorithm, MachineLearningEarlyTerminationPolicy earlyTermination, IDictionary serializedAdditionalRawData) { - EarlyTermination = earlyTermination; SamplingAlgorithm = samplingAlgorithm; + EarlyTermination = earlyTermination; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -72,13 +72,13 @@ internal ImageSweepSettings() { } + /// [Required] Type of the hyperparameter sampling algorithms. + public SamplingAlgorithmType SamplingAlgorithm { get; set; } /// /// Type of early termination policy. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// public MachineLearningEarlyTerminationPolicy EarlyTermination { get; set; } - /// [Required] Type of the hyperparameter sampling algorithms. - public SamplingAlgorithmType SamplingAlgorithm { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageType.cs index 55108f7d762d6..921a3729b3b09 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Type of the image. Possible values are: docker - For docker images. azureml - For AzureML Environment images (custom and curated). + /// Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images. public readonly partial struct ImageType : IEquatable { private readonly string _value; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.Serialization.cs index 87c9af9d0c7c2..c4f725e0c4485 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.Serialization.cs @@ -26,6 +26,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio } writer.WriteStartObject(); + if (Optional.IsDefined(DataType)) + { + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.Value.ToString()); + } if (Optional.IsDefined(ColumnName)) { if (ColumnName != null) @@ -38,11 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptio writer.WriteNull("columnName"); } } - if (Optional.IsDefined(DataType)) - { - writer.WritePropertyName("dataType"u8); - writer.WriteStringValue(DataType.Value.ToString()); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -81,29 +81,29 @@ internal static IndexColumn DeserializeIndexColumn(JsonElement element, ModelRea { return null; } - string columnName = default; FeatureDataType? dataType = default; + string columnName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("columnName"u8)) + if (property.NameEquals("dataType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - columnName = null; continue; } - columnName = property.Value.GetString(); + dataType = new FeatureDataType(property.Value.GetString()); continue; } - if (property.NameEquals("dataType"u8)) + if (property.NameEquals("columnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + columnName = null; continue; } - dataType = new FeatureDataType(property.Value.GetString()); + columnName = property.Value.GetString(); continue; } if (options.Format != "W") @@ -112,7 +112,7 @@ internal static IndexColumn DeserializeIndexColumn(JsonElement element, ModelRea } } serializedAdditionalRawData = rawDataDictionary; - return new IndexColumn(columnName, dataType, serializedAdditionalRawData); + return new IndexColumn(dataType, columnName, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.cs index 6943530eba792..e8270ac6295e1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IndexColumn.cs @@ -51,19 +51,19 @@ public IndexColumn() } /// Initializes a new instance of . - /// Specifies the column name. /// Specifies the data type. + /// Specifies the column name. /// Keeps track of any properties unknown to the library. - internal IndexColumn(string columnName, FeatureDataType? dataType, IDictionary serializedAdditionalRawData) + internal IndexColumn(FeatureDataType? dataType, string columnName, IDictionary serializedAdditionalRawData) { - ColumnName = columnName; DataType = dataType; + ColumnName = columnName; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Specifies the column name. - public string ColumnName { get; set; } /// Specifies the data type. public FeatureDataType? DataType { get; set; } + /// Specifies the column name. + public string ColumnName { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobBaseResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobBaseResourceArmPaginatedResult.Serialization.cs index 2a5408b06f1c1..f1615db5b707c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobBaseResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobBaseResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static JobBaseResourceArmPaginatedResult DeserializeJobBaseResourceArmP { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static JobBaseResourceArmPaginatedResult DeserializeJobBaseResourceArmP 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 JobBaseResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new JobBaseResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobBaseResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobBaseResourceArmPaginatedResult.cs index 3f1e1d2a38033..8f12587d2dfba 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobBaseResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobBaseResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal JobBaseResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of JobBase objects. If null, there are no additional pages. /// An array of objects of type JobBase. + /// The link to the next page of JobBase objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal JobBaseResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal JobBaseResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of JobBase objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type JobBase. public IReadOnlyList Value { get; } + /// The link to the next page of JobBase objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobResources.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobResources.Serialization.cs deleted file mode 100644 index de945e485cd9e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobResources.Serialization.cs +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class JobResources : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(JobResources)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(InstanceTypes)) - { - writer.WritePropertyName("instanceTypes"u8); - writer.WriteStartArray(); - foreach (var item in InstanceTypes) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - JobResources 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(JobResources)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeJobResources(document.RootElement, options); - } - - internal static JobResources DeserializeJobResources(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList instanceTypes = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("instanceTypes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - instanceTypes = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new JobResources(instanceTypes ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(JobResources)} does not support writing '{options.Format}' format."); - } - } - - JobResources 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 DeserializeJobResources(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(JobResources)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobResources.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobResources.cs deleted file mode 100644 index 679716f254b4f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobResources.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The JobResources. - internal partial class JobResources - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public JobResources() - { - InstanceTypes = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// List of instance types to choose from. - /// Keeps track of any properties unknown to the library. - internal JobResources(IList instanceTypes, IDictionary serializedAdditionalRawData) - { - InstanceTypes = instanceTypes; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// List of instance types to choose from. - public IList InstanceTypes { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobType.cs index 8c54c4277960c..71af724534e98 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobType.cs @@ -27,7 +27,6 @@ public JobType(string value) private const string SweepValue = "Sweep"; private const string PipelineValue = "Pipeline"; private const string SparkValue = "Spark"; - private const string FineTuningValue = "FineTuning"; /// AutoML. public static JobType AutoML { get; } = new JobType(AutoMLValue); @@ -39,8 +38,6 @@ public JobType(string value) public static JobType Pipeline { get; } = new JobType(PipelineValue); /// Spark. public static JobType Spark { get; } = new JobType(SparkValue); - /// FineTuning. - public static JobType FineTuning { get; } = new JobType(FineTuningValue); /// Determines if two values are the same. public static bool operator ==(JobType left, JobType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JupyterKernelConfig.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JupyterKernelConfig.Serialization.cs deleted file mode 100644 index d89bab0267277..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JupyterKernelConfig.Serialization.cs +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class JupyterKernelConfig : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(JupyterKernelConfig)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Argv)) - { - writer.WritePropertyName("argv"u8); - writer.WriteStartArray(); - foreach (var item in Argv) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (Optional.IsDefined(Language)) - { - writer.WritePropertyName("language"u8); - writer.WriteStringValue(Language); - } - 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 - } - } - writer.WriteEndObject(); - } - - JupyterKernelConfig 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(JupyterKernelConfig)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeJupyterKernelConfig(document.RootElement, options); - } - - internal static JupyterKernelConfig DeserializeJupyterKernelConfig(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList argv = default; - string displayName = default; - string language = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("argv"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - argv = array; - continue; - } - if (property.NameEquals("displayName"u8)) - { - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("language"u8)) - { - language = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new JupyterKernelConfig(argv ?? new ChangeTrackingList(), displayName, language, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(JupyterKernelConfig)} does not support writing '{options.Format}' format."); - } - } - - JupyterKernelConfig 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 DeserializeJupyterKernelConfig(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(JupyterKernelConfig)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JupyterKernelConfig.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JupyterKernelConfig.cs deleted file mode 100644 index 5c65ae7b9990d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JupyterKernelConfig.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Jupyter kernel configuration. - public partial class JupyterKernelConfig - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public JupyterKernelConfig() - { - Argv = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Argument to the the runtime. - /// Display name of the kernel. - /// Language of the kernel [Example value: python]. - /// Keeps track of any properties unknown to the library. - internal JupyterKernelConfig(IList argv, string displayName, string language, IDictionary serializedAdditionalRawData) - { - Argv = argv; - DisplayName = displayName; - Language = language; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Argument to the the runtime. - public IList Argv { get; } - /// Display name of the kernel. - public string DisplayName { get; set; } - /// Language of the kernel [Example value: python]. - public string Language { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.Serialization.cs index dfdd80e7d3c79..e8ccf9f3bd4d7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.Serialization.cs @@ -26,10 +26,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } writer.WriteStartObject(); - writer.WritePropertyName("artifactName"u8); - writer.WriteStringValue(ArtifactName); writer.WritePropertyName("artifactType"u8); writer.WriteStringValue(ArtifactType.ToString()); + writer.WritePropertyName("artifactName"u8); + writer.WriteStringValue(ArtifactName); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -68,20 +68,20 @@ internal static LakeHouseArtifact DeserializeLakeHouseArtifact(JsonElement eleme { return null; } - string artifactName = default; OneLakeArtifactType artifactType = default; + string artifactName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("artifactName"u8)) + if (property.NameEquals("artifactType"u8)) { - artifactName = property.Value.GetString(); + artifactType = new OneLakeArtifactType(property.Value.GetString()); continue; } - if (property.NameEquals("artifactType"u8)) + if (property.NameEquals("artifactName"u8)) { - artifactType = new OneLakeArtifactType(property.Value.GetString()); + artifactName = property.Value.GetString(); continue; } if (options.Format != "W") @@ -90,7 +90,7 @@ internal static LakeHouseArtifact DeserializeLakeHouseArtifact(JsonElement eleme } } serializedAdditionalRawData = rawDataDictionary; - return new LakeHouseArtifact(artifactName, artifactType, serializedAdditionalRawData); + return new LakeHouseArtifact(artifactType, artifactName, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.cs index 1d25cf6fa990c..c8bbc82c7fa0d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LakeHouseArtifact.cs @@ -24,10 +24,10 @@ public LakeHouseArtifact(string artifactName) : base(artifactName) } /// Initializes a new instance of . - /// [Required] OneLake artifact name. /// [Required] OneLake artifact type. + /// [Required] OneLake artifact name. /// Keeps track of any properties unknown to the library. - internal LakeHouseArtifact(string artifactName, OneLakeArtifactType artifactType, IDictionary serializedAdditionalRawData) : base(artifactName, artifactType, serializedAdditionalRawData) + internal LakeHouseArtifact(OneLakeArtifactType artifactType, string artifactName, IDictionary serializedAdditionalRawData) : base(artifactType, artifactName, serializedAdditionalRawData) { ArtifactType = artifactType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.Serialization.cs index 4f4bfc4e577cc..f364b9fc2bc18 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.Serialization.cs @@ -26,16 +26,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } writer.WriteStartObject(); - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"u8); - writer.WriteBooleanValue(IsAnonymous.Value); - } if (Optional.IsDefined(IsArchived)) { writer.WritePropertyName("isArchived"u8); writer.WriteBooleanValue(IsArchived.Value); } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -48,13 +48,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -63,16 +63,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -81,7 +81,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -122,31 +122,31 @@ internal static MachineLearningAssetBase DeserializeMachineLearningAssetBase(Jso { return null; } - bool? isAnonymous = default; bool? isArchived = default; + bool? isAnonymous = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("isAnonymous"u8)) + if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isAnonymous = property.Value.GetBoolean(); + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isArchived = property.Value.GetBoolean(); + isAnonymous = property.Value.GetBoolean(); continue; } if (property.NameEquals("description"u8)) @@ -159,11 +159,11 @@ internal static MachineLearningAssetBase DeserializeMachineLearningAssetBase(Jso description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -171,14 +171,14 @@ internal static MachineLearningAssetBase DeserializeMachineLearningAssetBase(Jso { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -186,7 +186,7 @@ internal static MachineLearningAssetBase DeserializeMachineLearningAssetBase(Jso { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -197,11 +197,11 @@ internal static MachineLearningAssetBase DeserializeMachineLearningAssetBase(Jso serializedAdditionalRawData = rawDataDictionary; return new MachineLearningAssetBase( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - isAnonymous, - isArchived); + isArchived, + isAnonymous); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.cs index 43981242e8a79..7ee0e946397fd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.cs @@ -20,20 +20,20 @@ public MachineLearningAssetBase() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// If the name version are system generated (anonymous registration). /// Is the asset archived?. - internal MachineLearningAssetBase(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isAnonymous, bool? isArchived) : base(description, properties, tags, serializedAdditionalRawData) + /// If the name version are system generated (anonymous registration). + internal MachineLearningAssetBase(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, bool? isAnonymous) : base(description, tags, properties, serializedAdditionalRawData) { - IsAnonymous = isAnonymous; IsArchived = isArchived; + IsAnonymous = isAnonymous; } - /// If the name version are system generated (anonymous registration). - public bool? IsAnonymous { get; set; } /// Is the asset archived?. public bool? IsArchived { get; set; } + /// If the name version are system generated (anonymous registration). + public bool? IsAnonymous { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetContainer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetContainer.Serialization.cs index 79e1e19a5b942..1de17598992dc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetContainer.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetContainer.Serialization.cs @@ -67,13 +67,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -82,16 +82,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -100,7 +100,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -145,8 +145,8 @@ internal static MachineLearningAssetContainer DeserializeMachineLearningAssetCon string latestVersion = default; string nextVersion = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -190,11 +190,11 @@ internal static MachineLearningAssetContainer DeserializeMachineLearningAssetCon description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -202,14 +202,14 @@ internal static MachineLearningAssetContainer DeserializeMachineLearningAssetCon { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -217,7 +217,7 @@ internal static MachineLearningAssetContainer DeserializeMachineLearningAssetCon { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -228,8 +228,8 @@ internal static MachineLearningAssetContainer DeserializeMachineLearningAssetCon serializedAdditionalRawData = rawDataDictionary; return new MachineLearningAssetContainer( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, isArchived, latestVersion, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetContainer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetContainer.cs index e36015431efbe..f95c944d6ceb6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetContainer.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetContainer.cs @@ -20,13 +20,13 @@ public MachineLearningAssetContainer() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. - internal MachineLearningAssetContainer(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags, serializedAdditionalRawData) + internal MachineLearningAssetContainer(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion) : base(description, tags, properties, serializedAdditionalRawData) { IsArchived = isArchived; LatestVersion = latestVersion; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.Serialization.cs index b9de3228e18b5..5a4cfdd1caf3c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.Serialization.cs @@ -79,32 +79,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("serviceDataAccessAuthIdentity"u8); writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); } - if (Optional.IsDefined(ResourceGroup)) + if (Optional.IsDefined(SubscriptionId)) { - if (ResourceGroup != null) + if (SubscriptionId != null) { - writer.WritePropertyName("resourceGroup"u8); - writer.WriteStringValue(ResourceGroup); + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); } else { - writer.WriteNull("resourceGroup"); + writer.WriteNull("subscriptionId"); } } - if (Optional.IsDefined(SubscriptionId)) + if (Optional.IsDefined(ResourceGroup)) { - if (SubscriptionId != null) + if (ResourceGroup != null) { - writer.WritePropertyName("subscriptionId"u8); - writer.WriteStringValue(SubscriptionId); + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); } else { - writer.WriteNull("subscriptionId"); + writer.WriteNull("resourceGroup"); } } - writer.WritePropertyName("credentials"u8); - writer.WriteObjectValue(Credentials, options); writer.WritePropertyName("datastoreType"u8); writer.WriteStringValue(DatastoreType.ToString()); if (options.Format != "W" && Optional.IsDefined(IsDefault)) @@ -112,6 +110,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("isDefault"u8); writer.WriteBooleanValue(IsDefault.Value); } + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials, options); if (Optional.IsDefined(Description)) { if (Description != null) @@ -124,13 +124,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -139,16 +139,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -157,7 +157,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -203,14 +203,14 @@ internal static MachineLearningAzureBlobDatastore DeserializeMachineLearningAzur string endpoint = default; string protocol = default; MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default; - string resourceGroup = default; string subscriptionId = default; - MachineLearningDatastoreCredentials credentials = default; + string resourceGroup = default; DatastoreType datastoreType = default; bool? isDefault = default; + MachineLearningDatastoreCredentials credentials = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -264,29 +264,24 @@ internal static MachineLearningAzureBlobDatastore DeserializeMachineLearningAzur serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); continue; } - if (property.NameEquals("resourceGroup"u8)) + if (property.NameEquals("subscriptionId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - resourceGroup = null; + subscriptionId = null; continue; } - resourceGroup = property.Value.GetString(); + subscriptionId = property.Value.GetString(); continue; } - if (property.NameEquals("subscriptionId"u8)) + if (property.NameEquals("resourceGroup"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - subscriptionId = null; + resourceGroup = null; continue; } - subscriptionId = property.Value.GetString(); - continue; - } - if (property.NameEquals("credentials"u8)) - { - credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value, options); + resourceGroup = property.Value.GetString(); continue; } if (property.NameEquals("datastoreType"u8)) @@ -303,6 +298,11 @@ internal static MachineLearningAzureBlobDatastore DeserializeMachineLearningAzur isDefault = property.Value.GetBoolean(); continue; } + if (property.NameEquals("credentials"u8)) + { + credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value, options); + continue; + } if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -313,11 +313,11 @@ internal static MachineLearningAzureBlobDatastore DeserializeMachineLearningAzur description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -325,14 +325,14 @@ internal static MachineLearningAzureBlobDatastore DeserializeMachineLearningAzur { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -340,7 +340,7 @@ internal static MachineLearningAzureBlobDatastore DeserializeMachineLearningAzur { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -351,19 +351,19 @@ internal static MachineLearningAzureBlobDatastore DeserializeMachineLearningAzur serializedAdditionalRawData = rawDataDictionary; return new MachineLearningAzureBlobDatastore( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - credentials, datastoreType, isDefault, + credentials, accountName, containerName, endpoint, protocol, serviceDataAccessAuthIdentity, - resourceGroup, - subscriptionId); + subscriptionId, + resourceGroup); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.cs index dc6f88f223dc6..d431de5045ac7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.cs @@ -29,32 +29,32 @@ public MachineLearningAzureBlobDatastore(MachineLearningDatastoreCredentials cre /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. + /// [Required] Storage type backing the datastore. + /// Readonly property to indicate if datastore is the workspace default datastore. /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , and . /// - /// [Required] Storage type backing the datastore. - /// Readonly property to indicate if datastore is the workspace default datastore. /// Storage account name. /// Storage account container name. /// Azure cloud endpoint for the storage account. /// Protocol used to communicate with the storage account. /// Indicates which identity to use to authenticate service data access to customer's storage. - /// Azure Resource Group name. /// Azure Subscription Id. - internal MachineLearningAzureBlobDatastore(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, string accountName, string containerName, string endpoint, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string resourceGroup, string subscriptionId) : base(description, properties, tags, serializedAdditionalRawData, credentials, datastoreType, isDefault) + /// Azure Resource Group name. + internal MachineLearningAzureBlobDatastore(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, DatastoreType datastoreType, bool? isDefault, MachineLearningDatastoreCredentials credentials, string accountName, string containerName, string endpoint, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string subscriptionId, string resourceGroup) : base(description, tags, properties, serializedAdditionalRawData, datastoreType, isDefault, credentials) { AccountName = accountName; ContainerName = containerName; Endpoint = endpoint; Protocol = protocol; ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; - ResourceGroup = resourceGroup; SubscriptionId = subscriptionId; + ResourceGroup = resourceGroup; DatastoreType = datastoreType; } @@ -73,9 +73,9 @@ internal MachineLearningAzureBlobDatastore() public string Protocol { get; set; } /// Indicates which identity to use to authenticate service data access to customer's storage. public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } - /// Azure Resource Group name. - public string ResourceGroup { get; set; } /// Azure Subscription Id. public string SubscriptionId { get; set; } + /// Azure Resource Group name. + public string ResourceGroup { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.Serialization.cs index 0b7cd57f708f3..3501d4182cfda 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.Serialization.cs @@ -26,39 +26,37 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteStartObject(); + writer.WritePropertyName("storeName"u8); + writer.WriteStringValue(StoreName); if (Optional.IsDefined(ServiceDataAccessAuthIdentity)) { writer.WritePropertyName("serviceDataAccessAuthIdentity"u8); writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); } - writer.WritePropertyName("storeName"u8); - writer.WriteStringValue(StoreName); - if (Optional.IsDefined(ResourceGroup)) + if (Optional.IsDefined(SubscriptionId)) { - if (ResourceGroup != null) + if (SubscriptionId != null) { - writer.WritePropertyName("resourceGroup"u8); - writer.WriteStringValue(ResourceGroup); + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); } else { - writer.WriteNull("resourceGroup"); + writer.WriteNull("subscriptionId"); } } - if (Optional.IsDefined(SubscriptionId)) + if (Optional.IsDefined(ResourceGroup)) { - if (SubscriptionId != null) + if (ResourceGroup != null) { - writer.WritePropertyName("subscriptionId"u8); - writer.WriteStringValue(SubscriptionId); + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); } else { - writer.WriteNull("subscriptionId"); + writer.WriteNull("resourceGroup"); } } - writer.WritePropertyName("credentials"u8); - writer.WriteObjectValue(Credentials, options); writer.WritePropertyName("datastoreType"u8); writer.WriteStringValue(DatastoreType.ToString()); if (options.Format != "W" && Optional.IsDefined(IsDefault)) @@ -66,6 +64,8 @@ void IJsonModel.Write(Utf8JsonWriter writer.WritePropertyName("isDefault"u8); writer.WriteBooleanValue(IsDefault.Value); } + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials, options); if (Optional.IsDefined(Description)) { if (Description != null) @@ -78,13 +78,13 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -93,16 +93,16 @@ void IJsonModel.Write(Utf8JsonWriter } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -111,7 +111,7 @@ void IJsonModel.Write(Utf8JsonWriter } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -152,42 +152,32 @@ internal static MachineLearningAzureDataLakeGen1Datastore DeserializeMachineLear { return null; } - MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default; string storeName = default; - string resourceGroup = default; + MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default; string subscriptionId = default; - MachineLearningDatastoreCredentials credentials = default; + string resourceGroup = default; DatastoreType datastoreType = default; bool? isDefault = default; + MachineLearningDatastoreCredentials credentials = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("serviceDataAccessAuthIdentity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); - continue; - } if (property.NameEquals("storeName"u8)) { storeName = property.Value.GetString(); continue; } - if (property.NameEquals("resourceGroup"u8)) + if (property.NameEquals("serviceDataAccessAuthIdentity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - resourceGroup = null; continue; } - resourceGroup = property.Value.GetString(); + serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); continue; } if (property.NameEquals("subscriptionId"u8)) @@ -200,9 +190,14 @@ internal static MachineLearningAzureDataLakeGen1Datastore DeserializeMachineLear subscriptionId = property.Value.GetString(); continue; } - if (property.NameEquals("credentials"u8)) + if (property.NameEquals("resourceGroup"u8)) { - credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value, options); + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceGroup = null; + continue; + } + resourceGroup = property.Value.GetString(); continue; } if (property.NameEquals("datastoreType"u8)) @@ -219,6 +214,11 @@ internal static MachineLearningAzureDataLakeGen1Datastore DeserializeMachineLear isDefault = property.Value.GetBoolean(); continue; } + if (property.NameEquals("credentials"u8)) + { + credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value, options); + continue; + } if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -229,11 +229,11 @@ internal static MachineLearningAzureDataLakeGen1Datastore DeserializeMachineLear description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -241,14 +241,14 @@ internal static MachineLearningAzureDataLakeGen1Datastore DeserializeMachineLear { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -256,7 +256,7 @@ internal static MachineLearningAzureDataLakeGen1Datastore DeserializeMachineLear { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -267,16 +267,16 @@ internal static MachineLearningAzureDataLakeGen1Datastore DeserializeMachineLear serializedAdditionalRawData = rawDataDictionary; return new MachineLearningAzureDataLakeGen1Datastore( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - credentials, datastoreType, isDefault, - serviceDataAccessAuthIdentity, + credentials, storeName, - resourceGroup, - subscriptionId); + serviceDataAccessAuthIdentity, + subscriptionId, + resourceGroup); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.cs index 5a73a38d2ea47..f0d61e1f7e272 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.cs @@ -32,26 +32,26 @@ public MachineLearningAzureDataLakeGen1Datastore(MachineLearningDatastoreCredent /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. + /// [Required] Storage type backing the datastore. + /// Readonly property to indicate if datastore is the workspace default datastore. /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , and . /// - /// [Required] Storage type backing the datastore. - /// Readonly property to indicate if datastore is the workspace default datastore. - /// Indicates which identity to use to authenticate service data access to customer's storage. /// [Required] Azure Data Lake store name. - /// Azure Resource Group name. + /// Indicates which identity to use to authenticate service data access to customer's storage. /// Azure Subscription Id. - internal MachineLearningAzureDataLakeGen1Datastore(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string storeName, string resourceGroup, string subscriptionId) : base(description, properties, tags, serializedAdditionalRawData, credentials, datastoreType, isDefault) + /// Azure Resource Group name. + internal MachineLearningAzureDataLakeGen1Datastore(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, DatastoreType datastoreType, bool? isDefault, MachineLearningDatastoreCredentials credentials, string storeName, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string subscriptionId, string resourceGroup) : base(description, tags, properties, serializedAdditionalRawData, datastoreType, isDefault, credentials) { - ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; StoreName = storeName; - ResourceGroup = resourceGroup; + ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; SubscriptionId = subscriptionId; + ResourceGroup = resourceGroup; DatastoreType = datastoreType; } @@ -60,13 +60,13 @@ internal MachineLearningAzureDataLakeGen1Datastore() { } - /// Indicates which identity to use to authenticate service data access to customer's storage. - public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } /// [Required] Azure Data Lake store name. public string StoreName { get; set; } - /// Azure Resource Group name. - public string ResourceGroup { get; set; } + /// Indicates which identity to use to authenticate service data access to customer's storage. + public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } /// Azure Subscription Id. public string SubscriptionId { get; set; } + /// Azure Resource Group name. + public string ResourceGroup { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.Serialization.cs index befcefaa22cd0..8d684e4e4ef45 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteStartObject(); + writer.WritePropertyName("filesystem"u8); + writer.WriteStringValue(Filesystem); writer.WritePropertyName("accountName"u8); writer.WriteStringValue(AccountName); if (Optional.IsDefined(Endpoint)) @@ -40,8 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteNull("endpoint"); } } - writer.WritePropertyName("filesystem"u8); - writer.WriteStringValue(Filesystem); if (Optional.IsDefined(Protocol)) { if (Protocol != null) @@ -59,32 +59,30 @@ void IJsonModel.Write(Utf8JsonWriter writer.WritePropertyName("serviceDataAccessAuthIdentity"u8); writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); } - if (Optional.IsDefined(ResourceGroup)) + if (Optional.IsDefined(SubscriptionId)) { - if (ResourceGroup != null) + if (SubscriptionId != null) { - writer.WritePropertyName("resourceGroup"u8); - writer.WriteStringValue(ResourceGroup); + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); } else { - writer.WriteNull("resourceGroup"); + writer.WriteNull("subscriptionId"); } } - if (Optional.IsDefined(SubscriptionId)) + if (Optional.IsDefined(ResourceGroup)) { - if (SubscriptionId != null) + if (ResourceGroup != null) { - writer.WritePropertyName("subscriptionId"u8); - writer.WriteStringValue(SubscriptionId); + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); } else { - writer.WriteNull("subscriptionId"); + writer.WriteNull("resourceGroup"); } } - writer.WritePropertyName("credentials"u8); - writer.WriteObjectValue(Credentials, options); writer.WritePropertyName("datastoreType"u8); writer.WriteStringValue(DatastoreType.ToString()); if (options.Format != "W" && Optional.IsDefined(IsDefault)) @@ -92,6 +90,8 @@ void IJsonModel.Write(Utf8JsonWriter writer.WritePropertyName("isDefault"u8); writer.WriteBooleanValue(IsDefault.Value); } + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials, options); if (Optional.IsDefined(Description)) { if (Description != null) @@ -104,13 +104,13 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -119,16 +119,16 @@ void IJsonModel.Write(Utf8JsonWriter } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -137,7 +137,7 @@ void IJsonModel.Write(Utf8JsonWriter } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -178,23 +178,28 @@ internal static MachineLearningAzureDataLakeGen2Datastore DeserializeMachineLear { return null; } + string filesystem = default; string accountName = default; string endpoint = default; - string filesystem = default; string protocol = default; MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default; - string resourceGroup = default; string subscriptionId = default; - MachineLearningDatastoreCredentials credentials = default; + string resourceGroup = default; DatastoreType datastoreType = default; bool? isDefault = default; + MachineLearningDatastoreCredentials credentials = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("filesystem"u8)) + { + filesystem = property.Value.GetString(); + continue; + } if (property.NameEquals("accountName"u8)) { accountName = property.Value.GetString(); @@ -210,11 +215,6 @@ internal static MachineLearningAzureDataLakeGen2Datastore DeserializeMachineLear endpoint = property.Value.GetString(); continue; } - if (property.NameEquals("filesystem"u8)) - { - filesystem = property.Value.GetString(); - continue; - } if (property.NameEquals("protocol"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -234,29 +234,24 @@ internal static MachineLearningAzureDataLakeGen2Datastore DeserializeMachineLear serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); continue; } - if (property.NameEquals("resourceGroup"u8)) + if (property.NameEquals("subscriptionId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - resourceGroup = null; + subscriptionId = null; continue; } - resourceGroup = property.Value.GetString(); + subscriptionId = property.Value.GetString(); continue; } - if (property.NameEquals("subscriptionId"u8)) + if (property.NameEquals("resourceGroup"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - subscriptionId = null; + resourceGroup = null; continue; } - subscriptionId = property.Value.GetString(); - continue; - } - if (property.NameEquals("credentials"u8)) - { - credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value, options); + resourceGroup = property.Value.GetString(); continue; } if (property.NameEquals("datastoreType"u8)) @@ -273,6 +268,11 @@ internal static MachineLearningAzureDataLakeGen2Datastore DeserializeMachineLear isDefault = property.Value.GetBoolean(); continue; } + if (property.NameEquals("credentials"u8)) + { + credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value, options); + continue; + } if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -283,11 +283,11 @@ internal static MachineLearningAzureDataLakeGen2Datastore DeserializeMachineLear description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -295,14 +295,14 @@ internal static MachineLearningAzureDataLakeGen2Datastore DeserializeMachineLear { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -310,7 +310,7 @@ internal static MachineLearningAzureDataLakeGen2Datastore DeserializeMachineLear { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -321,19 +321,19 @@ internal static MachineLearningAzureDataLakeGen2Datastore DeserializeMachineLear serializedAdditionalRawData = rawDataDictionary; return new MachineLearningAzureDataLakeGen2Datastore( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - credentials, datastoreType, isDefault, + credentials, + filesystem, accountName, endpoint, - filesystem, protocol, serviceDataAccessAuthIdentity, - resourceGroup, - subscriptionId); + subscriptionId, + resourceGroup); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.cs index 81af87c094bc7..d122db394e696 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.cs @@ -19,48 +19,48 @@ public partial class MachineLearningAzureDataLakeGen2Datastore : MachineLearning /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , and . /// - /// [Required] Storage account name. /// [Required] The name of the Data Lake Gen2 filesystem. - /// , or is null. - public MachineLearningAzureDataLakeGen2Datastore(MachineLearningDatastoreCredentials credentials, string accountName, string filesystem) : base(credentials) + /// [Required] Storage account name. + /// , or is null. + public MachineLearningAzureDataLakeGen2Datastore(MachineLearningDatastoreCredentials credentials, string filesystem, string accountName) : base(credentials) { Argument.AssertNotNull(credentials, nameof(credentials)); - Argument.AssertNotNull(accountName, nameof(accountName)); Argument.AssertNotNull(filesystem, nameof(filesystem)); + Argument.AssertNotNull(accountName, nameof(accountName)); - AccountName = accountName; Filesystem = filesystem; + AccountName = accountName; DatastoreType = DatastoreType.AzureDataLakeGen2; } /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. + /// [Required] Storage type backing the datastore. + /// Readonly property to indicate if datastore is the workspace default datastore. /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , and . /// - /// [Required] Storage type backing the datastore. - /// Readonly property to indicate if datastore is the workspace default datastore. + /// [Required] The name of the Data Lake Gen2 filesystem. /// [Required] Storage account name. /// Azure cloud endpoint for the storage account. - /// [Required] The name of the Data Lake Gen2 filesystem. /// Protocol used to communicate with the storage account. /// Indicates which identity to use to authenticate service data access to customer's storage. - /// Azure Resource Group name. /// Azure Subscription Id. - internal MachineLearningAzureDataLakeGen2Datastore(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, string accountName, string endpoint, string filesystem, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string resourceGroup, string subscriptionId) : base(description, properties, tags, serializedAdditionalRawData, credentials, datastoreType, isDefault) + /// Azure Resource Group name. + internal MachineLearningAzureDataLakeGen2Datastore(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, DatastoreType datastoreType, bool? isDefault, MachineLearningDatastoreCredentials credentials, string filesystem, string accountName, string endpoint, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string subscriptionId, string resourceGroup) : base(description, tags, properties, serializedAdditionalRawData, datastoreType, isDefault, credentials) { + Filesystem = filesystem; AccountName = accountName; Endpoint = endpoint; - Filesystem = filesystem; Protocol = protocol; ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; - ResourceGroup = resourceGroup; SubscriptionId = subscriptionId; + ResourceGroup = resourceGroup; DatastoreType = datastoreType; } @@ -69,19 +69,19 @@ internal MachineLearningAzureDataLakeGen2Datastore() { } + /// [Required] The name of the Data Lake Gen2 filesystem. + public string Filesystem { get; set; } /// [Required] Storage account name. public string AccountName { get; set; } /// Azure cloud endpoint for the storage account. public string Endpoint { get; set; } - /// [Required] The name of the Data Lake Gen2 filesystem. - public string Filesystem { get; set; } /// Protocol used to communicate with the storage account. public string Protocol { get; set; } /// Indicates which identity to use to authenticate service data access to customer's storage. public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } - /// Azure Resource Group name. - public string ResourceGroup { get; set; } /// Azure Subscription Id. public string SubscriptionId { get; set; } + /// Azure Resource Group name. + public string ResourceGroup { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.Serialization.cs index 2d7fac71ee08b..359f8ec27f93f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.Serialization.cs @@ -28,6 +28,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStartObject(); writer.WritePropertyName("accountName"u8); writer.WriteStringValue(AccountName); + writer.WritePropertyName("fileShareName"u8); + writer.WriteStringValue(FileShareName); if (Optional.IsDefined(Endpoint)) { if (Endpoint != null) @@ -40,8 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("endpoint"); } } - writer.WritePropertyName("fileShareName"u8); - writer.WriteStringValue(FileShareName); if (Optional.IsDefined(Protocol)) { if (Protocol != null) @@ -59,32 +59,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("serviceDataAccessAuthIdentity"u8); writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); } - if (Optional.IsDefined(ResourceGroup)) + if (Optional.IsDefined(SubscriptionId)) { - if (ResourceGroup != null) + if (SubscriptionId != null) { - writer.WritePropertyName("resourceGroup"u8); - writer.WriteStringValue(ResourceGroup); + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); } else { - writer.WriteNull("resourceGroup"); + writer.WriteNull("subscriptionId"); } } - if (Optional.IsDefined(SubscriptionId)) + if (Optional.IsDefined(ResourceGroup)) { - if (SubscriptionId != null) + if (ResourceGroup != null) { - writer.WritePropertyName("subscriptionId"u8); - writer.WriteStringValue(SubscriptionId); + writer.WritePropertyName("resourceGroup"u8); + writer.WriteStringValue(ResourceGroup); } else { - writer.WriteNull("subscriptionId"); + writer.WriteNull("resourceGroup"); } } - writer.WritePropertyName("credentials"u8); - writer.WriteObjectValue(Credentials, options); writer.WritePropertyName("datastoreType"u8); writer.WriteStringValue(DatastoreType.ToString()); if (options.Format != "W" && Optional.IsDefined(IsDefault)) @@ -92,6 +90,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("isDefault"u8); writer.WriteBooleanValue(IsDefault.Value); } + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials, options); if (Optional.IsDefined(Description)) { if (Description != null) @@ -104,13 +104,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -119,16 +119,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -137,7 +137,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -179,18 +179,18 @@ internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzur return null; } string accountName = default; - string endpoint = default; string fileShareName = default; + string endpoint = default; string protocol = default; MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default; - string resourceGroup = default; string subscriptionId = default; - MachineLearningDatastoreCredentials credentials = default; + string resourceGroup = default; DatastoreType datastoreType = default; bool? isDefault = default; + MachineLearningDatastoreCredentials credentials = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -200,6 +200,11 @@ internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzur accountName = property.Value.GetString(); continue; } + if (property.NameEquals("fileShareName"u8)) + { + fileShareName = property.Value.GetString(); + continue; + } if (property.NameEquals("endpoint"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -210,11 +215,6 @@ internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzur endpoint = property.Value.GetString(); continue; } - if (property.NameEquals("fileShareName"u8)) - { - fileShareName = property.Value.GetString(); - continue; - } if (property.NameEquals("protocol"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -234,29 +234,24 @@ internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzur serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); continue; } - if (property.NameEquals("resourceGroup"u8)) + if (property.NameEquals("subscriptionId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - resourceGroup = null; + subscriptionId = null; continue; } - resourceGroup = property.Value.GetString(); + subscriptionId = property.Value.GetString(); continue; } - if (property.NameEquals("subscriptionId"u8)) + if (property.NameEquals("resourceGroup"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - subscriptionId = null; + resourceGroup = null; continue; } - subscriptionId = property.Value.GetString(); - continue; - } - if (property.NameEquals("credentials"u8)) - { - credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value, options); + resourceGroup = property.Value.GetString(); continue; } if (property.NameEquals("datastoreType"u8)) @@ -273,6 +268,11 @@ internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzur isDefault = property.Value.GetBoolean(); continue; } + if (property.NameEquals("credentials"u8)) + { + credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value, options); + continue; + } if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -283,11 +283,11 @@ internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzur description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -295,14 +295,14 @@ internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzur { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -310,7 +310,7 @@ internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzur { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -321,19 +321,19 @@ internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzur serializedAdditionalRawData = rawDataDictionary; return new MachineLearningAzureFileDatastore( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - credentials, datastoreType, isDefault, + credentials, accountName, - endpoint, fileShareName, + endpoint, protocol, serviceDataAccessAuthIdentity, - resourceGroup, - subscriptionId); + subscriptionId, + resourceGroup); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.cs index 92af4aea614e4..86d6021c5c961 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.cs @@ -35,32 +35,32 @@ public MachineLearningAzureFileDatastore(MachineLearningDatastoreCredentials cre /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. + /// [Required] Storage type backing the datastore. + /// Readonly property to indicate if datastore is the workspace default datastore. /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , and . /// - /// [Required] Storage type backing the datastore. - /// Readonly property to indicate if datastore is the workspace default datastore. /// [Required] Storage account name. - /// Azure cloud endpoint for the storage account. /// [Required] The name of the Azure file share that the datastore points to. + /// Azure cloud endpoint for the storage account. /// Protocol used to communicate with the storage account. /// Indicates which identity to use to authenticate service data access to customer's storage. - /// Azure Resource Group name. /// Azure Subscription Id. - internal MachineLearningAzureFileDatastore(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, string accountName, string endpoint, string fileShareName, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string resourceGroup, string subscriptionId) : base(description, properties, tags, serializedAdditionalRawData, credentials, datastoreType, isDefault) + /// Azure Resource Group name. + internal MachineLearningAzureFileDatastore(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, DatastoreType datastoreType, bool? isDefault, MachineLearningDatastoreCredentials credentials, string accountName, string fileShareName, string endpoint, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string subscriptionId, string resourceGroup) : base(description, tags, properties, serializedAdditionalRawData, datastoreType, isDefault, credentials) { AccountName = accountName; - Endpoint = endpoint; FileShareName = fileShareName; + Endpoint = endpoint; Protocol = protocol; ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; - ResourceGroup = resourceGroup; SubscriptionId = subscriptionId; + ResourceGroup = resourceGroup; DatastoreType = datastoreType; } @@ -71,17 +71,17 @@ internal MachineLearningAzureFileDatastore() /// [Required] Storage account name. public string AccountName { get; set; } - /// Azure cloud endpoint for the storage account. - public string Endpoint { get; set; } /// [Required] The name of the Azure file share that the datastore points to. public string FileShareName { get; set; } + /// Azure cloud endpoint for the storage account. + public string Endpoint { get; set; } /// Protocol used to communicate with the storage account. public string Protocol { get; set; } /// Indicates which identity to use to authenticate service data access to customer's storage. public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } - /// Azure Resource Group name. - public string ResourceGroup { get; set; } /// Azure Subscription Id. public string SubscriptionId { get; set; } + /// Azure Resource Group name. + public string ResourceGroup { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.Serialization.cs index 46e940031e63b..ee80212c3d813 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.Serialization.cs @@ -55,21 +55,28 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WritePropertyName("errorThreshold"u8); writer.WriteNumberValue(ErrorThreshold.Value); } - if (Optional.IsDefined(LoggingLevel)) - { - writer.WritePropertyName("loggingLevel"u8); - writer.WriteStringValue(LoggingLevel.Value.ToString()); - } - if (Optional.IsDefined(MaxConcurrencyPerInstance)) + if (Optional.IsDefined(RetrySettings)) { - writer.WritePropertyName("maxConcurrencyPerInstance"u8); - writer.WriteNumberValue(MaxConcurrencyPerInstance.Value); + if (RetrySettings != null) + { + writer.WritePropertyName("retrySettings"u8); + writer.WriteObjectValue(RetrySettings, options); + } + else + { + writer.WriteNull("retrySettings"); + } } if (Optional.IsDefined(MiniBatchSize)) { writer.WritePropertyName("miniBatchSize"u8); writer.WriteNumberValue(MiniBatchSize.Value); } + if (Optional.IsDefined(LoggingLevel)) + { + writer.WritePropertyName("loggingLevel"u8); + writer.WriteStringValue(LoggingLevel.Value.ToString()); + } if (Optional.IsDefined(Model)) { if (Model != null) @@ -82,6 +89,11 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteNull("model"); } } + if (Optional.IsDefined(MaxConcurrencyPerInstance)) + { + writer.WritePropertyName("maxConcurrencyPerInstance"u8); + writer.WriteNumberValue(MaxConcurrencyPerInstance.Value); + } if (Optional.IsDefined(OutputAction)) { writer.WritePropertyName("outputAction"u8); @@ -92,11 +104,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WritePropertyName("outputFileName"u8); writer.WriteStringValue(OutputFileName); } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } if (Optional.IsDefined(Resources)) { if (Resources != null) @@ -109,40 +116,51 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteNull("resources"); } } - if (Optional.IsDefined(RetrySettings)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { - if (RetrySettings != null) + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) { - writer.WritePropertyName("retrySettings"u8); - writer.WriteObjectValue(RetrySettings, options); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); } else { - writer.WriteNull("retrySettings"); + writer.WriteNull("description"); } } - if (Optional.IsDefined(CodeConfiguration)) + if (Optional.IsCollectionDefined(Properties)) { - if (CodeConfiguration != null) + if (Properties != null) { - writer.WritePropertyName("codeConfiguration"u8); - writer.WriteObjectValue(CodeConfiguration, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } else { - writer.WriteNull("codeConfiguration"); + writer.WriteNull("properties"); } } - if (Optional.IsDefined(Description)) + if (Optional.IsDefined(CodeConfiguration)) { - if (Description != null) + if (CodeConfiguration != null) { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); + writer.WritePropertyName("codeConfiguration"u8); + writer.WriteObjectValue(CodeConfiguration, options); } else { - writer.WriteNull("description"); + writer.WriteNull("codeConfiguration"); } } if (Optional.IsDefined(EnvironmentId)) @@ -175,24 +193,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteNull("environmentVariables"); } } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -234,20 +234,20 @@ internal static MachineLearningBatchDeploymentProperties DeserializeMachineLearn string compute = default; BatchDeploymentConfiguration deploymentConfiguration = default; int? errorThreshold = default; - MachineLearningBatchLoggingLevel? loggingLevel = default; - int? maxConcurrencyPerInstance = default; + MachineLearningBatchRetrySettings retrySettings = default; long? miniBatchSize = default; + MachineLearningBatchLoggingLevel? loggingLevel = default; MachineLearningAssetReferenceBase model = default; + int? maxConcurrencyPerInstance = default; MachineLearningBatchOutputAction? outputAction = default; string outputFileName = default; - MachineLearningDeploymentProvisioningState? provisioningState = default; MachineLearningDeploymentResourceConfiguration resources = default; - MachineLearningBatchRetrySettings retrySettings = default; - MachineLearningCodeConfiguration codeConfiguration = default; + MachineLearningDeploymentProvisioningState? provisioningState = default; string description = default; + IDictionary properties = default; + MachineLearningCodeConfiguration codeConfiguration = default; string environmentId = default; IDictionary environmentVariables = default; - IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -281,31 +281,32 @@ internal static MachineLearningBatchDeploymentProperties DeserializeMachineLearn errorThreshold = property.Value.GetInt32(); continue; } - if (property.NameEquals("loggingLevel"u8)) + if (property.NameEquals("retrySettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + retrySettings = null; continue; } - loggingLevel = new MachineLearningBatchLoggingLevel(property.Value.GetString()); + retrySettings = MachineLearningBatchRetrySettings.DeserializeMachineLearningBatchRetrySettings(property.Value, options); continue; } - if (property.NameEquals("maxConcurrencyPerInstance"u8)) + if (property.NameEquals("miniBatchSize"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - maxConcurrencyPerInstance = property.Value.GetInt32(); + miniBatchSize = property.Value.GetInt64(); continue; } - if (property.NameEquals("miniBatchSize"u8)) + if (property.NameEquals("loggingLevel"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - miniBatchSize = property.Value.GetInt64(); + loggingLevel = new MachineLearningBatchLoggingLevel(property.Value.GetString()); continue; } if (property.NameEquals("model"u8)) @@ -318,6 +319,15 @@ internal static MachineLearningBatchDeploymentProperties DeserializeMachineLearn model = MachineLearningAssetReferenceBase.DeserializeMachineLearningAssetReferenceBase(property.Value, options); continue; } + if (property.NameEquals("maxConcurrencyPerInstance"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxConcurrencyPerInstance = property.Value.GetInt32(); + continue; + } if (property.NameEquals("outputAction"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -332,53 +342,58 @@ internal static MachineLearningBatchDeploymentProperties DeserializeMachineLearn outputFileName = property.Value.GetString(); continue; } - if (property.NameEquals("provisioningState"u8)) + if (property.NameEquals("resources"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + resources = null; continue; } - provisioningState = new MachineLearningDeploymentProvisioningState(property.Value.GetString()); + resources = MachineLearningDeploymentResourceConfiguration.DeserializeMachineLearningDeploymentResourceConfiguration(property.Value, options); continue; } - if (property.NameEquals("resources"u8)) + if (property.NameEquals("provisioningState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - resources = null; continue; } - resources = MachineLearningDeploymentResourceConfiguration.DeserializeMachineLearningDeploymentResourceConfiguration(property.Value, options); + provisioningState = new MachineLearningDeploymentProvisioningState(property.Value.GetString()); continue; } - if (property.NameEquals("retrySettings"u8)) + if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - retrySettings = null; + description = null; continue; } - retrySettings = MachineLearningBatchRetrySettings.DeserializeMachineLearningBatchRetrySettings(property.Value, options); + description = property.Value.GetString(); continue; } - if (property.NameEquals("codeConfiguration"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - codeConfiguration = null; + properties = null; continue; } - codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value, options); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; continue; } - if (property.NameEquals("description"u8)) + if (property.NameEquals("codeConfiguration"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - description = null; + codeConfiguration = null; continue; } - description = property.Value.GetString(); + codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value, options); continue; } if (property.NameEquals("environmentId"u8)) @@ -406,21 +421,6 @@ internal static MachineLearningBatchDeploymentProperties DeserializeMachineLearn environmentVariables = dictionary; continue; } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - properties = dictionary; - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -428,24 +428,24 @@ internal static MachineLearningBatchDeploymentProperties DeserializeMachineLearn } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningBatchDeploymentProperties( - codeConfiguration, description, + properties ?? new ChangeTrackingDictionary(), + codeConfiguration, environmentId, environmentVariables ?? new ChangeTrackingDictionary(), - properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, compute, deploymentConfiguration, errorThreshold, - loggingLevel, - maxConcurrencyPerInstance, + retrySettings, miniBatchSize, + loggingLevel, model, + maxConcurrencyPerInstance, outputAction, outputFileName, - provisioningState, resources, - retrySettings); + provisioningState); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.cs index 6de796fcd4b91..b3d790f15be87 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.cs @@ -19,11 +19,11 @@ public MachineLearningBatchDeploymentProperties() } /// Initializes a new instance of . - /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Code configuration for the endpoint deployment. /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. - /// Property dictionary. Properties can be added, but not removed or altered. /// Keeps track of any properties unknown to the library. /// Compute target for batch inference operation. /// @@ -38,43 +38,43 @@ public MachineLearningBatchDeploymentProperties() /// For TabularDataset, this value is the count of record failures. /// If set to -1 (the lower bound), all failures during batch inference will be ignored. /// - /// Logging level for batch inference operation. - /// Indicates maximum number of parallelism per instance. + /// + /// Retry Settings for the batch inference operation. + /// If not provided, will default to the defaults defined in BatchRetrySettings. + /// /// /// Size of the mini-batch passed to each batch invocation. /// For FileDataset, this is the number of files per mini-batch. /// For TabularDataset, this is the size of the records in bytes, per mini-batch. /// + /// Logging level for batch inference operation. /// /// Reference to the model asset for the endpoint deployment. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// + /// Indicates maximum number of parallelism per instance. /// Indicates how the output will be organized. /// Customized output file name for append_row output action. - /// Provisioning state for the endpoint deployment. /// /// Indicates compute configuration for the job. /// If not provided, will default to the defaults defined in ResourceConfiguration. /// - /// - /// Retry Settings for the batch inference operation. - /// If not provided, will default to the defaults defined in BatchRetrySettings. - /// - internal MachineLearningBatchDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, IDictionary serializedAdditionalRawData, string compute, BatchDeploymentConfiguration deploymentConfiguration, int? errorThreshold, MachineLearningBatchLoggingLevel? loggingLevel, int? maxConcurrencyPerInstance, long? miniBatchSize, MachineLearningAssetReferenceBase model, MachineLearningBatchOutputAction? outputAction, string outputFileName, MachineLearningDeploymentProvisioningState? provisioningState, MachineLearningDeploymentResourceConfiguration resources, MachineLearningBatchRetrySettings retrySettings) : base(codeConfiguration, description, environmentId, environmentVariables, properties, serializedAdditionalRawData) + /// Provisioning state for the endpoint deployment. + internal MachineLearningBatchDeploymentProperties(string description, IDictionary properties, MachineLearningCodeConfiguration codeConfiguration, string environmentId, IDictionary environmentVariables, IDictionary serializedAdditionalRawData, string compute, BatchDeploymentConfiguration deploymentConfiguration, int? errorThreshold, MachineLearningBatchRetrySettings retrySettings, long? miniBatchSize, MachineLearningBatchLoggingLevel? loggingLevel, MachineLearningAssetReferenceBase model, int? maxConcurrencyPerInstance, MachineLearningBatchOutputAction? outputAction, string outputFileName, MachineLearningDeploymentResourceConfiguration resources, MachineLearningDeploymentProvisioningState? provisioningState) : base(description, properties, codeConfiguration, environmentId, environmentVariables, serializedAdditionalRawData) { Compute = compute; DeploymentConfiguration = deploymentConfiguration; ErrorThreshold = errorThreshold; - LoggingLevel = loggingLevel; - MaxConcurrencyPerInstance = maxConcurrencyPerInstance; + RetrySettings = retrySettings; MiniBatchSize = miniBatchSize; + LoggingLevel = loggingLevel; Model = model; + MaxConcurrencyPerInstance = maxConcurrencyPerInstance; OutputAction = outputAction; OutputFileName = outputFileName; - ProvisioningState = provisioningState; Resources = resources; - RetrySettings = retrySettings; + ProvisioningState = provisioningState; } /// Compute target for batch inference operation. @@ -93,37 +93,37 @@ internal MachineLearningBatchDeploymentProperties(MachineLearningCodeConfigurati /// If set to -1 (the lower bound), all failures during batch inference will be ignored. /// public int? ErrorThreshold { get; set; } - /// Logging level for batch inference operation. - public MachineLearningBatchLoggingLevel? LoggingLevel { get; set; } - /// Indicates maximum number of parallelism per instance. - public int? MaxConcurrencyPerInstance { get; set; } + /// + /// Retry Settings for the batch inference operation. + /// If not provided, will default to the defaults defined in BatchRetrySettings. + /// + public MachineLearningBatchRetrySettings RetrySettings { get; set; } /// /// Size of the mini-batch passed to each batch invocation. /// For FileDataset, this is the number of files per mini-batch. /// For TabularDataset, this is the size of the records in bytes, per mini-batch. /// public long? MiniBatchSize { get; set; } + /// Logging level for batch inference operation. + public MachineLearningBatchLoggingLevel? LoggingLevel { get; set; } /// /// Reference to the model asset for the endpoint deployment. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// public MachineLearningAssetReferenceBase Model { get; set; } + /// Indicates maximum number of parallelism per instance. + public int? MaxConcurrencyPerInstance { get; set; } /// Indicates how the output will be organized. public MachineLearningBatchOutputAction? OutputAction { get; set; } /// Customized output file name for append_row output action. public string OutputFileName { get; set; } - /// Provisioning state for the endpoint deployment. - public MachineLearningDeploymentProvisioningState? ProvisioningState { get; } /// /// Indicates compute configuration for the job. /// If not provided, will default to the defaults defined in ResourceConfiguration. /// public MachineLearningDeploymentResourceConfiguration Resources { get; set; } - /// - /// Retry Settings for the batch inference operation. - /// If not provided, will default to the defaults defined in BatchRetrySettings. - /// - public MachineLearningBatchRetrySettings RetrySettings { get; set; } + /// Provisioning state for the endpoint deployment. + public MachineLearningDeploymentProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchEndpointProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchEndpointProperties.Serialization.cs index 17d27699f19f4..a071f5597d5ab 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchEndpointProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchEndpointProperties.Serialization.cs @@ -43,8 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); } - writer.WritePropertyName("authMode"u8); - writer.WriteStringValue(AuthMode.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -57,18 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteNull("description"); } } - if (Optional.IsDefined(Keys)) - { - if (Keys != null) - { - writer.WritePropertyName("keys"u8); - writer.WriteObjectValue(Keys, options); - } - else - { - writer.WriteNull("keys"); - } - } if (Optional.IsCollectionDefined(Properties)) { if (Properties != null) @@ -111,6 +97,20 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteNull("swaggerUri"); } } + writer.WritePropertyName("authMode"u8); + writer.WriteStringValue(AuthMode.ToString()); + if (Optional.IsDefined(Keys)) + { + if (Keys != null) + { + writer.WritePropertyName("keys"u8); + writer.WriteObjectValue(Keys, options); + } + else + { + writer.WriteNull("keys"); + } + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -151,12 +151,12 @@ internal static MachineLearningBatchEndpointProperties DeserializeMachineLearnin } BatchEndpointDefaults defaults = default; MachineLearningEndpointProvisioningState? provisioningState = default; - MachineLearningEndpointAuthMode authMode = default; string description = default; - MachineLearningEndpointAuthKeys keys = default; IDictionary properties = default; Uri scoringUri = default; Uri swaggerUri = default; + MachineLearningEndpointAuthMode authMode = default; + MachineLearningEndpointAuthKeys keys = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -180,11 +180,6 @@ internal static MachineLearningBatchEndpointProperties DeserializeMachineLearnin provisioningState = new MachineLearningEndpointProvisioningState(property.Value.GetString()); continue; } - if (property.NameEquals("authMode"u8)) - { - authMode = new MachineLearningEndpointAuthMode(property.Value.GetString()); - continue; - } if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -195,16 +190,6 @@ internal static MachineLearningBatchEndpointProperties DeserializeMachineLearnin description = property.Value.GetString(); continue; } - if (property.NameEquals("keys"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - keys = null; - continue; - } - keys = MachineLearningEndpointAuthKeys.DeserializeMachineLearningEndpointAuthKeys(property.Value, options); - continue; - } if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -240,6 +225,21 @@ internal static MachineLearningBatchEndpointProperties DeserializeMachineLearnin swaggerUri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("authMode"u8)) + { + authMode = new MachineLearningEndpointAuthMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("keys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + keys = null; + continue; + } + keys = MachineLearningEndpointAuthKeys.DeserializeMachineLearningEndpointAuthKeys(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -247,12 +247,12 @@ internal static MachineLearningBatchEndpointProperties DeserializeMachineLearnin } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningBatchEndpointProperties( - authMode, description, - keys, properties ?? new ChangeTrackingDictionary(), scoringUri, swaggerUri, + authMode, + keys, serializedAdditionalRawData, defaults, provisioningState); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchEndpointProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchEndpointProperties.cs index 8040746d7f0eb..6ba39731cbec1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchEndpointProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchEndpointProperties.cs @@ -20,19 +20,19 @@ public MachineLearningBatchEndpointProperties(MachineLearningEndpointAuthMode au } /// Initializes a new instance of . - /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. /// Description of the inference endpoint. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Endpoint URI. + /// Endpoint Swagger URI. + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. /// /// EndpointAuthKeys to set initially on an Endpoint. /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. /// - /// Property dictionary. Properties can be added, but not removed or altered. - /// Endpoint URI. - /// Endpoint Swagger URI. /// Keeps track of any properties unknown to the library. /// Default values for Batch Endpoint. /// Provisioning state for the endpoint. - internal MachineLearningBatchEndpointProperties(MachineLearningEndpointAuthMode authMode, string description, MachineLearningEndpointAuthKeys keys, IDictionary properties, Uri scoringUri, Uri swaggerUri, IDictionary serializedAdditionalRawData, BatchEndpointDefaults defaults, MachineLearningEndpointProvisioningState? provisioningState) : base(authMode, description, keys, properties, scoringUri, swaggerUri, serializedAdditionalRawData) + internal MachineLearningBatchEndpointProperties(string description, IDictionary properties, Uri scoringUri, Uri swaggerUri, MachineLearningEndpointAuthMode authMode, MachineLearningEndpointAuthKeys keys, IDictionary serializedAdditionalRawData, BatchEndpointDefaults defaults, MachineLearningEndpointProvisioningState? provisioningState) : base(description, properties, scoringUri, swaggerUri, authMode, keys, serializedAdditionalRawData) { Defaults = defaults; ProvisioningState = provisioningState; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreCredentials.Serialization.cs index bd832c339a6b6..6b81ac5c039ec 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreCredentials.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreCredentials.Serialization.cs @@ -38,8 +38,6 @@ void IJsonModel.Write(Utf8JsonWr writer.WriteNull("authorityUrl"); } } - writer.WritePropertyName("clientId"u8); - writer.WriteStringValue(ClientId); if (Optional.IsDefined(ResourceUri)) { if (ResourceUri != null) @@ -52,12 +50,14 @@ void IJsonModel.Write(Utf8JsonWr writer.WriteNull("resourceUrl"); } } - writer.WritePropertyName("secrets"u8); - writer.WriteObjectValue(Secrets, options); writer.WritePropertyName("tenantId"u8); writer.WriteStringValue(TenantId); + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); writer.WritePropertyName("thumbprint"u8); writer.WriteStringValue(Thumbprint); + writer.WritePropertyName("secrets"u8); + writer.WriteObjectValue(Secrets, options); writer.WritePropertyName("credentialsType"u8); writer.WriteStringValue(CredentialsType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -99,11 +99,11 @@ internal static MachineLearningCertificateDatastoreCredentials DeserializeMachin return null; } Uri authorityUrl = default; - Guid clientId = default; Uri resourceUrl = default; - MachineLearningCertificateDatastoreSecrets secrets = default; Guid tenantId = default; + Guid clientId = default; string thumbprint = default; + MachineLearningCertificateDatastoreSecrets secrets = default; CredentialsType credentialsType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -119,11 +119,6 @@ internal static MachineLearningCertificateDatastoreCredentials DeserializeMachin authorityUrl = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("clientId"u8)) - { - clientId = property.Value.GetGuid(); - continue; - } if (property.NameEquals("resourceUrl"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -134,14 +129,14 @@ internal static MachineLearningCertificateDatastoreCredentials DeserializeMachin resourceUrl = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("secrets"u8)) + if (property.NameEquals("tenantId"u8)) { - secrets = MachineLearningCertificateDatastoreSecrets.DeserializeMachineLearningCertificateDatastoreSecrets(property.Value, options); + tenantId = property.Value.GetGuid(); continue; } - if (property.NameEquals("tenantId"u8)) + if (property.NameEquals("clientId"u8)) { - tenantId = property.Value.GetGuid(); + clientId = property.Value.GetGuid(); continue; } if (property.NameEquals("thumbprint"u8)) @@ -149,6 +144,11 @@ internal static MachineLearningCertificateDatastoreCredentials DeserializeMachin thumbprint = property.Value.GetString(); continue; } + if (property.NameEquals("secrets"u8)) + { + secrets = MachineLearningCertificateDatastoreSecrets.DeserializeMachineLearningCertificateDatastoreSecrets(property.Value, options); + continue; + } if (property.NameEquals("credentialsType"u8)) { credentialsType = new CredentialsType(property.Value.GetString()); @@ -164,11 +164,11 @@ internal static MachineLearningCertificateDatastoreCredentials DeserializeMachin credentialsType, serializedAdditionalRawData, authorityUrl, - clientId, resourceUrl, - secrets, tenantId, - thumbprint); + clientId, + thumbprint, + secrets); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreCredentials.cs index 5ef06bcffa09e..93fbc1dc5d608 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreCredentials.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreCredentials.cs @@ -14,20 +14,20 @@ namespace Azure.ResourceManager.MachineLearning.Models public partial class MachineLearningCertificateDatastoreCredentials : MachineLearningDatastoreCredentials { /// Initializes a new instance of . - /// [Required] Service principal client ID. - /// [Required] Service principal secrets. /// [Required] ID of the tenant to which the service principal belongs. + /// [Required] Service principal client ID. /// [Required] Thumbprint of the certificate used for authentication. - /// or is null. - public MachineLearningCertificateDatastoreCredentials(Guid clientId, MachineLearningCertificateDatastoreSecrets secrets, Guid tenantId, string thumbprint) + /// [Required] Service principal secrets. + /// or is null. + public MachineLearningCertificateDatastoreCredentials(Guid tenantId, Guid clientId, string thumbprint, MachineLearningCertificateDatastoreSecrets secrets) { - Argument.AssertNotNull(secrets, nameof(secrets)); Argument.AssertNotNull(thumbprint, nameof(thumbprint)); + Argument.AssertNotNull(secrets, nameof(secrets)); - ClientId = clientId; - Secrets = secrets; TenantId = tenantId; + ClientId = clientId; Thumbprint = thumbprint; + Secrets = secrets; CredentialsType = CredentialsType.Certificate; } @@ -35,19 +35,19 @@ public MachineLearningCertificateDatastoreCredentials(Guid clientId, MachineLear /// [Required] Credential type used to authentication with storage. /// Keeps track of any properties unknown to the library. /// Authority URL used for authentication. - /// [Required] Service principal client ID. /// Resource the service principal has access to. - /// [Required] Service principal secrets. /// [Required] ID of the tenant to which the service principal belongs. + /// [Required] Service principal client ID. /// [Required] Thumbprint of the certificate used for authentication. - internal MachineLearningCertificateDatastoreCredentials(CredentialsType credentialsType, IDictionary serializedAdditionalRawData, Uri authorityUri, Guid clientId, Uri resourceUri, MachineLearningCertificateDatastoreSecrets secrets, Guid tenantId, string thumbprint) : base(credentialsType, serializedAdditionalRawData) + /// [Required] Service principal secrets. + internal MachineLearningCertificateDatastoreCredentials(CredentialsType credentialsType, IDictionary serializedAdditionalRawData, Uri authorityUri, Uri resourceUri, Guid tenantId, Guid clientId, string thumbprint, MachineLearningCertificateDatastoreSecrets secrets) : base(credentialsType, serializedAdditionalRawData) { AuthorityUri = authorityUri; - ClientId = clientId; ResourceUri = resourceUri; - Secrets = secrets; TenantId = tenantId; + ClientId = clientId; Thumbprint = thumbprint; + Secrets = secrets; CredentialsType = credentialsType; } @@ -58,15 +58,15 @@ internal MachineLearningCertificateDatastoreCredentials() /// Authority URL used for authentication. public Uri AuthorityUri { get; set; } - /// [Required] Service principal client ID. - public Guid ClientId { get; set; } /// Resource the service principal has access to. public Uri ResourceUri { get; set; } - /// [Required] Service principal secrets. - public MachineLearningCertificateDatastoreSecrets Secrets { get; set; } /// [Required] ID of the tenant to which the service principal belongs. public Guid TenantId { get; set; } + /// [Required] Service principal client ID. + public Guid ClientId { get; set; } /// [Required] Thumbprint of the certificate used for authentication. public string Thumbprint { get; set; } + /// [Required] Service principal secrets. + public MachineLearningCertificateDatastoreSecrets Secrets { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.cs index e2be0fb307247..b37643055af79 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Identity object used for encryption. + /// Identity that will be used to access key vault for encryption at rest. internal partial class MachineLearningCmkIdentity { /// @@ -52,7 +52,7 @@ public MachineLearningCmkIdentity() } /// Initializes a new instance of . - /// UserAssignedIdentity to be used to fetch the encryption key from keyVault. + /// The ArmId of the user assigned identity that will be used to access the customer managed key vault. /// Keeps track of any properties unknown to the library. internal MachineLearningCmkIdentity(ResourceIdentifier userAssignedIdentity, IDictionary serializedAdditionalRawData) { @@ -60,7 +60,7 @@ internal MachineLearningCmkIdentity(ResourceIdentifier userAssignedIdentity, IDi _serializedAdditionalRawData = serializedAdditionalRawData; } - /// UserAssignedIdentity to be used to fetch the encryption key from keyVault. + /// The ArmId of the user assigned identity that will be used to access the customer managed key vault. public ResourceIdentifier UserAssignedIdentity { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.Serialization.cs index 92e593196323f..c42c5032b987c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.Serialization.cs @@ -72,13 +72,13 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -87,16 +87,16 @@ void IJsonModel.Write(Utf8JsonWriter wri } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -105,7 +105,7 @@ void IJsonModel.Write(Utf8JsonWriter wri } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -151,8 +151,8 @@ internal static MachineLearningCodeContainerProperties DeserializeMachineLearnin string latestVersion = default; string nextVersion = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -205,11 +205,11 @@ internal static MachineLearningCodeContainerProperties DeserializeMachineLearnin description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -217,14 +217,14 @@ internal static MachineLearningCodeContainerProperties DeserializeMachineLearnin { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -232,7 +232,7 @@ internal static MachineLearningCodeContainerProperties DeserializeMachineLearnin { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -243,8 +243,8 @@ internal static MachineLearningCodeContainerProperties DeserializeMachineLearnin serializedAdditionalRawData = rawDataDictionary; return new MachineLearningCodeContainerProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, isArchived, latestVersion, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.cs index 9695d81723a47..cb2f47e838495 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.cs @@ -20,14 +20,14 @@ public MachineLearningCodeContainerProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. /// Provisioning state for the code container. - internal MachineLearningCodeContainerProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) + internal MachineLearningCodeContainerProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, tags, properties, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) { ProvisioningState = provisioningState; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.Serialization.cs index 1bc9927fd9ff4..016c141e7975a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.Serialization.cs @@ -43,16 +43,16 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); } - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"u8); - writer.WriteBooleanValue(IsAnonymous.Value); - } if (Optional.IsDefined(IsArchived)) { writer.WritePropertyName("isArchived"u8); writer.WriteBooleanValue(IsArchived.Value); } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -65,13 +65,13 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -80,16 +80,16 @@ void IJsonModel.Write(Utf8JsonWriter write } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -98,7 +98,7 @@ void IJsonModel.Write(Utf8JsonWriter write } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -141,11 +141,11 @@ internal static MachineLearningCodeVersionProperties DeserializeMachineLearningC } Uri codeUri = default; RegistryAssetProvisioningState? provisioningState = default; - bool? isAnonymous = default; bool? isArchived = default; + bool? isAnonymous = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -169,22 +169,22 @@ internal static MachineLearningCodeVersionProperties DeserializeMachineLearningC provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); continue; } - if (property.NameEquals("isAnonymous"u8)) + if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isAnonymous = property.Value.GetBoolean(); + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isArchived = property.Value.GetBoolean(); + isAnonymous = property.Value.GetBoolean(); continue; } if (property.NameEquals("description"u8)) @@ -197,11 +197,11 @@ internal static MachineLearningCodeVersionProperties DeserializeMachineLearningC description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -209,14 +209,14 @@ internal static MachineLearningCodeVersionProperties DeserializeMachineLearningC { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -224,7 +224,7 @@ internal static MachineLearningCodeVersionProperties DeserializeMachineLearningC { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -235,11 +235,11 @@ internal static MachineLearningCodeVersionProperties DeserializeMachineLearningC serializedAdditionalRawData = rawDataDictionary; return new MachineLearningCodeVersionProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - isAnonymous, isArchived, + isAnonymous, codeUri, provisioningState); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.cs index 7699b04ba1306..90662eb43160f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.cs @@ -20,14 +20,14 @@ public MachineLearningCodeVersionProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// If the name version are system generated (anonymous registration). /// Is the asset archived?. + /// If the name version are system generated (anonymous registration). /// Uri where code is located. /// Provisioning state for the code version. - internal MachineLearningCodeVersionProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isAnonymous, bool? isArchived, Uri codeUri, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, serializedAdditionalRawData, isAnonymous, isArchived) + internal MachineLearningCodeVersionProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, bool? isAnonymous, Uri codeUri, RegistryAssetProvisioningState? provisioningState) : base(description, tags, properties, serializedAdditionalRawData, isArchived, isAnonymous) { CodeUri = codeUri; ProvisioningState = provisioningState; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.Serialization.cs index 658beadf1bf28..fbc70941ed784 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.Serialization.cs @@ -26,6 +26,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteStartObject(); + if (Optional.IsDefined(Resources)) + { + writer.WritePropertyName("resources"u8); + writer.WriteObjectValue(Resources, options); + } if (Optional.IsDefined(CodeId)) { if (CodeId != null) @@ -40,45 +45,33 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WritePropertyName("command"u8); writer.WriteStringValue(Command); - if (Optional.IsDefined(Distribution)) - { - if (Distribution != null) - { - writer.WritePropertyName("distribution"u8); - writer.WriteObjectValue(Distribution, options); - } - else - { - writer.WriteNull("distribution"); - } - } writer.WritePropertyName("environmentId"u8); writer.WriteStringValue(EnvironmentId); - if (Optional.IsCollectionDefined(EnvironmentVariables)) + if (Optional.IsCollectionDefined(Inputs)) { - if (EnvironmentVariables != null) + if (Inputs != null) { - writer.WritePropertyName("environmentVariables"u8); + writer.WritePropertyName("inputs"u8); writer.WriteStartObject(); - foreach (var item in EnvironmentVariables) + foreach (var item in Inputs) { writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WriteObjectValue(item.Value, options); } writer.WriteEndObject(); } else { - writer.WriteNull("environmentVariables"); + writer.WriteNull("inputs"); } } - if (Optional.IsCollectionDefined(Inputs)) + if (Optional.IsCollectionDefined(Outputs)) { - if (Inputs != null) + if (Outputs != null) { - writer.WritePropertyName("inputs"u8); + writer.WritePropertyName("outputs"u8); writer.WriteStartObject(); - foreach (var item in Inputs) + foreach (var item in Outputs) { writer.WritePropertyName(item.Key); writer.WriteObjectValue(item.Value, options); @@ -87,7 +80,19 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } else { - writer.WriteNull("inputs"); + writer.WriteNull("outputs"); + } + } + if (Optional.IsDefined(Distribution)) + { + if (Distribution != null) + { + writer.WritePropertyName("distribution"u8); + writer.WriteObjectValue(Distribution, options); + } + else + { + writer.WriteNull("distribution"); } } if (Optional.IsDefined(Limits)) @@ -102,22 +107,22 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNull("limits"); } } - if (Optional.IsCollectionDefined(Outputs)) + if (Optional.IsCollectionDefined(EnvironmentVariables)) { - if (Outputs != null) + if (EnvironmentVariables != null) { - writer.WritePropertyName("outputs"u8); + writer.WritePropertyName("environmentVariables"u8); writer.WriteStartObject(); - foreach (var item in Outputs) + foreach (var item in EnvironmentVariables) { writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); + writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } else { - writer.WriteNull("outputs"); + writer.WriteNull("environmentVariables"); } } if (options.Format != "W" && Optional.IsDefined(Parameters)) @@ -151,51 +156,64 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNull("queueSettings"); } } - if (Optional.IsDefined(Resources)) - { - writer.WritePropertyName("resources"u8); - writer.WriteObjectValue(Resources, options); - } - if (Optional.IsDefined(ComponentId)) + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(DisplayName)) { - if (ComponentId != null) + if (DisplayName != null) { - writer.WritePropertyName("componentId"u8); - writer.WriteStringValue(ComponentId); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); } else { - writer.WriteNull("componentId"); + writer.WriteNull("displayName"); } } - if (Optional.IsDefined(ComputeId)) + if (options.Format != "W" && Optional.IsDefined(Status)) { - if (ComputeId != null) + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + } + if (Optional.IsCollectionDefined(Services)) + { + if (Services != null) { - writer.WritePropertyName("computeId"u8); - writer.WriteStringValue(ComputeId); + writer.WritePropertyName("services"u8); + writer.WriteStartObject(); + foreach (var item in Services) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); } else { - writer.WriteNull("computeId"); + writer.WriteNull("services"); } } - if (Optional.IsDefined(DisplayName)) + if (Optional.IsDefined(ComputeId)) { - if (DisplayName != null) + if (ComputeId != null) { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); + writer.WritePropertyName("computeId"u8); + writer.WriteStringValue(ComputeId); } else { - writer.WriteNull("displayName"); + writer.WriteNull("computeId"); } } - if (Optional.IsDefined(ExperimentName)) + if (Optional.IsDefined(IsArchived)) { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); } if (Optional.IsDefined(Identity)) { @@ -209,48 +227,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNull("identity"); } } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"u8); - writer.WriteBooleanValue(IsArchived.Value); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsDefined(NotificationSetting)) + if (Optional.IsDefined(ComponentId)) { - if (NotificationSetting != null) + if (ComponentId != null) { - writer.WritePropertyName("notificationSetting"u8); - writer.WriteObjectValue(NotificationSetting, options); + writer.WritePropertyName("componentId"u8); + writer.WriteStringValue(ComponentId); } else { - writer.WriteNull("notificationSetting"); + writer.WriteNull("componentId"); } } - if (Optional.IsCollectionDefined(Services)) + if (Optional.IsDefined(NotificationSetting)) { - if (Services != null) + if (NotificationSetting != null) { - writer.WritePropertyName("services"u8); - writer.WriteStartObject(); - foreach (var item in Services) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting, options); } else { - writer.WriteNull("services"); + writer.WriteNull("notificationSetting"); } } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } if (Optional.IsDefined(Description)) { if (Description != null) @@ -263,13 +263,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -278,16 +278,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -296,7 +296,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -337,34 +337,43 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J { return null; } + MachineLearningJobResourceConfiguration resources = default; ResourceIdentifier codeId = default; string command = default; - MachineLearningDistributionConfiguration distribution = default; ResourceIdentifier environmentId = default; - IDictionary environmentVariables = default; IDictionary inputs = default; - MachineLearningCommandJobLimits limits = default; IDictionary outputs = default; + MachineLearningDistributionConfiguration distribution = default; + MachineLearningCommandJobLimits limits = default; + IDictionary environmentVariables = default; BinaryData parameters = default; JobQueueSettings queueSettings = default; - MachineLearningJobResourceConfiguration resources = default; - ResourceIdentifier componentId = default; - ResourceIdentifier computeId = default; + JobType jobType = default; string displayName = default; + MachineLearningJobStatus? status = default; string experimentName = default; - MachineLearningIdentityConfiguration identity = default; + IDictionary services = default; + ResourceIdentifier computeId = default; bool? isArchived = default; - JobType jobType = default; + MachineLearningIdentityConfiguration identity = default; + ResourceIdentifier componentId = default; NotificationSetting notificationSetting = default; - IDictionary services = default; - MachineLearningJobStatus? status = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("resources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resources = MachineLearningJobResourceConfiguration.DeserializeMachineLearningJobResourceConfiguration(property.Value, options); + continue; + } if (property.NameEquals("codeId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -380,49 +389,49 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J command = property.Value.GetString(); continue; } - if (property.NameEquals("distribution"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - distribution = null; - continue; - } - distribution = MachineLearningDistributionConfiguration.DeserializeMachineLearningDistributionConfiguration(property.Value, options); - continue; - } if (property.NameEquals("environmentId"u8)) { environmentId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("environmentVariables"u8)) + if (property.NameEquals("inputs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - environmentVariables = null; + inputs = null; continue; } - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + dictionary.Add(property0.Name, MachineLearningJobInput.DeserializeMachineLearningJobInput(property0.Value, options)); } - environmentVariables = dictionary; + inputs = dictionary; continue; } - if (property.NameEquals("inputs"u8)) + if (property.NameEquals("outputs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - inputs = null; + outputs = null; continue; } - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { - dictionary.Add(property0.Name, MachineLearningJobInput.DeserializeMachineLearningJobInput(property0.Value, options)); + dictionary.Add(property0.Name, MachineLearningJobOutput.DeserializeMachineLearningJobOutput(property0.Value, options)); } - inputs = dictionary; + outputs = dictionary; + continue; + } + if (property.NameEquals("distribution"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + distribution = null; + continue; + } + distribution = MachineLearningDistributionConfiguration.DeserializeMachineLearningDistributionConfiguration(property.Value, options); continue; } if (property.NameEquals("limits"u8)) @@ -435,19 +444,19 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J limits = MachineLearningCommandJobLimits.DeserializeMachineLearningCommandJobLimits(property.Value, options); continue; } - if (property.NameEquals("outputs"u8)) + if (property.NameEquals("environmentVariables"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - outputs = null; + environmentVariables = null; continue; } - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { - dictionary.Add(property0.Name, MachineLearningJobOutput.DeserializeMachineLearningJobOutput(property0.Value, options)); + dictionary.Add(property0.Name, property0.Value.GetString()); } - outputs = dictionary; + environmentVariables = dictionary; continue; } if (property.NameEquals("parameters"u8)) @@ -470,58 +479,58 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J queueSettings = JobQueueSettings.DeserializeJobQueueSettings(property.Value, options); continue; } - if (property.NameEquals("resources"u8)) + if (property.NameEquals("jobType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - resources = MachineLearningJobResourceConfiguration.DeserializeMachineLearningJobResourceConfiguration(property.Value, options); + jobType = new JobType(property.Value.GetString()); continue; } - if (property.NameEquals("componentId"u8)) + if (property.NameEquals("displayName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - componentId = null; + displayName = null; continue; } - componentId = new ResourceIdentifier(property.Value.GetString()); + displayName = property.Value.GetString(); continue; } - if (property.NameEquals("computeId"u8)) + if (property.NameEquals("status"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - computeId = null; continue; } - computeId = new ResourceIdentifier(property.Value.GetString()); + status = new MachineLearningJobStatus(property.Value.GetString()); continue; } - if (property.NameEquals("displayName"u8)) + if (property.NameEquals("experimentName"u8)) + { + experimentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("services"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - displayName = null; + services = null; continue; } - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("experimentName"u8)) - { - experimentName = property.Value.GetString(); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value, options)); + } + services = dictionary; continue; } - if (property.NameEquals("identity"u8)) + if (property.NameEquals("computeId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - identity = null; + computeId = null; continue; } - identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value, options); + computeId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("isArchived"u8)) @@ -533,43 +542,34 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("jobType"u8)) - { - jobType = new JobType(property.Value.GetString()); - continue; - } - if (property.NameEquals("notificationSetting"u8)) + if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - notificationSetting = null; + identity = null; continue; } - notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value, options); + identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value, options); continue; } - if (property.NameEquals("services"u8)) + if (property.NameEquals("componentId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - services = null; + componentId = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value, options)); - } - services = dictionary; + componentId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("notificationSetting"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + notificationSetting = null; continue; } - status = new MachineLearningJobStatus(property.Value.GetString()); + notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value, options); continue; } if (property.NameEquals("description"u8)) @@ -582,11 +582,11 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -594,14 +594,14 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -609,7 +609,7 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -620,30 +620,30 @@ internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(J serializedAdditionalRawData = rawDataDictionary; return new MachineLearningCommandJob( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - componentId, - computeId, + jobType, displayName, + status, experimentName, - identity, + services ?? new ChangeTrackingDictionary(), + computeId, isArchived, - jobType, + identity, + componentId, notificationSetting, - services ?? new ChangeTrackingDictionary(), - status, + resources, codeId, command, - distribution, environmentId, - environmentVariables ?? new ChangeTrackingDictionary(), inputs ?? new ChangeTrackingDictionary(), - limits, outputs ?? new ChangeTrackingDictionary(), + distribution, + limits, + environmentVariables ?? new ChangeTrackingDictionary(), parameters, - queueSettings, - resources); + queueSettings); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.cs index a321da1c827da..0e3a205502341 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.cs @@ -25,71 +25,71 @@ public MachineLearningCommandJob(string command, ResourceIdentifier environmentI Command = command; EnvironmentId = environmentId; - EnvironmentVariables = new ChangeTrackingDictionary(); Inputs = new ChangeTrackingDictionary(); Outputs = new ChangeTrackingDictionary(); + EnvironmentVariables = new ChangeTrackingDictionary(); JobType = JobType.Command; } /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. + /// [Required] Specifies the type of job. /// Display name of job. + /// Status of the job. /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// ARM resource ID of the compute resource. + /// Is the asset archived?. /// /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. /// Defaults to AmlToken if null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// Is the asset archived?. - /// [Required] Specifies the type of job. + /// ARM resource ID of the component resource. /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. + /// Compute Resource configuration for the job. /// ARM resource ID of the code asset. /// [Required] The command to execute on startup of the job. eg. "python train.py". - /// - /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// /// [Required] The ARM resource ID of the Environment specification for the job. - /// Environment variables included in the job. /// /// Mapping of input data bindings used in the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , , and . /// - /// Command Job limit. /// /// Mapping of output data bindings used in the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , and . /// + /// + /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Command Job limit. + /// Environment variables included in the job. /// Input parameters. /// Queue settings for the job. - /// Compute Resource configuration for the job. - internal MachineLearningCommandJob(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary services, MachineLearningJobStatus? status, ResourceIdentifier codeId, string command, MachineLearningDistributionConfiguration distribution, ResourceIdentifier environmentId, IDictionary environmentVariables, IDictionary inputs, MachineLearningCommandJobLimits limits, IDictionary outputs, BinaryData parameters, JobQueueSettings queueSettings, MachineLearningJobResourceConfiguration resources) : base(description, properties, tags, serializedAdditionalRawData, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, services, status) + internal MachineLearningCommandJob(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, JobType jobType, string displayName, MachineLearningJobStatus? status, string experimentName, IDictionary services, ResourceIdentifier computeId, bool? isArchived, MachineLearningIdentityConfiguration identity, ResourceIdentifier componentId, NotificationSetting notificationSetting, MachineLearningJobResourceConfiguration resources, ResourceIdentifier codeId, string command, ResourceIdentifier environmentId, IDictionary inputs, IDictionary outputs, MachineLearningDistributionConfiguration distribution, MachineLearningCommandJobLimits limits, IDictionary environmentVariables, BinaryData parameters, JobQueueSettings queueSettings) : base(description, tags, properties, serializedAdditionalRawData, jobType, displayName, status, experimentName, services, computeId, isArchived, identity, componentId, notificationSetting) { + Resources = resources; CodeId = codeId; Command = command; - Distribution = distribution; EnvironmentId = environmentId; - EnvironmentVariables = environmentVariables; Inputs = inputs; - Limits = limits; Outputs = outputs; + Distribution = distribution; + Limits = limits; + EnvironmentVariables = environmentVariables; Parameters = parameters; QueueSettings = queueSettings; - Resources = resources; JobType = jobType; } @@ -98,28 +98,20 @@ internal MachineLearningCommandJob() { } + /// Compute Resource configuration for the job. + public MachineLearningJobResourceConfiguration Resources { get; set; } /// ARM resource ID of the code asset. public ResourceIdentifier CodeId { get; set; } /// [Required] The command to execute on startup of the job. eg. "python train.py". public string Command { get; set; } - /// - /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public MachineLearningDistributionConfiguration Distribution { get; set; } /// [Required] The ARM resource ID of the Environment specification for the job. public ResourceIdentifier EnvironmentId { get; set; } - /// Environment variables included in the job. - public IDictionary EnvironmentVariables { get; set; } /// /// Mapping of input data bindings used in the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , , and . /// public IDictionary Inputs { get; set; } - /// Command Job limit. - public MachineLearningCommandJobLimits Limits { get; set; } /// /// Mapping of output data bindings used in the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -127,6 +119,16 @@ internal MachineLearningCommandJob() /// public IDictionary Outputs { get; set; } /// + /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MachineLearningDistributionConfiguration Distribution { get; set; } + /// Command Job limit. + public MachineLearningCommandJobLimits Limits { get; set; } + /// Environment variables included in the job. + public IDictionary EnvironmentVariables { get; set; } + /// /// Input parameters. /// /// To assign an object to this property use . @@ -170,8 +172,5 @@ public JobTier? QueueJobTier QueueSettings.JobTier = value; } } - - /// Compute Resource configuration for the job. - public MachineLearningJobResourceConfiguration Resources { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.Serialization.cs index a20ba6f370090..02918e76f83ea 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.Serialization.cs @@ -72,13 +72,13 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -87,16 +87,16 @@ void IJsonModel.Write(Utf8JsonWrite } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -105,7 +105,7 @@ void IJsonModel.Write(Utf8JsonWrite } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -151,8 +151,8 @@ internal static MachineLearningComponentContainerProperties DeserializeMachineLe string latestVersion = default; string nextVersion = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -205,11 +205,11 @@ internal static MachineLearningComponentContainerProperties DeserializeMachineLe description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -217,14 +217,14 @@ internal static MachineLearningComponentContainerProperties DeserializeMachineLe { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -232,7 +232,7 @@ internal static MachineLearningComponentContainerProperties DeserializeMachineLe { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -243,8 +243,8 @@ internal static MachineLearningComponentContainerProperties DeserializeMachineLe serializedAdditionalRawData = rawDataDictionary; return new MachineLearningComponentContainerProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, isArchived, latestVersion, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.cs index d6fdc24bbb719..30cce8e343c87 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.cs @@ -23,14 +23,14 @@ public MachineLearningComponentContainerProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. /// Provisioning state for the component container. - internal MachineLearningComponentContainerProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) + internal MachineLearningComponentContainerProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, tags, properties, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) { ProvisioningState = provisioningState; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.Serialization.cs index 5e4f6c925edf8..4fc64f81073e1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.Serialization.cs @@ -50,16 +50,16 @@ void IJsonModel.Write(Utf8JsonWriter writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); } - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"u8); - writer.WriteBooleanValue(IsAnonymous.Value); - } if (Optional.IsDefined(IsArchived)) { writer.WritePropertyName("isArchived"u8); writer.WriteBooleanValue(IsArchived.Value); } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -72,13 +72,13 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -87,16 +87,16 @@ void IJsonModel.Write(Utf8JsonWriter } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -105,7 +105,7 @@ void IJsonModel.Write(Utf8JsonWriter } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -148,11 +148,11 @@ internal static MachineLearningComponentVersionProperties DeserializeMachineLear } BinaryData componentSpec = default; RegistryAssetProvisioningState? provisioningState = default; - bool? isAnonymous = default; bool? isArchived = default; + bool? isAnonymous = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -176,22 +176,22 @@ internal static MachineLearningComponentVersionProperties DeserializeMachineLear provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); continue; } - if (property.NameEquals("isAnonymous"u8)) + if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isAnonymous = property.Value.GetBoolean(); + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isArchived = property.Value.GetBoolean(); + isAnonymous = property.Value.GetBoolean(); continue; } if (property.NameEquals("description"u8)) @@ -204,11 +204,11 @@ internal static MachineLearningComponentVersionProperties DeserializeMachineLear description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -216,14 +216,14 @@ internal static MachineLearningComponentVersionProperties DeserializeMachineLear { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -231,7 +231,7 @@ internal static MachineLearningComponentVersionProperties DeserializeMachineLear { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -242,11 +242,11 @@ internal static MachineLearningComponentVersionProperties DeserializeMachineLear serializedAdditionalRawData = rawDataDictionary; return new MachineLearningComponentVersionProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - isAnonymous, isArchived, + isAnonymous, componentSpec, provisioningState); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.cs index 56437e718d34e..deeb50d96153b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.cs @@ -20,17 +20,17 @@ public MachineLearningComponentVersionProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// If the name version are system generated (anonymous registration). /// Is the asset archived?. + /// If the name version are system generated (anonymous registration). /// /// Defines Component definition details. /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" /> /// /// Provisioning state for the component version. - internal MachineLearningComponentVersionProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isAnonymous, bool? isArchived, BinaryData componentSpec, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, serializedAdditionalRawData, isAnonymous, isArchived) + internal MachineLearningComponentVersionProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, bool? isAnonymous, BinaryData componentSpec, RegistryAssetProvisioningState? provisioningState) : base(description, tags, properties, serializedAdditionalRawData, isArchived, isAnonymous) { ComponentSpec = componentSpec; ProvisioningState = provisioningState; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataMount.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataMount.Serialization.cs index a7b48637fc36c..e0328ddb0c164 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataMount.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataMount.Serialization.cs @@ -46,11 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WritePropertyName("mountAction"u8); writer.WriteStringValue(MountAction.Value.ToString()); } - if (Optional.IsDefined(MountMode)) - { - writer.WritePropertyName("mountMode"u8); - writer.WriteStringValue(MountMode.Value.ToString()); - } if (Optional.IsDefined(CreatedBy)) { writer.WritePropertyName("createdBy"u8); @@ -118,7 +113,6 @@ internal static MachineLearningComputeInstanceDataMount DeserializeMachineLearni MachineLearningSourceType? sourceType = default; string mountName = default; MachineLearningMountAction? mountAction = default; - MountMode? mountMode = default; string createdBy = default; string mountPath = default; MachineLearningMountState? mountState = default; @@ -156,15 +150,6 @@ internal static MachineLearningComputeInstanceDataMount DeserializeMachineLearni mountAction = new MachineLearningMountAction(property.Value.GetString()); continue; } - if (property.NameEquals("mountMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - mountMode = new MountMode(property.Value.GetString()); - continue; - } if (property.NameEquals("createdBy"u8)) { createdBy = property.Value.GetString(); @@ -209,7 +194,6 @@ internal static MachineLearningComputeInstanceDataMount DeserializeMachineLearni sourceType, mountName, mountAction, - mountMode, createdBy, mountPath, mountState, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataMount.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataMount.cs index bed98f0652e2c..0810ecad2bbd0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataMount.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataMount.cs @@ -46,7 +46,7 @@ public partial class MachineLearningComputeInstanceDataMount private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public MachineLearningComputeInstanceDataMount() + internal MachineLearningComputeInstanceDataMount() { } @@ -55,20 +55,18 @@ public MachineLearningComputeInstanceDataMount() /// Data source type. /// name of the ComputeInstance data mount. /// Mount Action. - /// Mount Mode. /// who this data mount created by. /// Path of this data mount. /// Mount state. /// The time when the disk mounted. /// Error of this data mount. /// Keeps track of any properties unknown to the library. - internal MachineLearningComputeInstanceDataMount(string source, MachineLearningSourceType? sourceType, string mountName, MachineLearningMountAction? mountAction, MountMode? mountMode, string createdBy, string mountPath, MachineLearningMountState? mountState, DateTimeOffset? mountedOn, string error, IDictionary serializedAdditionalRawData) + internal MachineLearningComputeInstanceDataMount(string source, MachineLearningSourceType? sourceType, string mountName, MachineLearningMountAction? mountAction, string createdBy, string mountPath, MachineLearningMountState? mountState, DateTimeOffset? mountedOn, string error, IDictionary serializedAdditionalRawData) { Source = source; SourceType = sourceType; MountName = mountName; MountAction = mountAction; - MountMode = mountMode; CreatedBy = createdBy; MountPath = mountPath; MountState = mountState; @@ -78,24 +76,22 @@ internal MachineLearningComputeInstanceDataMount(string source, MachineLearningS } /// Source of the ComputeInstance data mount. - public string Source { get; set; } + public string Source { get; } /// Data source type. - public MachineLearningSourceType? SourceType { get; set; } + public MachineLearningSourceType? SourceType { get; } /// name of the ComputeInstance data mount. - public string MountName { get; set; } + public string MountName { get; } /// Mount Action. - public MachineLearningMountAction? MountAction { get; set; } - /// Mount Mode. - public MountMode? MountMode { get; set; } + public MachineLearningMountAction? MountAction { get; } /// who this data mount created by. - public string CreatedBy { get; set; } + public string CreatedBy { get; } /// Path of this data mount. - public string MountPath { get; set; } + public string MountPath { get; } /// Mount state. - public MachineLearningMountState? MountState { get; set; } + public MachineLearningMountState? MountState { get; } /// The time when the disk mounted. - public DateTimeOffset? MountedOn { get; set; } + public DateTimeOffset? MountedOn { get; } /// Error of this data mount. - public string Error { get; set; } + public string Error { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.Serialization.cs index 42dd75d59021c..7904fc4d70d61 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.Serialization.cs @@ -48,18 +48,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WritePropertyName("applicationSharingPolicy"u8); writer.WriteStringValue(ApplicationSharingPolicy.Value.ToString()); } - if (Optional.IsDefined(AutologgerSettings)) - { - if (AutologgerSettings != null) - { - writer.WritePropertyName("autologgerSettings"u8); - writer.WriteObjectValue(AutologgerSettings, options); - } - else - { - writer.WriteNull("autologgerSettings"); - } - } if (Optional.IsDefined(SshSettings)) { if (SshSettings != null) @@ -141,54 +129,6 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteNull("computeInstanceAuthorizationType"); } } - if (Optional.IsDefined(EnableOSPatching)) - { - if (EnableOSPatching != null) - { - writer.WritePropertyName("enableOSPatching"u8); - writer.WriteBooleanValue(EnableOSPatching.Value); - } - else - { - writer.WriteNull("enableOSPatching"); - } - } - if (Optional.IsDefined(EnableRootAccess)) - { - if (EnableRootAccess != null) - { - writer.WritePropertyName("enableRootAccess"u8); - writer.WriteBooleanValue(EnableRootAccess.Value); - } - else - { - writer.WriteNull("enableRootAccess"); - } - } - if (Optional.IsDefined(EnableSso)) - { - if (EnableSso != null) - { - writer.WritePropertyName("enableSSO"u8); - writer.WriteBooleanValue(EnableSso.Value); - } - else - { - writer.WriteNull("enableSSO"); - } - } - if (Optional.IsDefined(ReleaseQuotaOnStop)) - { - if (ReleaseQuotaOnStop != null) - { - writer.WritePropertyName("releaseQuotaOnStop"u8); - writer.WriteBooleanValue(ReleaseQuotaOnStop.Value); - } - else - { - writer.WriteNull("releaseQuotaOnStop"); - } - } if (Optional.IsDefined(PersonalComputeInstanceSettings)) { if (PersonalComputeInstanceSettings != null) @@ -237,22 +177,10 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteNull("schedules"); } } - if (Optional.IsDefined(IdleTimeBeforeShutdown)) - { - writer.WritePropertyName("idleTimeBeforeShutdown"u8); - writer.WriteStringValue(IdleTimeBeforeShutdown); - } if (Optional.IsDefined(EnableNodePublicIP)) { - if (EnableNodePublicIP != null) - { - writer.WritePropertyName("enableNodePublicIp"u8); - writer.WriteBooleanValue(EnableNodePublicIP.Value); - } - else - { - writer.WriteNull("enableNodePublicIp"); - } + writer.WritePropertyName("enableNodePublicIp"u8); + writer.WriteBooleanValue(EnableNodePublicIP.Value); } if (options.Format != "W" && Optional.IsCollectionDefined(Containers)) { @@ -351,7 +279,6 @@ internal static MachineLearningComputeInstanceProperties DeserializeMachineLearn string vmSize = default; ResourceId subnet = default; MachineLearningApplicationSharingPolicy? applicationSharingPolicy = default; - ComputeInstanceAutologgerSettings autologgerSettings = default; MachineLearningComputeInstanceSshSettings sshSettings = default; IList customServices = default; ImageMetadata osImageMetadata = default; @@ -361,15 +288,10 @@ internal static MachineLearningComputeInstanceProperties DeserializeMachineLearn IReadOnlyList errors = default; MachineLearningComputeInstanceState? state = default; MachineLearningComputeInstanceAuthorizationType? computeInstanceAuthorizationType = default; - bool? enableOSPatching = default; - bool? enableRootAccess = default; - bool? enableSso = default; - bool? releaseQuotaOnStop = default; PersonalComputeInstanceSettings personalComputeInstanceSettings = default; SetupScripts setupScripts = default; MachineLearningComputeInstanceLastOperation lastOperation = default; ComputeSchedules schedules = default; - string idleTimeBeforeShutdown = default; bool? enableNodePublicIP = default; IReadOnlyList containers = default; IReadOnlyList dataDisks = default; @@ -403,16 +325,6 @@ internal static MachineLearningComputeInstanceProperties DeserializeMachineLearn applicationSharingPolicy = new MachineLearningApplicationSharingPolicy(property.Value.GetString()); continue; } - if (property.NameEquals("autologgerSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - autologgerSettings = null; - continue; - } - autologgerSettings = ComputeInstanceAutologgerSettings.DeserializeComputeInstanceAutologgerSettings(property.Value, options); - continue; - } if (property.NameEquals("sshSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -512,46 +424,6 @@ internal static MachineLearningComputeInstanceProperties DeserializeMachineLearn computeInstanceAuthorizationType = new MachineLearningComputeInstanceAuthorizationType(property.Value.GetString()); continue; } - if (property.NameEquals("enableOSPatching"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - enableOSPatching = null; - continue; - } - enableOSPatching = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("enableRootAccess"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - enableRootAccess = null; - continue; - } - enableRootAccess = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("enableSSO"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - enableSso = null; - continue; - } - enableSso = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("releaseQuotaOnStop"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - releaseQuotaOnStop = null; - continue; - } - releaseQuotaOnStop = property.Value.GetBoolean(); - continue; - } if (property.NameEquals("personalComputeInstanceSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -592,16 +464,10 @@ internal static MachineLearningComputeInstanceProperties DeserializeMachineLearn schedules = ComputeSchedules.DeserializeComputeSchedules(property.Value, options); continue; } - if (property.NameEquals("idleTimeBeforeShutdown"u8)) - { - idleTimeBeforeShutdown = property.Value.GetString(); - continue; - } if (property.NameEquals("enableNodePublicIp"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - enableNodePublicIP = null; continue; } enableNodePublicIP = property.Value.GetBoolean(); @@ -671,7 +537,6 @@ internal static MachineLearningComputeInstanceProperties DeserializeMachineLearn vmSize, subnet, applicationSharingPolicy, - autologgerSettings, sshSettings, customServices ?? new ChangeTrackingList(), osImageMetadata, @@ -681,15 +546,10 @@ internal static MachineLearningComputeInstanceProperties DeserializeMachineLearn errors ?? new ChangeTrackingList(), state, computeInstanceAuthorizationType, - enableOSPatching, - enableRootAccess, - enableSso, - releaseQuotaOnStop, personalComputeInstanceSettings, setupScripts, lastOperation, schedules, - idleTimeBeforeShutdown, enableNodePublicIP, containers ?? new ChangeTrackingList(), dataDisks ?? new ChangeTrackingList(), diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.cs index dca78aeb8fbe3..37f2f2d77fedd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.cs @@ -61,7 +61,6 @@ public MachineLearningComputeInstanceProperties() /// Virtual Machine Size. /// Virtual network subnet resource ID the compute nodes belong to. /// Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role. - /// Specifies settings for autologger. /// Specifies policy and settings for SSH access. /// List of Custom Services added to the compute. /// Returns metadata about the operating system image for this compute instance. @@ -71,27 +70,21 @@ public MachineLearningComputeInstanceProperties() /// Collection of errors encountered on this ComputeInstance. /// The current state of this ComputeInstance. /// The Compute Instance Authorization type. Available values are personal (default). - /// Enable Auto OS Patching. Possible values are: true, false. - /// Enable root access. Possible values are: true, false. - /// Enable SSO (single sign on). Possible values are: true, false. - /// Release quota if compute instance stopped. Possible values are: true - release quota if compute instance stopped. false - don't release quota when compute instance stopped. /// Settings for a personal compute instance. /// Details of customized scripts to execute for setting up the cluster. /// The last operation on ComputeInstance. /// The list of schedules to be applied on the computes. - /// Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. /// Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs. /// Describes informations of containers on this ComputeInstance. /// Describes informations of dataDisks on this ComputeInstance. /// Describes informations of dataMounts on this ComputeInstance. /// ComputeInstance version. /// Keeps track of any properties unknown to the library. - internal MachineLearningComputeInstanceProperties(string vmSize, ResourceId subnet, MachineLearningApplicationSharingPolicy? applicationSharingPolicy, ComputeInstanceAutologgerSettings autologgerSettings, MachineLearningComputeInstanceSshSettings sshSettings, IList customServices, ImageMetadata osImageMetadata, MachineLearningComputeInstanceConnectivityEndpoints connectivityEndpoints, IReadOnlyList applications, MachineLearningComputeInstanceCreatedBy createdBy, IReadOnlyList errors, MachineLearningComputeInstanceState? state, MachineLearningComputeInstanceAuthorizationType? computeInstanceAuthorizationType, bool? enableOSPatching, bool? enableRootAccess, bool? enableSso, bool? releaseQuotaOnStop, PersonalComputeInstanceSettings personalComputeInstanceSettings, SetupScripts setupScriptsSettings, MachineLearningComputeInstanceLastOperation lastOperation, ComputeSchedules schedules, string idleTimeBeforeShutdown, bool? enableNodePublicIP, IReadOnlyList containers, IReadOnlyList dataDisks, IReadOnlyList dataMounts, ComputeInstanceVersion versions, IDictionary serializedAdditionalRawData) + internal MachineLearningComputeInstanceProperties(string vmSize, ResourceId subnet, MachineLearningApplicationSharingPolicy? applicationSharingPolicy, MachineLearningComputeInstanceSshSettings sshSettings, IList customServices, ImageMetadata osImageMetadata, MachineLearningComputeInstanceConnectivityEndpoints connectivityEndpoints, IReadOnlyList applications, MachineLearningComputeInstanceCreatedBy createdBy, IReadOnlyList errors, MachineLearningComputeInstanceState? state, MachineLearningComputeInstanceAuthorizationType? computeInstanceAuthorizationType, PersonalComputeInstanceSettings personalComputeInstanceSettings, SetupScripts setupScriptsSettings, MachineLearningComputeInstanceLastOperation lastOperation, ComputeSchedules schedules, bool? enableNodePublicIP, IReadOnlyList containers, IReadOnlyList dataDisks, IReadOnlyList dataMounts, ComputeInstanceVersion versions, IDictionary serializedAdditionalRawData) { VmSize = vmSize; Subnet = subnet; ApplicationSharingPolicy = applicationSharingPolicy; - AutologgerSettings = autologgerSettings; SshSettings = sshSettings; CustomServices = customServices; OSImageMetadata = osImageMetadata; @@ -101,15 +94,10 @@ internal MachineLearningComputeInstanceProperties(string vmSize, ResourceId subn Errors = errors; State = state; ComputeInstanceAuthorizationType = computeInstanceAuthorizationType; - EnableOSPatching = enableOSPatching; - EnableRootAccess = enableRootAccess; - EnableSso = enableSso; - ReleaseQuotaOnStop = releaseQuotaOnStop; PersonalComputeInstanceSettings = personalComputeInstanceSettings; SetupScriptsSettings = setupScriptsSettings; LastOperation = lastOperation; Schedules = schedules; - IdleTimeBeforeShutdown = idleTimeBeforeShutdown; EnableNodePublicIP = enableNodePublicIP; Containers = containers; DataDisks = dataDisks; @@ -131,20 +119,6 @@ public ResourceIdentifier SubnetId /// Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role. public MachineLearningApplicationSharingPolicy? ApplicationSharingPolicy { get; set; } - /// Specifies settings for autologger. - internal ComputeInstanceAutologgerSettings AutologgerSettings { get; set; } - /// Indicates whether mlflow autologger is enabled for notebooks. - public MachineLearningFlowAutoLogger? MlflowAutologger - { - get => AutologgerSettings is null ? default : AutologgerSettings.MlflowAutologger; - set - { - if (AutologgerSettings is null) - AutologgerSettings = new ComputeInstanceAutologgerSettings(); - AutologgerSettings.MlflowAutologger = value; - } - } - /// Specifies policy and settings for SSH access. public MachineLearningComputeInstanceSshSettings SshSettings { get; set; } /// List of Custom Services added to the compute. @@ -163,14 +137,6 @@ public MachineLearningFlowAutoLogger? MlflowAutologger public MachineLearningComputeInstanceState? State { get; } /// The Compute Instance Authorization type. Available values are personal (default). public MachineLearningComputeInstanceAuthorizationType? ComputeInstanceAuthorizationType { get; set; } - /// Enable Auto OS Patching. Possible values are: true, false. - public bool? EnableOSPatching { get; set; } - /// Enable root access. Possible values are: true, false. - public bool? EnableRootAccess { get; set; } - /// Enable SSO (single sign on). Possible values are: true, false. - public bool? EnableSso { get; set; } - /// Release quota if compute instance stopped. Possible values are: true - release quota if compute instance stopped. false - don't release quota when compute instance stopped. - public bool? ReleaseQuotaOnStop { get; set; } /// Settings for a personal compute instance. internal PersonalComputeInstanceSettings PersonalComputeInstanceSettings { get; set; } /// A user explicitly assigned to a personal compute instance. @@ -214,8 +180,6 @@ public IReadOnlyList SchedulesComputeSt } } - /// Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. - public string IdleTimeBeforeShutdown { get; set; } /// Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs. public bool? EnableNodePublicIP { get; set; } /// Describes informations of containers on this ComputeInstance. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceState.cs index 5cd4f18a8ef4c..924e9af414edb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceState.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceState.cs @@ -27,7 +27,6 @@ public MachineLearningComputeInstanceState(string value) private const string DeletingValue = "Deleting"; private const string RunningValue = "Running"; private const string RestartingValue = "Restarting"; - private const string ResizingValue = "Resizing"; private const string JobRunningValue = "JobRunning"; private const string SettingUpValue = "SettingUp"; private const string SetupFailedValue = "SetupFailed"; @@ -49,8 +48,6 @@ public MachineLearningComputeInstanceState(string value) public static MachineLearningComputeInstanceState Running { get; } = new MachineLearningComputeInstanceState(RunningValue); /// Restarting. public static MachineLearningComputeInstanceState Restarting { get; } = new MachineLearningComputeInstanceState(RestartingValue); - /// Resizing. - public static MachineLearningComputeInstanceState Resizing { get; } = new MachineLearningComputeInstanceState(ResizingValue); /// JobRunning. public static MachineLearningComputeInstanceState JobRunning { get; } = new MachineLearningComputeInstanceState(JobRunningValue); /// SettingUp. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePowerAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePowerAction.cs index 647bbd691c24e..93551f6b4e94a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePowerAction.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePowerAction.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// [Required] The compute power action. + /// The compute power action. public readonly partial struct MachineLearningComputePowerAction : IEquatable { private readonly string _value; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionCategory.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionCategory.cs index a6a4c9d98b7cc..5449acc39606a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionCategory.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionCategory.cs @@ -35,7 +35,6 @@ public MachineLearningConnectionCategory(string value) private const string RedisValue = "Redis"; private const string ApiKeyValue = "ApiKey"; private const string AzureOpenAIValue = "AzureOpenAI"; - private const string AIServicesValue = "AIServices"; private const string CognitiveSearchValue = "CognitiveSearch"; private const string CognitiveServiceValue = "CognitiveService"; private const string CustomKeysValue = "CustomKeys"; @@ -124,6 +123,7 @@ public MachineLearningConnectionCategory(string value) private const string SerpValue = "Serp"; private const string BingLLMSearchValue = "BingLLMSearch"; private const string ServerlessValue = "Serverless"; + private const string AIServicesValue = "AIServices"; /// PythonFeed. public static MachineLearningConnectionCategory PythonFeed { get; } = new MachineLearningConnectionCategory(PythonFeedValue); @@ -151,8 +151,6 @@ public MachineLearningConnectionCategory(string value) public static MachineLearningConnectionCategory ApiKey { get; } = new MachineLearningConnectionCategory(ApiKeyValue); /// AzureOpenAI. public static MachineLearningConnectionCategory AzureOpenAI { get; } = new MachineLearningConnectionCategory(AzureOpenAIValue); - /// AIServices. - public static MachineLearningConnectionCategory AIServices { get; } = new MachineLearningConnectionCategory(AIServicesValue); /// CognitiveSearch. public static MachineLearningConnectionCategory CognitiveSearch { get; } = new MachineLearningConnectionCategory(CognitiveSearchValue); /// CognitiveService. @@ -329,6 +327,8 @@ public MachineLearningConnectionCategory(string value) public static MachineLearningConnectionCategory BingLLMSearch { get; } = new MachineLearningConnectionCategory(BingLLMSearchValue); /// Serverless. public static MachineLearningConnectionCategory Serverless { get; } = new MachineLearningConnectionCategory(ServerlessValue); + /// AIServices. + public static MachineLearningConnectionCategory AIServices { get; } = new MachineLearningConnectionCategory(AIServicesValue); /// Determines if two values are the same. public static bool operator ==(MachineLearningConnectionCategory left, MachineLearningConnectionCategory right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.Serialization.cs index 2e2f4311e83ec..6f6c6f8ebbadf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.Serialization.cs @@ -31,6 +31,11 @@ void IJsonModel.Write(Utf8JsonWrite writer.WritePropertyName("location"u8); writer.WriteStringValue(Location.Value); } + if (options.Format != "W" && Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + } if (Optional.IsCollectionDefined(Passwords)) { writer.WritePropertyName("passwords"u8); @@ -41,11 +46,6 @@ void IJsonModel.Write(Utf8JsonWrite } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - writer.WriteStringValue(Username); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -85,8 +85,8 @@ internal static MachineLearningContainerRegistryCredentials DeserializeMachineLe return null; } AzureLocation? location = default; - IReadOnlyList passwords = default; string username = default; + IReadOnlyList passwords = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -100,6 +100,11 @@ internal static MachineLearningContainerRegistryCredentials DeserializeMachineLe location = new AzureLocation(property.Value.GetString()); continue; } + if (property.NameEquals("username"u8)) + { + username = property.Value.GetString(); + continue; + } if (property.NameEquals("passwords"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -114,18 +119,13 @@ internal static MachineLearningContainerRegistryCredentials DeserializeMachineLe passwords = array; continue; } - if (property.NameEquals("username"u8)) - { - username = property.Value.GetString(); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningContainerRegistryCredentials(location, passwords ?? new ChangeTrackingList(), username, serializedAdditionalRawData); + return new MachineLearningContainerRegistryCredentials(location, username, passwords ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.cs index 9ba07cba661bd..bd9816297c257 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.cs @@ -53,23 +53,23 @@ internal MachineLearningContainerRegistryCredentials() } /// Initializes a new instance of . - /// The location of the workspace ACR. + /// + /// /// - /// The username of the workspace ACR. /// Keeps track of any properties unknown to the library. - internal MachineLearningContainerRegistryCredentials(AzureLocation? location, IReadOnlyList passwords, string username, IDictionary serializedAdditionalRawData) + internal MachineLearningContainerRegistryCredentials(AzureLocation? location, string username, IReadOnlyList passwords, IDictionary serializedAdditionalRawData) { Location = location; - Passwords = passwords; Username = username; + Passwords = passwords; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The location of the workspace ACR. + /// Gets the location. public AzureLocation? Location { get; } + /// Gets the username. + public string Username { get; } /// Gets the passwords. public IReadOnlyList Passwords { get; } - /// The username of the workspace ACR. - public string Username { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceRequirements.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceRequirements.Serialization.cs index 0b37424b4b2eb..8b9bdc54275db 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceRequirements.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceRequirements.Serialization.cs @@ -26,28 +26,28 @@ void IJsonModel.Write(Utf8JsonWrit } writer.WriteStartObject(); - if (Optional.IsDefined(ContainerResourceLimits)) + if (Optional.IsDefined(ContainerResourceRequests)) { - if (ContainerResourceLimits != null) + if (ContainerResourceRequests != null) { - writer.WritePropertyName("containerResourceLimits"u8); - writer.WriteObjectValue(ContainerResourceLimits, options); + writer.WritePropertyName("containerResourceRequests"u8); + writer.WriteObjectValue(ContainerResourceRequests, options); } else { - writer.WriteNull("containerResourceLimits"); + writer.WriteNull("containerResourceRequests"); } } - if (Optional.IsDefined(ContainerResourceRequests)) + if (Optional.IsDefined(ContainerResourceLimits)) { - if (ContainerResourceRequests != null) + if (ContainerResourceLimits != null) { - writer.WritePropertyName("containerResourceRequests"u8); - writer.WriteObjectValue(ContainerResourceRequests, options); + writer.WritePropertyName("containerResourceLimits"u8); + writer.WriteObjectValue(ContainerResourceLimits, options); } else { - writer.WriteNull("containerResourceRequests"); + writer.WriteNull("containerResourceLimits"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -88,30 +88,30 @@ internal static MachineLearningContainerResourceRequirements DeserializeMachineL { return null; } - MachineLearningContainerResourceSettings containerResourceLimits = default; MachineLearningContainerResourceSettings containerResourceRequests = default; + MachineLearningContainerResourceSettings containerResourceLimits = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("containerResourceLimits"u8)) + if (property.NameEquals("containerResourceRequests"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - containerResourceLimits = null; + containerResourceRequests = null; continue; } - containerResourceLimits = MachineLearningContainerResourceSettings.DeserializeMachineLearningContainerResourceSettings(property.Value, options); + containerResourceRequests = MachineLearningContainerResourceSettings.DeserializeMachineLearningContainerResourceSettings(property.Value, options); continue; } - if (property.NameEquals("containerResourceRequests"u8)) + if (property.NameEquals("containerResourceLimits"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - containerResourceRequests = null; + containerResourceLimits = null; continue; } - containerResourceRequests = MachineLearningContainerResourceSettings.DeserializeMachineLearningContainerResourceSettings(property.Value, options); + containerResourceLimits = MachineLearningContainerResourceSettings.DeserializeMachineLearningContainerResourceSettings(property.Value, options); continue; } if (options.Format != "W") @@ -120,7 +120,7 @@ internal static MachineLearningContainerResourceRequirements DeserializeMachineL } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningContainerResourceRequirements(containerResourceLimits, containerResourceRequests, serializedAdditionalRawData); + return new MachineLearningContainerResourceRequirements(containerResourceRequests, containerResourceLimits, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceRequirements.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceRequirements.cs index 39b74c8ecd41f..d5de8a05b6e17 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceRequirements.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceRequirements.cs @@ -51,19 +51,19 @@ public MachineLearningContainerResourceRequirements() } /// Initializes a new instance of . - /// Container resource limit info:. /// Container resource request info:. + /// Container resource limit info:. /// Keeps track of any properties unknown to the library. - internal MachineLearningContainerResourceRequirements(MachineLearningContainerResourceSettings containerResourceLimits, MachineLearningContainerResourceSettings containerResourceRequests, IDictionary serializedAdditionalRawData) + internal MachineLearningContainerResourceRequirements(MachineLearningContainerResourceSettings containerResourceRequests, MachineLearningContainerResourceSettings containerResourceLimits, IDictionary serializedAdditionalRawData) { - ContainerResourceLimits = containerResourceLimits; ContainerResourceRequests = containerResourceRequests; + ContainerResourceLimits = containerResourceLimits; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Container resource limit info:. - public MachineLearningContainerResourceSettings ContainerResourceLimits { get; set; } /// Container resource request info:. public MachineLearningContainerResourceSettings ContainerResourceRequests { get; set; } + /// Container resource limit info:. + public MachineLearningContainerResourceSettings ContainerResourceLimits { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceSettings.Serialization.cs index d9b65f44cf968..9a44d3c60c90f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceSettings.Serialization.cs @@ -38,28 +38,28 @@ void IJsonModel.Write(Utf8JsonWriter w writer.WriteNull("cpu"); } } - if (Optional.IsDefined(Gpu)) + if (Optional.IsDefined(Memory)) { - if (Gpu != null) + if (Memory != null) { - writer.WritePropertyName("gpu"u8); - writer.WriteStringValue(Gpu); + writer.WritePropertyName("memory"u8); + writer.WriteStringValue(Memory); } else { - writer.WriteNull("gpu"); + writer.WriteNull("memory"); } } - if (Optional.IsDefined(Memory)) + if (Optional.IsDefined(Gpu)) { - if (Memory != null) + if (Gpu != null) { - writer.WritePropertyName("memory"u8); - writer.WriteStringValue(Memory); + writer.WritePropertyName("gpu"u8); + writer.WriteStringValue(Gpu); } else { - writer.WriteNull("memory"); + writer.WriteNull("gpu"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -101,8 +101,8 @@ internal static MachineLearningContainerResourceSettings DeserializeMachineLearn return null; } string cpu = default; - string gpu = default; string memory = default; + string gpu = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -117,24 +117,24 @@ internal static MachineLearningContainerResourceSettings DeserializeMachineLearn cpu = property.Value.GetString(); continue; } - if (property.NameEquals("gpu"u8)) + if (property.NameEquals("memory"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - gpu = null; + memory = null; continue; } - gpu = property.Value.GetString(); + memory = property.Value.GetString(); continue; } - if (property.NameEquals("memory"u8)) + if (property.NameEquals("gpu"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - memory = null; + gpu = null; continue; } - memory = property.Value.GetString(); + gpu = property.Value.GetString(); continue; } if (options.Format != "W") @@ -143,7 +143,7 @@ internal static MachineLearningContainerResourceSettings DeserializeMachineLearn } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningContainerResourceSettings(cpu, gpu, memory, serializedAdditionalRawData); + return new MachineLearningContainerResourceSettings(cpu, memory, gpu, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceSettings.cs index 31989ed0a7f13..e9f14b0007ecf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceSettings.cs @@ -55,20 +55,20 @@ public MachineLearningContainerResourceSettings() /// Number of vCPUs request/limit for container. More info: /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ /// - /// - /// Number of Nvidia GPU cards request/limit for container. More info: - /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - /// /// /// Memory size request/limit for container. More info: /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ /// + /// + /// Number of Nvidia GPU cards request/limit for container. More info: + /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// /// Keeps track of any properties unknown to the library. - internal MachineLearningContainerResourceSettings(string cpu, string gpu, string memory, IDictionary serializedAdditionalRawData) + internal MachineLearningContainerResourceSettings(string cpu, string memory, string gpu, IDictionary serializedAdditionalRawData) { Cpu = cpu; - Gpu = gpu; Memory = memory; + Gpu = gpu; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -78,14 +78,14 @@ internal MachineLearningContainerResourceSettings(string cpu, string gpu, string /// public string Cpu { get; set; } /// - /// Number of Nvidia GPU cards request/limit for container. More info: + /// Memory size request/limit for container. More info: /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ /// - public string Gpu { get; set; } + public string Memory { get; set; } /// - /// Memory size request/limit for container. More info: + /// Number of Nvidia GPU cards request/limit for container. More info: /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ /// - public string Memory { get; set; } + public string Gpu { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobInput.Serialization.cs index 1224503fcc06e..27481d72b8248 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobInput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobInput.Serialization.cs @@ -26,13 +26,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); writer.WriteStringValue(Mode.Value.ToString()); } - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -45,8 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("description"); } } - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -85,14 +85,19 @@ internal static MachineLearningCustomModelJobInput DeserializeMachineLearningCus { return null; } - MachineLearningInputDeliveryMode? mode = default; Uri uri = default; - string description = default; + MachineLearningInputDeliveryMode? mode = default; JobInputType jobInputType = default; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("uri"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -102,9 +107,9 @@ internal static MachineLearningCustomModelJobInput DeserializeMachineLearningCus mode = new MachineLearningInputDeliveryMode(property.Value.GetString()); continue; } - if (property.NameEquals("uri"u8)) + if (property.NameEquals("jobInputType"u8)) { - uri = new Uri(property.Value.GetString()); + jobInputType = new JobInputType(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -117,18 +122,13 @@ internal static MachineLearningCustomModelJobInput DeserializeMachineLearningCus description = property.Value.GetString(); continue; } - if (property.NameEquals("jobInputType"u8)) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningCustomModelJobInput(description, jobInputType, serializedAdditionalRawData, mode, uri); + return new MachineLearningCustomModelJobInput(jobInputType, description, serializedAdditionalRawData, uri, mode); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobInput.cs index aab469352e354..9f6dd5515ffda 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobInput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobInput.cs @@ -25,15 +25,15 @@ public MachineLearningCustomModelJobInput(Uri uri) } /// Initializes a new instance of . - /// Description for the input. /// [Required] Specifies the type of job. + /// Description for the input. /// Keeps track of any properties unknown to the library. - /// Input Asset Delivery Mode. /// [Required] Input Asset URI. - internal MachineLearningCustomModelJobInput(string description, JobInputType jobInputType, IDictionary serializedAdditionalRawData, MachineLearningInputDeliveryMode? mode, Uri uri) : base(description, jobInputType, serializedAdditionalRawData) + /// Input Asset Delivery Mode. + internal MachineLearningCustomModelJobInput(JobInputType jobInputType, string description, IDictionary serializedAdditionalRawData, Uri uri, MachineLearningInputDeliveryMode? mode) : base(jobInputType, description, serializedAdditionalRawData) { - Mode = mode; Uri = uri; + Mode = mode; JobInputType = jobInputType; } @@ -42,9 +42,9 @@ internal MachineLearningCustomModelJobInput() { } - /// Input Asset Delivery Mode. - public MachineLearningInputDeliveryMode? Mode { get; set; } /// [Required] Input Asset URI. public Uri Uri { get; set; } + /// Input Asset Delivery Mode. + public MachineLearningInputDeliveryMode? Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.Serialization.cs index b0b2ac9b9cc53..5c4537d655103 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer } writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"u8); - writer.WriteStringValue(Mode.Value.ToString()); - } if (Optional.IsDefined(Uri)) { if (Uri != null) @@ -43,6 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteNull("uri"); } } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("jobOutputType"u8); + writer.WriteStringValue(JobOutputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -55,8 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteNull("description"); } } - writer.WritePropertyName("jobOutputType"u8); - writer.WriteStringValue(JobOutputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -95,31 +95,36 @@ internal static MachineLearningCustomModelJobOutput DeserializeMachineLearningCu { return null; } - MachineLearningOutputDeliveryMode? mode = default; Uri uri = default; - string description = default; + MachineLearningOutputDeliveryMode? mode = default; JobOutputType jobOutputType = default; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("mode"u8)) + if (property.NameEquals("uri"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + uri = null; continue; } - mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + uri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("uri"u8)) + if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - uri = null; continue; } - uri = new Uri(property.Value.GetString()); + mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("jobOutputType"u8)) + { + jobOutputType = new JobOutputType(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -132,18 +137,13 @@ internal static MachineLearningCustomModelJobOutput DeserializeMachineLearningCu description = property.Value.GetString(); continue; } - if (property.NameEquals("jobOutputType"u8)) - { - jobOutputType = new JobOutputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningCustomModelJobOutput(description, jobOutputType, serializedAdditionalRawData, mode, uri); + return new MachineLearningCustomModelJobOutput(jobOutputType, description, serializedAdditionalRawData, uri, mode); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.cs index bf1acd9708591..7e2c290d92786 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.cs @@ -20,21 +20,21 @@ public MachineLearningCustomModelJobOutput() } /// Initializes a new instance of . - /// Description for the output. /// [Required] Specifies the type of job. + /// Description for the output. /// Keeps track of any properties unknown to the library. - /// Output Asset Delivery Mode. /// Output Asset URI. - internal MachineLearningCustomModelJobOutput(string description, JobOutputType jobOutputType, IDictionary serializedAdditionalRawData, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType, serializedAdditionalRawData) + /// Output Asset Delivery Mode. + internal MachineLearningCustomModelJobOutput(JobOutputType jobOutputType, string description, IDictionary serializedAdditionalRawData, Uri uri, MachineLearningOutputDeliveryMode? mode) : base(jobOutputType, description, serializedAdditionalRawData) { - Mode = mode; Uri = uri; + Mode = mode; JobOutputType = jobOutputType; } - /// Output Asset Delivery Mode. - public MachineLearningOutputDeliveryMode? Mode { get; set; } /// Output Asset URI. public Uri Uri { get; set; } + /// Output Asset Delivery Mode. + public MachineLearningOutputDeliveryMode? Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerProperties.Serialization.cs index b4fc7ede536e2..4f5a2bef992b9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerProperties.Serialization.cs @@ -69,13 +69,13 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -84,16 +84,16 @@ void IJsonModel.Write(Utf8JsonWriter wri } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -102,7 +102,7 @@ void IJsonModel.Write(Utf8JsonWriter wri } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -148,8 +148,8 @@ internal static MachineLearningDataContainerProperties DeserializeMachineLearnin string latestVersion = default; string nextVersion = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -198,11 +198,11 @@ internal static MachineLearningDataContainerProperties DeserializeMachineLearnin description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -210,14 +210,14 @@ internal static MachineLearningDataContainerProperties DeserializeMachineLearnin { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -225,7 +225,7 @@ internal static MachineLearningDataContainerProperties DeserializeMachineLearnin { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -236,8 +236,8 @@ internal static MachineLearningDataContainerProperties DeserializeMachineLearnin serializedAdditionalRawData = rawDataDictionary; return new MachineLearningDataContainerProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, isArchived, latestVersion, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerProperties.cs index bce474ff641c2..5529e4c1868aa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerProperties.cs @@ -22,14 +22,14 @@ public MachineLearningDataContainerProperties(MachineLearningDataType dataType) /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. /// [Required] Specifies the type of data. - internal MachineLearningDataContainerProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, MachineLearningDataType dataType) : base(description, properties, tags, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) + internal MachineLearningDataContainerProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, MachineLearningDataType dataType) : base(description, tags, properties, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) { DataType = dataType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataPathAssetReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataPathAssetReference.Serialization.cs index f86fabb146e22..a64e5ef15b5eb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataPathAssetReference.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataPathAssetReference.Serialization.cs @@ -26,28 +26,28 @@ void IJsonModel.Write(Utf8JsonWriter writ } writer.WriteStartObject(); - if (Optional.IsDefined(DatastoreId)) + if (Optional.IsDefined(Path)) { - if (DatastoreId != null) + if (Path != null) { - writer.WritePropertyName("datastoreId"u8); - writer.WriteStringValue(DatastoreId); + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); } else { - writer.WriteNull("datastoreId"); + writer.WriteNull("path"); } } - if (Optional.IsDefined(Path)) + if (Optional.IsDefined(DatastoreId)) { - if (Path != null) + if (DatastoreId != null) { - writer.WritePropertyName("path"u8); - writer.WriteStringValue(Path); + writer.WritePropertyName("datastoreId"u8); + writer.WriteStringValue(DatastoreId); } else { - writer.WriteNull("path"); + writer.WriteNull("datastoreId"); } } writer.WritePropertyName("referenceType"u8); @@ -90,31 +90,31 @@ internal static MachineLearningDataPathAssetReference DeserializeMachineLearning { return null; } - string datastoreId = default; string path = default; + string datastoreId = default; ReferenceType referenceType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("datastoreId"u8)) + if (property.NameEquals("path"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - datastoreId = null; + path = null; continue; } - datastoreId = property.Value.GetString(); + path = property.Value.GetString(); continue; } - if (property.NameEquals("path"u8)) + if (property.NameEquals("datastoreId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - path = null; + datastoreId = null; continue; } - path = property.Value.GetString(); + datastoreId = property.Value.GetString(); continue; } if (property.NameEquals("referenceType"u8)) @@ -128,7 +128,7 @@ internal static MachineLearningDataPathAssetReference DeserializeMachineLearning } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningDataPathAssetReference(referenceType, serializedAdditionalRawData, datastoreId, path); + return new MachineLearningDataPathAssetReference(referenceType, serializedAdditionalRawData, path, datastoreId); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataPathAssetReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataPathAssetReference.cs index 469a5beac10e0..48b5a3059d868 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataPathAssetReference.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataPathAssetReference.cs @@ -22,18 +22,18 @@ public MachineLearningDataPathAssetReference() /// Initializes a new instance of . /// [Required] Specifies the type of asset reference. /// Keeps track of any properties unknown to the library. - /// ARM resource ID of the datastore where the asset is located. /// The path of the file/directory in the datastore. - internal MachineLearningDataPathAssetReference(ReferenceType referenceType, IDictionary serializedAdditionalRawData, string datastoreId, string path) : base(referenceType, serializedAdditionalRawData) + /// ARM resource ID of the datastore where the asset is located. + internal MachineLearningDataPathAssetReference(ReferenceType referenceType, IDictionary serializedAdditionalRawData, string path, string datastoreId) : base(referenceType, serializedAdditionalRawData) { - DatastoreId = datastoreId; Path = path; + DatastoreId = datastoreId; ReferenceType = referenceType; } - /// ARM resource ID of the datastore where the asset is located. - public string DatastoreId { get; set; } /// The path of the file/directory in the datastore. public string Path { get; set; } + /// ARM resource ID of the datastore where the asset is located. + public string DatastoreId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.Serialization.cs index 8cfea4d8cd9ab..67b7797414725 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.Serialization.cs @@ -29,16 +29,16 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(DataType.ToString()); writer.WritePropertyName("dataUri"u8); writer.WriteStringValue(DataUri.AbsoluteUri); - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"u8); - writer.WriteBooleanValue(IsAnonymous.Value); - } if (Optional.IsDefined(IsArchived)) { writer.WritePropertyName("isArchived"u8); writer.WriteBooleanValue(IsArchived.Value); } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -51,13 +51,13 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -66,16 +66,16 @@ void IJsonModel.Write(Utf8JsonWriter write } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -84,7 +84,7 @@ void IJsonModel.Write(Utf8JsonWriter write } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.cs index ffe2daef51187..ac6d1d60626b9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.cs @@ -29,14 +29,14 @@ public MachineLearningDataVersionProperties(Uri dataUri) /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// If the name version are system generated (anonymous registration). /// Is the asset archived?. + /// If the name version are system generated (anonymous registration). /// [Required] Specifies the type of data. /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. - internal MachineLearningDataVersionProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri) : base(description, properties, tags, serializedAdditionalRawData, isAnonymous, isArchived) + internal MachineLearningDataVersionProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, bool? isAnonymous, MachineLearningDataType dataType, Uri dataUri) : base(description, tags, properties, serializedAdditionalRawData, isArchived, isAnonymous) { DataType = dataType; DataUri = dataUri; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.Serialization.cs index 567ea3d6b9796..5fea5a2fb0e4a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.Serialization.cs @@ -25,8 +25,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); - writer.WritePropertyName("credentials"u8); - writer.WriteObjectValue(Credentials, options); writer.WritePropertyName("datastoreType"u8); writer.WriteStringValue(DatastoreType.ToString()); if (options.Format != "W" && Optional.IsDefined(IsDefault)) @@ -34,6 +32,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("isDefault"u8); writer.WriteBooleanValue(IsDefault.Value); } + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials, options); if (Optional.IsDefined(Description)) { if (Description != null) @@ -46,13 +46,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -61,16 +61,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -79,7 +79,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.cs index 67d0116fa621d..b62fe805ce661 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.cs @@ -33,21 +33,21 @@ public MachineLearningDatastoreProperties(MachineLearningDatastoreCredentials cr /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. + /// [Required] Storage type backing the datastore. + /// Readonly property to indicate if datastore is the workspace default datastore. /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , and . /// - /// [Required] Storage type backing the datastore. - /// Readonly property to indicate if datastore is the workspace default datastore. - internal MachineLearningDatastoreProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault) : base(description, properties, tags, serializedAdditionalRawData) + internal MachineLearningDatastoreProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, DatastoreType datastoreType, bool? isDefault, MachineLearningDatastoreCredentials credentials) : base(description, tags, properties, serializedAdditionalRawData) { - Credentials = credentials; DatastoreType = datastoreType; IsDefault = isDefault; + Credentials = credentials; } /// Initializes a new instance of for deserialization. @@ -55,15 +55,15 @@ internal MachineLearningDatastoreProperties() { } + /// [Required] Storage type backing the datastore. + internal DatastoreType DatastoreType { get; set; } + /// Readonly property to indicate if datastore is the workspace default datastore. + public bool? IsDefault { get; } /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , and . /// public MachineLearningDatastoreCredentials Credentials { get; set; } - /// [Required] Storage type backing the datastore. - internal DatastoreType DatastoreType { get; set; } - /// Readonly property to indicate if datastore is the workspace default datastore. - public bool? IsDefault { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEarlyTerminationPolicy.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEarlyTerminationPolicy.Serialization.cs index 5a25d1c3746e8..c4fe105d4d68d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEarlyTerminationPolicy.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEarlyTerminationPolicy.Serialization.cs @@ -26,18 +26,18 @@ void IJsonModel.Write(Utf8JsonWriter writ } writer.WriteStartObject(); - if (Optional.IsDefined(DelayEvaluation)) - { - writer.WritePropertyName("delayEvaluation"u8); - writer.WriteNumberValue(DelayEvaluation.Value); - } + writer.WritePropertyName("policyType"u8); + writer.WriteStringValue(PolicyType.ToString()); if (Optional.IsDefined(EvaluationInterval)) { writer.WritePropertyName("evaluationInterval"u8); writer.WriteNumberValue(EvaluationInterval.Value); } - writer.WritePropertyName("policyType"u8); - writer.WriteStringValue(PolicyType.ToString()); + if (Optional.IsDefined(DelayEvaluation)) + { + writer.WritePropertyName("delayEvaluation"u8); + writer.WriteNumberValue(DelayEvaluation.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEarlyTerminationPolicy.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEarlyTerminationPolicy.cs index ca9a9e84b3ba0..04c3515b1427f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEarlyTerminationPolicy.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEarlyTerminationPolicy.cs @@ -55,23 +55,23 @@ protected MachineLearningEarlyTerminationPolicy() } /// Initializes a new instance of . - /// Number of intervals by which to delay the first evaluation. - /// Interval (number of runs) between policy evaluations. /// [Required] Name of policy configuration. + /// Interval (number of runs) between policy evaluations. + /// Number of intervals by which to delay the first evaluation. /// Keeps track of any properties unknown to the library. - internal MachineLearningEarlyTerminationPolicy(int? delayEvaluation, int? evaluationInterval, EarlyTerminationPolicyType policyType, IDictionary serializedAdditionalRawData) + internal MachineLearningEarlyTerminationPolicy(EarlyTerminationPolicyType policyType, int? evaluationInterval, int? delayEvaluation, IDictionary serializedAdditionalRawData) { - DelayEvaluation = delayEvaluation; - EvaluationInterval = evaluationInterval; PolicyType = policyType; + EvaluationInterval = evaluationInterval; + DelayEvaluation = delayEvaluation; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Number of intervals by which to delay the first evaluation. - public int? DelayEvaluation { get; set; } - /// Interval (number of runs) between policy evaluations. - public int? EvaluationInterval { get; set; } /// [Required] Name of policy configuration. internal EarlyTerminationPolicyType PolicyType { get; set; } + /// Interval (number of runs) between policy evaluations. + public int? EvaluationInterval { get; set; } + /// Number of intervals by which to delay the first evaluation. + public int? DelayEvaluation { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.Serialization.cs index 6ae6af8c4c2ed..f14811905db75 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.Serialization.cs @@ -26,15 +26,15 @@ void IJsonModel.Write(Utf8JsonWrite } writer.WriteStartObject(); + writer.WritePropertyName("keyVaultArmId"u8); + writer.WriteStringValue(KeyVaultArmId); + writer.WritePropertyName("keyIdentifier"u8); + writer.WriteStringValue(KeyIdentifier); if (Optional.IsDefined(IdentityClientId)) { writer.WritePropertyName("identityClientId"u8); writer.WriteStringValue(IdentityClientId); } - writer.WritePropertyName("keyIdentifier"u8); - writer.WriteStringValue(KeyIdentifier); - writer.WritePropertyName("keyVaultArmId"u8); - writer.WriteStringValue(KeyVaultArmId); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -73,16 +73,16 @@ internal static MachineLearningEncryptionKeyVaultProperties DeserializeMachineLe { return null; } - string identityClientId = default; - string keyIdentifier = default; ResourceIdentifier keyVaultArmId = default; + string keyIdentifier = default; + string identityClientId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identityClientId"u8)) + if (property.NameEquals("keyVaultArmId"u8)) { - identityClientId = property.Value.GetString(); + keyVaultArmId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("keyIdentifier"u8)) @@ -90,9 +90,9 @@ internal static MachineLearningEncryptionKeyVaultProperties DeserializeMachineLe keyIdentifier = property.Value.GetString(); continue; } - if (property.NameEquals("keyVaultArmId"u8)) + if (property.NameEquals("identityClientId"u8)) { - keyVaultArmId = new ResourceIdentifier(property.Value.GetString()); + identityClientId = property.Value.GetString(); continue; } if (options.Format != "W") @@ -101,7 +101,7 @@ internal static MachineLearningEncryptionKeyVaultProperties DeserializeMachineLe } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningEncryptionKeyVaultProperties(identityClientId, keyIdentifier, keyVaultArmId, serializedAdditionalRawData); + return new MachineLearningEncryptionKeyVaultProperties(keyVaultArmId, keyIdentifier, identityClientId, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.cs index 5cedc9757cb32..c02683e89922d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Customer Key vault properties. + /// The MachineLearningEncryptionKeyVaultProperties. public partial class MachineLearningEncryptionKeyVaultProperties { /// @@ -47,31 +47,28 @@ public partial class MachineLearningEncryptionKeyVaultProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// KeyVault key identifier to encrypt the data. - /// KeyVault Arm Id that contains the data encryption key. - /// or is null. - public MachineLearningEncryptionKeyVaultProperties(string keyIdentifier, ResourceIdentifier keyVaultArmId) + /// The ArmId of the keyVault where the customer owned encryption key is present. + /// Key vault uri to access the encryption key. + /// or is null. + public MachineLearningEncryptionKeyVaultProperties(ResourceIdentifier keyVaultArmId, string keyIdentifier) { - Argument.AssertNotNull(keyIdentifier, nameof(keyIdentifier)); Argument.AssertNotNull(keyVaultArmId, nameof(keyVaultArmId)); + Argument.AssertNotNull(keyIdentifier, nameof(keyIdentifier)); - KeyIdentifier = keyIdentifier; KeyVaultArmId = keyVaultArmId; + KeyIdentifier = keyIdentifier; } /// Initializes a new instance of . - /// - /// Currently, we support only SystemAssigned MSI. - /// We need this when we support UserAssignedIdentities - /// - /// KeyVault key identifier to encrypt the data. - /// KeyVault Arm Id that contains the data encryption key. + /// The ArmId of the keyVault where the customer owned encryption key is present. + /// Key vault uri to access the encryption key. + /// For future use - The client id of the identity which will be used to access key vault. /// Keeps track of any properties unknown to the library. - internal MachineLearningEncryptionKeyVaultProperties(string identityClientId, string keyIdentifier, ResourceIdentifier keyVaultArmId, IDictionary serializedAdditionalRawData) + internal MachineLearningEncryptionKeyVaultProperties(ResourceIdentifier keyVaultArmId, string keyIdentifier, string identityClientId, IDictionary serializedAdditionalRawData) { - IdentityClientId = identityClientId; - KeyIdentifier = keyIdentifier; KeyVaultArmId = keyVaultArmId; + KeyIdentifier = keyIdentifier; + IdentityClientId = identityClientId; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -80,14 +77,11 @@ internal MachineLearningEncryptionKeyVaultProperties() { } - /// - /// Currently, we support only SystemAssigned MSI. - /// We need this when we support UserAssignedIdentities - /// - public string IdentityClientId { get; set; } - /// KeyVault key identifier to encrypt the data. - public string KeyIdentifier { get; set; } - /// KeyVault Arm Id that contains the data encryption key. + /// The ArmId of the keyVault where the customer owned encryption key is present. public ResourceIdentifier KeyVaultArmId { get; set; } + /// Key vault uri to access the encryption key. + public string KeyIdentifier { get; set; } + /// For future use - The client id of the identity which will be used to access key vault. + public string IdentityClientId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.Serialization.cs index d29516f7d6e18..f4d3b31da92da 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.Serialization.cs @@ -26,11 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteStartObject(); - if (Optional.IsDefined(CosmosDBResourceId)) - { - writer.WritePropertyName("cosmosDbResourceId"u8); - writer.WriteStringValue(CosmosDBResourceId); - } + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); @@ -38,18 +35,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WritePropertyName("keyVaultProperties"u8); writer.WriteObjectValue(KeyVaultProperties, options); - if (Optional.IsDefined(SearchAccountResourceId)) - { - writer.WritePropertyName("searchAccountResourceId"u8); - writer.WriteStringValue(SearchAccountResourceId); - } - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - if (Optional.IsDefined(StorageAccountResourceId)) - { - writer.WritePropertyName("storageAccountResourceId"u8); - writer.WriteStringValue(StorageAccountResourceId); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -88,23 +73,16 @@ internal static MachineLearningEncryptionSetting DeserializeMachineLearningEncry { return null; } - ResourceIdentifier cosmosDbResourceId = default; + MachineLearningEncryptionStatus status = default; MachineLearningCmkIdentity identity = default; MachineLearningEncryptionKeyVaultProperties keyVaultProperties = default; - ResourceIdentifier searchAccountResourceId = default; - MachineLearningEncryptionStatus status = default; - ResourceIdentifier storageAccountResourceId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("cosmosDbResourceId"u8)) + if (property.NameEquals("status"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - cosmosDbResourceId = new ResourceIdentifier(property.Value.GetString()); + status = new MachineLearningEncryptionStatus(property.Value.GetString()); continue; } if (property.NameEquals("identity"u8)) @@ -121,43 +99,13 @@ internal static MachineLearningEncryptionSetting DeserializeMachineLearningEncry keyVaultProperties = MachineLearningEncryptionKeyVaultProperties.DeserializeMachineLearningEncryptionKeyVaultProperties(property.Value, options); continue; } - if (property.NameEquals("searchAccountResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - searchAccountResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new MachineLearningEncryptionStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("storageAccountResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storageAccountResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningEncryptionSetting( - cosmosDbResourceId, - identity, - keyVaultProperties, - searchAccountResourceId, - status, - storageAccountResourceId, - serializedAdditionalRawData); + return new MachineLearningEncryptionSetting(status, identity, keyVaultProperties, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.cs index 53a5abb392f17..ebc0472ce1d79 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.cs @@ -47,42 +47,15 @@ public partial class MachineLearningEncryptionSetting private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// KeyVault details to do the encryption. /// Indicates whether or not the encryption is enabled for the workspace. - /// is null. - public MachineLearningEncryptionSetting(MachineLearningEncryptionKeyVaultProperties keyVaultProperties, MachineLearningEncryptionStatus status) - { - Argument.AssertNotNull(keyVaultProperties, nameof(keyVaultProperties)); - - KeyVaultProperties = keyVaultProperties; - Status = status; - } - - /// Initializes a new instance of . - /// - /// The byok cosmosdb account that customer brings to store customer's data - /// with encryption - /// - /// Identity to be used with the keyVault. - /// KeyVault details to do the encryption. - /// - /// The byok search account that customer brings to store customer's data - /// with encryption - /// - /// Indicates whether or not the encryption is enabled for the workspace. - /// - /// The byok storage account that customer brings to store customer's data - /// with encryption - /// + /// The identity that will be used to access the key vault for encryption at rest. + /// Customer Key vault properties. /// Keeps track of any properties unknown to the library. - internal MachineLearningEncryptionSetting(ResourceIdentifier cosmosDBResourceId, MachineLearningCmkIdentity identity, MachineLearningEncryptionKeyVaultProperties keyVaultProperties, ResourceIdentifier searchAccountResourceId, MachineLearningEncryptionStatus status, ResourceIdentifier storageAccountResourceId, IDictionary serializedAdditionalRawData) + internal MachineLearningEncryptionSetting(MachineLearningEncryptionStatus status, MachineLearningCmkIdentity identity, MachineLearningEncryptionKeyVaultProperties keyVaultProperties, IDictionary serializedAdditionalRawData) { - CosmosDBResourceId = cosmosDBResourceId; + Status = status; Identity = identity; KeyVaultProperties = keyVaultProperties; - SearchAccountResourceId = searchAccountResourceId; - Status = status; - StorageAccountResourceId = storageAccountResourceId; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -91,14 +64,11 @@ internal MachineLearningEncryptionSetting() { } - /// - /// The byok cosmosdb account that customer brings to store customer's data - /// with encryption - /// - public ResourceIdentifier CosmosDBResourceId { get; set; } - /// Identity to be used with the keyVault. + /// Indicates whether or not the encryption is enabled for the workspace. + public MachineLearningEncryptionStatus Status { get; set; } + /// The identity that will be used to access the key vault for encryption at rest. internal MachineLearningCmkIdentity Identity { get; set; } - /// UserAssignedIdentity to be used to fetch the encryption key from keyVault. + /// The ArmId of the user assigned identity that will be used to access the customer managed key vault. public ResourceIdentifier UserAssignedIdentity { get => Identity is null ? default : Identity.UserAssignedIdentity; @@ -110,19 +80,7 @@ public ResourceIdentifier UserAssignedIdentity } } - /// KeyVault details to do the encryption. + /// Customer Key vault properties. public MachineLearningEncryptionKeyVaultProperties KeyVaultProperties { get; set; } - /// - /// The byok search account that customer brings to store customer's data - /// with encryption - /// - public ResourceIdentifier SearchAccountResourceId { get; set; } - /// Indicates whether or not the encryption is enabled for the workspace. - public MachineLearningEncryptionStatus Status { get; set; } - /// - /// The byok storage account that customer brings to store customer's data - /// with encryption - /// - public ResourceIdentifier StorageAccountResourceId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthToken.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthToken.Serialization.cs index c399fa3a7ae87..97fbfb604540b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthToken.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthToken.Serialization.cs @@ -38,16 +38,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNull("accessToken"); } } - if (Optional.IsDefined(ExpireOn)) - { - writer.WritePropertyName("expiryTimeUtc"u8); - writer.WriteNumberValue(ExpireOn.Value, "U"); - } - if (Optional.IsDefined(RefreshOn)) - { - writer.WritePropertyName("refreshAfterTimeUtc"u8); - writer.WriteNumberValue(RefreshOn.Value, "U"); - } if (Optional.IsDefined(TokenType)) { if (TokenType != null) @@ -60,6 +50,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNull("tokenType"); } } + if (Optional.IsDefined(ExpireOn)) + { + writer.WritePropertyName("expiryTimeUtc"u8); + writer.WriteNumberValue(ExpireOn.Value, "U"); + } + if (Optional.IsDefined(RefreshOn)) + { + writer.WritePropertyName("refreshAfterTimeUtc"u8); + writer.WriteNumberValue(RefreshOn.Value, "U"); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -99,9 +99,9 @@ internal static MachineLearningEndpointAuthToken DeserializeMachineLearningEndpo return null; } string accessToken = default; + string tokenType = default; DateTimeOffset? expiryTimeUtc = default; DateTimeOffset? refreshAfterTimeUtc = default; - string tokenType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -116,32 +116,32 @@ internal static MachineLearningEndpointAuthToken DeserializeMachineLearningEndpo accessToken = property.Value.GetString(); continue; } - if (property.NameEquals("expiryTimeUtc"u8)) + if (property.NameEquals("tokenType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + tokenType = null; continue; } - expiryTimeUtc = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + tokenType = property.Value.GetString(); continue; } - if (property.NameEquals("refreshAfterTimeUtc"u8)) + if (property.NameEquals("expiryTimeUtc"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - refreshAfterTimeUtc = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); + expiryTimeUtc = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); continue; } - if (property.NameEquals("tokenType"u8)) + if (property.NameEquals("refreshAfterTimeUtc"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tokenType = null; continue; } - tokenType = property.Value.GetString(); + refreshAfterTimeUtc = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); continue; } if (options.Format != "W") @@ -150,7 +150,7 @@ internal static MachineLearningEndpointAuthToken DeserializeMachineLearningEndpo } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningEndpointAuthToken(accessToken, expiryTimeUtc, refreshAfterTimeUtc, tokenType, serializedAdditionalRawData); + return new MachineLearningEndpointAuthToken(accessToken, tokenType, expiryTimeUtc, refreshAfterTimeUtc, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthToken.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthToken.cs index 565b5dc7dcddd..860a8f36c105a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthToken.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthToken.cs @@ -52,26 +52,26 @@ internal MachineLearningEndpointAuthToken() /// Initializes a new instance of . /// Access token for endpoint authentication. + /// Access token type. /// Access token expiry time (UTC). /// Refresh access token after time (UTC). - /// Access token type. /// Keeps track of any properties unknown to the library. - internal MachineLearningEndpointAuthToken(string accessToken, DateTimeOffset? expireOn, DateTimeOffset? refreshOn, string tokenType, IDictionary serializedAdditionalRawData) + internal MachineLearningEndpointAuthToken(string accessToken, string tokenType, DateTimeOffset? expireOn, DateTimeOffset? refreshOn, IDictionary serializedAdditionalRawData) { AccessToken = accessToken; + TokenType = tokenType; ExpireOn = expireOn; RefreshOn = refreshOn; - TokenType = tokenType; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Access token for endpoint authentication. public string AccessToken { get; } + /// Access token type. + public string TokenType { get; } /// Access token expiry time (UTC). public DateTimeOffset? ExpireOn { get; } /// Refresh access token after time (UTC). public DateTimeOffset? RefreshOn { get; } - /// Access token type. - public string TokenType { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.Serialization.cs index 6a0307bde5f4c..f5d3f1ec1d0ca 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.Serialization.cs @@ -26,28 +26,46 @@ void IJsonModel.Write(Utf8JsonWrite } writer.WriteStartObject(); - if (Optional.IsDefined(CodeConfiguration)) + if (Optional.IsDefined(Description)) { - if (CodeConfiguration != null) + if (Description != null) { - writer.WritePropertyName("codeConfiguration"u8); - writer.WriteObjectValue(CodeConfiguration, options); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); } else { - writer.WriteNull("codeConfiguration"); + writer.WriteNull("description"); } } - if (Optional.IsDefined(Description)) + if (Optional.IsCollectionDefined(Properties)) { - if (Description != null) + if (Properties != null) { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } else { - writer.WriteNull("description"); + writer.WriteNull("properties"); + } + } + if (Optional.IsDefined(CodeConfiguration)) + { + if (CodeConfiguration != null) + { + writer.WritePropertyName("codeConfiguration"u8); + writer.WriteObjectValue(CodeConfiguration, options); + } + else + { + writer.WriteNull("codeConfiguration"); } } if (Optional.IsDefined(EnvironmentId)) @@ -80,24 +98,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteNull("environmentVariables"); } } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -136,65 +136,65 @@ internal static MachineLearningEndpointDeploymentProperties DeserializeMachineLe { return null; } - MachineLearningCodeConfiguration codeConfiguration = default; string description = default; + IDictionary properties = default; + MachineLearningCodeConfiguration codeConfiguration = default; string environmentId = default; IDictionary environmentVariables = default; - IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("codeConfiguration"u8)) + if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - codeConfiguration = null; + description = null; continue; } - codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value, options); + description = property.Value.GetString(); continue; } - if (property.NameEquals("description"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - description = null; + properties = null; continue; } - description = property.Value.GetString(); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; continue; } - if (property.NameEquals("environmentId"u8)) + if (property.NameEquals("codeConfiguration"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - environmentId = null; + codeConfiguration = null; continue; } - environmentId = property.Value.GetString(); + codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value, options); continue; } - if (property.NameEquals("environmentVariables"u8)) + if (property.NameEquals("environmentId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - environmentVariables = null; + environmentId = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - environmentVariables = dictionary; + environmentId = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("environmentVariables"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + environmentVariables = null; continue; } Dictionary dictionary = new Dictionary(); @@ -202,7 +202,7 @@ internal static MachineLearningEndpointDeploymentProperties DeserializeMachineLe { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + environmentVariables = dictionary; continue; } if (options.Format != "W") @@ -212,11 +212,11 @@ internal static MachineLearningEndpointDeploymentProperties DeserializeMachineLe } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningEndpointDeploymentProperties( - codeConfiguration, description, + properties ?? new ChangeTrackingDictionary(), + codeConfiguration, environmentId, environmentVariables ?? new ChangeTrackingDictionary(), - properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.cs index 53c99c436c6a5..e44c5fe8a7021 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.cs @@ -48,36 +48,36 @@ public partial class MachineLearningEndpointDeploymentProperties /// Initializes a new instance of . public MachineLearningEndpointDeploymentProperties() { - EnvironmentVariables = new ChangeTrackingDictionary(); Properties = new ChangeTrackingDictionary(); + EnvironmentVariables = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Code configuration for the endpoint deployment. /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. - /// Property dictionary. Properties can be added, but not removed or altered. /// Keeps track of any properties unknown to the library. - internal MachineLearningEndpointDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, IDictionary serializedAdditionalRawData) + internal MachineLearningEndpointDeploymentProperties(string description, IDictionary properties, MachineLearningCodeConfiguration codeConfiguration, string environmentId, IDictionary environmentVariables, IDictionary serializedAdditionalRawData) { - CodeConfiguration = codeConfiguration; Description = description; + Properties = properties; + CodeConfiguration = codeConfiguration; EnvironmentId = environmentId; EnvironmentVariables = environmentVariables; - Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Code configuration for the endpoint deployment. - public MachineLearningCodeConfiguration CodeConfiguration { get; set; } /// Description of the endpoint deployment. public string Description { get; set; } + /// Property dictionary. Properties can be added, but not removed or altered. + public IDictionary Properties { get; set; } + /// Code configuration for the endpoint deployment. + public MachineLearningCodeConfiguration CodeConfiguration { get; set; } /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. public string EnvironmentId { get; set; } /// Environment variables configuration for the deployment. public IDictionary EnvironmentVariables { get; set; } - /// Property dictionary. Properties can be added, but not removed or altered. - public IDictionary Properties { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProperties.Serialization.cs index 3eb0d14a93e82..1cd0d48c34226 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProperties.Serialization.cs @@ -26,8 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); - writer.WritePropertyName("authMode"u8); - writer.WriteStringValue(AuthMode.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -40,18 +38,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("description"); } } - if (Optional.IsDefined(Keys)) - { - if (Keys != null) - { - writer.WritePropertyName("keys"u8); - writer.WriteObjectValue(Keys, options); - } - else - { - writer.WriteNull("keys"); - } - } if (Optional.IsCollectionDefined(Properties)) { if (Properties != null) @@ -94,6 +80,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("swaggerUri"); } } + writer.WritePropertyName("authMode"u8); + writer.WriteStringValue(AuthMode.ToString()); + if (Optional.IsDefined(Keys)) + { + if (Keys != null) + { + writer.WritePropertyName("keys"u8); + writer.WriteObjectValue(Keys, options); + } + else + { + writer.WriteNull("keys"); + } + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -132,21 +132,16 @@ internal static MachineLearningEndpointProperties DeserializeMachineLearningEndp { return null; } - MachineLearningEndpointAuthMode authMode = default; string description = default; - MachineLearningEndpointAuthKeys keys = default; IDictionary properties = default; Uri scoringUri = default; Uri swaggerUri = default; + MachineLearningEndpointAuthMode authMode = default; + MachineLearningEndpointAuthKeys keys = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("authMode"u8)) - { - authMode = new MachineLearningEndpointAuthMode(property.Value.GetString()); - continue; - } if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -157,16 +152,6 @@ internal static MachineLearningEndpointProperties DeserializeMachineLearningEndp description = property.Value.GetString(); continue; } - if (property.NameEquals("keys"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - keys = null; - continue; - } - keys = MachineLearningEndpointAuthKeys.DeserializeMachineLearningEndpointAuthKeys(property.Value, options); - continue; - } if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -202,6 +187,21 @@ internal static MachineLearningEndpointProperties DeserializeMachineLearningEndp swaggerUri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("authMode"u8)) + { + authMode = new MachineLearningEndpointAuthMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("keys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + keys = null; + continue; + } + keys = MachineLearningEndpointAuthKeys.DeserializeMachineLearningEndpointAuthKeys(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -209,12 +209,12 @@ internal static MachineLearningEndpointProperties DeserializeMachineLearningEndp } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningEndpointProperties( - authMode, description, - keys, properties ?? new ChangeTrackingDictionary(), scoringUri, swaggerUri, + authMode, + keys, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProperties.cs index 5655a12ef51d5..821cd9a799646 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProperties.cs @@ -49,29 +49,29 @@ public partial class MachineLearningEndpointProperties /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. public MachineLearningEndpointProperties(MachineLearningEndpointAuthMode authMode) { - AuthMode = authMode; Properties = new ChangeTrackingDictionary(); + AuthMode = authMode; } /// Initializes a new instance of . - /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. /// Description of the inference endpoint. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Endpoint URI. + /// Endpoint Swagger URI. + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. /// /// EndpointAuthKeys to set initially on an Endpoint. /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. /// - /// Property dictionary. Properties can be added, but not removed or altered. - /// Endpoint URI. - /// Endpoint Swagger URI. /// Keeps track of any properties unknown to the library. - internal MachineLearningEndpointProperties(MachineLearningEndpointAuthMode authMode, string description, MachineLearningEndpointAuthKeys keys, IDictionary properties, Uri scoringUri, Uri swaggerUri, IDictionary serializedAdditionalRawData) + internal MachineLearningEndpointProperties(string description, IDictionary properties, Uri scoringUri, Uri swaggerUri, MachineLearningEndpointAuthMode authMode, MachineLearningEndpointAuthKeys keys, IDictionary serializedAdditionalRawData) { - AuthMode = authMode; Description = description; - Keys = keys; Properties = properties; ScoringUri = scoringUri; SwaggerUri = swaggerUri; + AuthMode = authMode; + Keys = keys; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -80,20 +80,20 @@ internal MachineLearningEndpointProperties() { } - /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - public MachineLearningEndpointAuthMode AuthMode { get; set; } /// Description of the inference endpoint. public string Description { get; set; } - /// - /// EndpointAuthKeys to set initially on an Endpoint. - /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. - /// - public MachineLearningEndpointAuthKeys Keys { get; set; } /// Property dictionary. Properties can be added, but not removed or altered. public IDictionary Properties { get; set; } /// Endpoint URI. public Uri ScoringUri { get; } /// Endpoint Swagger URI. public Uri SwaggerUri { get; } + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + public MachineLearningEndpointAuthMode AuthMode { get; set; } + /// + /// EndpointAuthKeys to set initially on an Endpoint. + /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + /// + public MachineLearningEndpointAuthKeys Keys { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.Serialization.cs index 591c7c143705a..094cf18aa4a63 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.Serialization.cs @@ -72,13 +72,13 @@ void IJsonModel.Write(Utf8JsonWri writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -87,16 +87,16 @@ void IJsonModel.Write(Utf8JsonWri } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -105,7 +105,7 @@ void IJsonModel.Write(Utf8JsonWri } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -151,8 +151,8 @@ internal static MachineLearningEnvironmentContainerProperties DeserializeMachine string latestVersion = default; string nextVersion = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -205,11 +205,11 @@ internal static MachineLearningEnvironmentContainerProperties DeserializeMachine description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -217,14 +217,14 @@ internal static MachineLearningEnvironmentContainerProperties DeserializeMachine { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -232,7 +232,7 @@ internal static MachineLearningEnvironmentContainerProperties DeserializeMachine { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -243,8 +243,8 @@ internal static MachineLearningEnvironmentContainerProperties DeserializeMachine serializedAdditionalRawData = rawDataDictionary; return new MachineLearningEnvironmentContainerProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, isArchived, latestVersion, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.cs index 124495315fae3..ff3eb29b6fe5a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.cs @@ -20,14 +20,14 @@ public MachineLearningEnvironmentContainerProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. /// Provisioning state for the environment container. - internal MachineLearningEnvironmentContainerProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) + internal MachineLearningEnvironmentContainerProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, tags, properties, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) { ProvisioningState = provisioningState; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.Serialization.cs index 672bbfa2881ca..e746b634fbe72 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.Serialization.cs @@ -26,40 +26,40 @@ void IJsonModel.Write(Utf8JsonWrite } writer.WriteStartObject(); - if (Optional.IsDefined(AutoRebuild)) + if (options.Format != "W" && Optional.IsDefined(EnvironmentType)) { - writer.WritePropertyName("autoRebuild"u8); - writer.WriteStringValue(AutoRebuild.Value.ToString()); + writer.WritePropertyName("environmentType"u8); + writer.WriteStringValue(EnvironmentType.Value.ToString()); } - if (Optional.IsDefined(Build)) + if (Optional.IsDefined(Image)) { - writer.WritePropertyName("build"u8); - writer.WriteObjectValue(Build, options); + writer.WritePropertyName("image"u8); + writer.WriteStringValue(Image); } if (Optional.IsDefined(CondaFile)) { writer.WritePropertyName("condaFile"u8); writer.WriteStringValue(CondaFile); } - if (options.Format != "W" && Optional.IsDefined(EnvironmentType)) + if (Optional.IsDefined(Build)) { - writer.WritePropertyName("environmentType"u8); - writer.WriteStringValue(EnvironmentType.Value.ToString()); + writer.WritePropertyName("build"u8); + writer.WriteObjectValue(Build, options); } - if (Optional.IsDefined(Image)) + if (Optional.IsDefined(OSType)) { - writer.WritePropertyName("image"u8); - writer.WriteStringValue(Image); + writer.WritePropertyName("osType"u8); + writer.WriteStringValue(OSType.Value.ToString()); } if (Optional.IsDefined(InferenceConfig)) { writer.WritePropertyName("inferenceConfig"u8); writer.WriteObjectValue(InferenceConfig, options); } - if (Optional.IsDefined(OSType)) + if (Optional.IsDefined(AutoRebuild)) { - writer.WritePropertyName("osType"u8); - writer.WriteStringValue(OSType.Value.ToString()); + writer.WritePropertyName("autoRebuild"u8); + writer.WriteStringValue(AutoRebuild.Value.ToString()); } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { @@ -78,16 +78,16 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteNull("stage"); } } - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"u8); - writer.WriteBooleanValue(IsAnonymous.Value); - } if (Optional.IsDefined(IsArchived)) { writer.WritePropertyName("isArchived"u8); writer.WriteBooleanValue(IsArchived.Value); } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -100,13 +100,13 @@ void IJsonModel.Write(Utf8JsonWrite writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -115,16 +115,16 @@ void IJsonModel.Write(Utf8JsonWrite } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -133,7 +133,7 @@ void IJsonModel.Write(Utf8JsonWrite } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -174,40 +174,36 @@ internal static MachineLearningEnvironmentVersionProperties DeserializeMachineLe { return null; } - AutoRebuildSetting? autoRebuild = default; - MachineLearningBuildContext build = default; - string condaFile = default; MachineLearningEnvironmentType? environmentType = default; string image = default; - MachineLearningInferenceContainerProperties inferenceConfig = default; + string condaFile = default; + MachineLearningBuildContext build = default; MachineLearningOperatingSystemType? osType = default; + MachineLearningInferenceContainerProperties inferenceConfig = default; + AutoRebuildSetting? autoRebuild = default; RegistryAssetProvisioningState? provisioningState = default; string stage = default; - bool? isAnonymous = default; bool? isArchived = default; + bool? isAnonymous = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("autoRebuild"u8)) + if (property.NameEquals("environmentType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - autoRebuild = new AutoRebuildSetting(property.Value.GetString()); + environmentType = new MachineLearningEnvironmentType(property.Value.GetString()); continue; } - if (property.NameEquals("build"u8)) + if (property.NameEquals("image"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - build = MachineLearningBuildContext.DeserializeMachineLearningBuildContext(property.Value, options); + image = property.Value.GetString(); continue; } if (property.NameEquals("condaFile"u8)) @@ -215,18 +211,22 @@ internal static MachineLearningEnvironmentVersionProperties DeserializeMachineLe condaFile = property.Value.GetString(); continue; } - if (property.NameEquals("environmentType"u8)) + if (property.NameEquals("build"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - environmentType = new MachineLearningEnvironmentType(property.Value.GetString()); + build = MachineLearningBuildContext.DeserializeMachineLearningBuildContext(property.Value, options); continue; } - if (property.NameEquals("image"u8)) + if (property.NameEquals("osType"u8)) { - image = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osType = new MachineLearningOperatingSystemType(property.Value.GetString()); continue; } if (property.NameEquals("inferenceConfig"u8)) @@ -238,13 +238,13 @@ internal static MachineLearningEnvironmentVersionProperties DeserializeMachineLe inferenceConfig = MachineLearningInferenceContainerProperties.DeserializeMachineLearningInferenceContainerProperties(property.Value, options); continue; } - if (property.NameEquals("osType"u8)) + if (property.NameEquals("autoRebuild"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - osType = new MachineLearningOperatingSystemType(property.Value.GetString()); + autoRebuild = new AutoRebuildSetting(property.Value.GetString()); continue; } if (property.NameEquals("provisioningState"u8)) @@ -266,22 +266,22 @@ internal static MachineLearningEnvironmentVersionProperties DeserializeMachineLe stage = property.Value.GetString(); continue; } - if (property.NameEquals("isAnonymous"u8)) + if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isAnonymous = property.Value.GetBoolean(); + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isArchived = property.Value.GetBoolean(); + isAnonymous = property.Value.GetBoolean(); continue; } if (property.NameEquals("description"u8)) @@ -294,11 +294,11 @@ internal static MachineLearningEnvironmentVersionProperties DeserializeMachineLe description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -306,14 +306,14 @@ internal static MachineLearningEnvironmentVersionProperties DeserializeMachineLe { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -321,7 +321,7 @@ internal static MachineLearningEnvironmentVersionProperties DeserializeMachineLe { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -332,18 +332,18 @@ internal static MachineLearningEnvironmentVersionProperties DeserializeMachineLe serializedAdditionalRawData = rawDataDictionary; return new MachineLearningEnvironmentVersionProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - isAnonymous, isArchived, - autoRebuild, - build, - condaFile, + isAnonymous, environmentType, image, - inferenceConfig, + condaFile, + build, osType, + inferenceConfig, + autoRebuild, provisioningState, stage); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.cs index cc1bf15317843..0b48e082bf952 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.cs @@ -20,17 +20,11 @@ public MachineLearningEnvironmentVersionProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// If the name version are system generated (anonymous registration). /// Is the asset archived?. - /// Defines if image needs to be rebuilt based on base image changes. - /// Configuration settings for Docker build context. - /// - /// Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and C/C++ packages. - /// <see href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" /> - /// + /// If the name version are system generated (anonymous registration). /// /// Environment type is either user managed or curated by the Azure ML service /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/resource-curated-environments" /> @@ -39,32 +33,29 @@ public MachineLearningEnvironmentVersionProperties() /// Name of the image that will be used for the environment. /// <seealso href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" /> /// - /// Defines configuration specific to inference. + /// + /// Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and C/C++ packages. + /// <see href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" /> + /// + /// Configuration settings for Docker build context. /// The OS type of the environment. + /// Defines configuration specific to inference. + /// Defines if image needs to be rebuilt based on base image changes. /// Provisioning state for the environment version. /// Stage in the environment lifecycle assigned to this environment. - internal MachineLearningEnvironmentVersionProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isAnonymous, bool? isArchived, AutoRebuildSetting? autoRebuild, MachineLearningBuildContext build, string condaFile, MachineLearningEnvironmentType? environmentType, string image, MachineLearningInferenceContainerProperties inferenceConfig, MachineLearningOperatingSystemType? osType, RegistryAssetProvisioningState? provisioningState, string stage) : base(description, properties, tags, serializedAdditionalRawData, isAnonymous, isArchived) + internal MachineLearningEnvironmentVersionProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, bool? isAnonymous, MachineLearningEnvironmentType? environmentType, string image, string condaFile, MachineLearningBuildContext build, MachineLearningOperatingSystemType? osType, MachineLearningInferenceContainerProperties inferenceConfig, AutoRebuildSetting? autoRebuild, RegistryAssetProvisioningState? provisioningState, string stage) : base(description, tags, properties, serializedAdditionalRawData, isArchived, isAnonymous) { - AutoRebuild = autoRebuild; - Build = build; - CondaFile = condaFile; EnvironmentType = environmentType; Image = image; - InferenceConfig = inferenceConfig; + CondaFile = condaFile; + Build = build; OSType = osType; + InferenceConfig = inferenceConfig; + AutoRebuild = autoRebuild; ProvisioningState = provisioningState; Stage = stage; } - /// Defines if image needs to be rebuilt based on base image changes. - public AutoRebuildSetting? AutoRebuild { get; set; } - /// Configuration settings for Docker build context. - public MachineLearningBuildContext Build { get; set; } - /// - /// Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and C/C++ packages. - /// <see href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" /> - /// - public string CondaFile { get; set; } /// /// Environment type is either user managed or curated by the Azure ML service /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/resource-curated-environments" /> @@ -75,10 +66,19 @@ internal MachineLearningEnvironmentVersionProperties(string description, IDictio /// <seealso href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" /> /// public string Image { get; set; } - /// Defines configuration specific to inference. - public MachineLearningInferenceContainerProperties InferenceConfig { get; set; } + /// + /// Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and C/C++ packages. + /// <see href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" /> + /// + public string CondaFile { get; set; } + /// Configuration settings for Docker build context. + public MachineLearningBuildContext Build { get; set; } /// The OS type of the environment. public MachineLearningOperatingSystemType? OSType { get; set; } + /// Defines configuration specific to inference. + public MachineLearningInferenceContainerProperties InferenceConfig { get; set; } + /// Defines if image needs to be rebuilt based on base image changes. + public AutoRebuildSetting? AutoRebuild { get; set; } /// Provisioning state for the environment version. public RegistryAssetProvisioningState? ProvisioningState { get; } /// Stage in the environment lifecycle assigned to this environment. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.Serialization.cs index b3667ab73ac49..bd4469c60204f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteStartObject(); - if (Optional.IsDefined(DataType)) - { - writer.WritePropertyName("dataType"u8); - writer.WriteStringValue(DataType.Value.ToString()); - } if (Optional.IsDefined(FeatureName)) { if (FeatureName != null) @@ -43,6 +38,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNull("featureName"); } } + if (Optional.IsDefined(DataType)) + { + writer.WritePropertyName("dataType"u8); + writer.WriteStringValue(DataType.Value.ToString()); + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -55,13 +55,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -70,16 +70,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -88,7 +88,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -129,32 +129,32 @@ internal static MachineLearningFeatureProperties DeserializeMachineLearningFeatu { return null; } - FeatureDataType? dataType = default; string featureName = default; + FeatureDataType? dataType = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("dataType"u8)) + if (property.NameEquals("featureName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + featureName = null; continue; } - dataType = new FeatureDataType(property.Value.GetString()); + featureName = property.Value.GetString(); continue; } - if (property.NameEquals("featureName"u8)) + if (property.NameEquals("dataType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - featureName = null; continue; } - featureName = property.Value.GetString(); + dataType = new FeatureDataType(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -167,11 +167,11 @@ internal static MachineLearningFeatureProperties DeserializeMachineLearningFeatu description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -179,14 +179,14 @@ internal static MachineLearningFeatureProperties DeserializeMachineLearningFeatu { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -194,7 +194,7 @@ internal static MachineLearningFeatureProperties DeserializeMachineLearningFeatu { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -205,11 +205,11 @@ internal static MachineLearningFeatureProperties DeserializeMachineLearningFeatu serializedAdditionalRawData = rawDataDictionary; return new MachineLearningFeatureProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - dataType, - featureName); + featureName, + dataType); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.cs index a47817a64cc6d..95b7c89bbe071 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureProperties.cs @@ -20,20 +20,20 @@ public MachineLearningFeatureProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// Specifies type. /// Specifies name. - internal MachineLearningFeatureProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, FeatureDataType? dataType, string featureName) : base(description, properties, tags, serializedAdditionalRawData) + /// Specifies type. + internal MachineLearningFeatureProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, string featureName, FeatureDataType? dataType) : base(description, tags, properties, serializedAdditionalRawData) { - DataType = dataType; FeatureName = featureName; + DataType = dataType; } - /// Specifies type. - public FeatureDataType? DataType { get; set; } /// Specifies name. public string FeatureName { get; set; } + /// Specifies type. + public FeatureDataType? DataType { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.Serialization.cs index be1cca80e9ee9..0a635efaf98e8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.Serialization.cs @@ -72,13 +72,13 @@ void IJsonModel.Write(Utf8JsonWrit writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -87,16 +87,16 @@ void IJsonModel.Write(Utf8JsonWrit } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -105,7 +105,7 @@ void IJsonModel.Write(Utf8JsonWrit } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -151,8 +151,8 @@ internal static MachineLearningFeatureSetContainerProperties DeserializeMachineL string latestVersion = default; string nextVersion = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -205,11 +205,11 @@ internal static MachineLearningFeatureSetContainerProperties DeserializeMachineL description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -217,14 +217,14 @@ internal static MachineLearningFeatureSetContainerProperties DeserializeMachineL { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -232,7 +232,7 @@ internal static MachineLearningFeatureSetContainerProperties DeserializeMachineL { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -243,8 +243,8 @@ internal static MachineLearningFeatureSetContainerProperties DeserializeMachineL serializedAdditionalRawData = rawDataDictionary; return new MachineLearningFeatureSetContainerProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, isArchived, latestVersion, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.cs index ee9c052ea4ecb..8f2001ade0c03 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetContainerProperties.cs @@ -20,14 +20,14 @@ public MachineLearningFeatureSetContainerProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. /// Provisioning state for the featureset container. - internal MachineLearningFeatureSetContainerProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) + internal MachineLearningFeatureSetContainerProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, tags, properties, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) { ProvisioningState = provisioningState; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.Serialization.cs index 2e2f27be13ec6..9303a3b26ee29 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.Serialization.cs @@ -26,21 +26,16 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Entities)) + if (Optional.IsDefined(Specification)) { - if (Entities != null) + if (Specification != null) { - writer.WritePropertyName("entities"u8); - writer.WriteStartArray(); - foreach (var item in Entities) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); + writer.WritePropertyName("specification"u8); + writer.WriteObjectValue(Specification, options); } else { - writer.WriteNull("entities"); + writer.WriteNull("specification"); } } if (Optional.IsDefined(MaterializationSettings)) @@ -55,45 +50,50 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteNull("materializationSettings"); } } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(Specification)) + if (Optional.IsDefined(Stage)) { - if (Specification != null) + if (Stage != null) { - writer.WritePropertyName("specification"u8); - writer.WriteObjectValue(Specification, options); + writer.WritePropertyName("stage"u8); + writer.WriteStringValue(Stage); } else { - writer.WriteNull("specification"); + writer.WriteNull("stage"); } } - if (Optional.IsDefined(Stage)) + if (Optional.IsCollectionDefined(Entities)) { - if (Stage != null) + if (Entities != null) { - writer.WritePropertyName("stage"u8); - writer.WriteStringValue(Stage); + writer.WritePropertyName("entities"u8); + writer.WriteStartArray(); + foreach (var item in Entities) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } else { - writer.WriteNull("stage"); + writer.WriteNull("entities"); } } - if (Optional.IsDefined(IsAnonymous)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { - writer.WritePropertyName("isAnonymous"u8); - writer.WriteBooleanValue(IsAnonymous.Value); + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); } if (Optional.IsDefined(IsArchived)) { writer.WritePropertyName("isArchived"u8); writer.WriteBooleanValue(IsArchived.Value); } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -106,13 +106,13 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -121,16 +121,16 @@ void IJsonModel.Write(Utf8JsonWriter } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -139,7 +139,7 @@ void IJsonModel.Write(Utf8JsonWriter } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -180,33 +180,28 @@ internal static MachineLearningFeatureSetVersionProperties DeserializeMachineLea { return null; } - IList entities = default; - MaterializationSettings materializationSettings = default; - RegistryAssetProvisioningState? provisioningState = default; FeaturesetSpecification specification = default; + MaterializationSettings materializationSettings = default; string stage = default; - bool? isAnonymous = default; + IList entities = default; + RegistryAssetProvisioningState? provisioningState = default; bool? isArchived = default; + bool? isAnonymous = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("entities"u8)) + if (property.NameEquals("specification"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - entities = null; + specification = null; continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - entities = array; + specification = FeaturesetSpecification.DeserializeFeaturesetSpecification(property.Value, options); continue; } if (property.NameEquals("materializationSettings"u8)) @@ -219,51 +214,56 @@ internal static MachineLearningFeatureSetVersionProperties DeserializeMachineLea materializationSettings = MaterializationSettings.DeserializeMaterializationSettings(property.Value, options); continue; } - if (property.NameEquals("provisioningState"u8)) + if (property.NameEquals("stage"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + stage = null; continue; } - provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + stage = property.Value.GetString(); continue; } - if (property.NameEquals("specification"u8)) + if (property.NameEquals("entities"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - specification = null; + entities = null; continue; } - specification = FeaturesetSpecification.DeserializeFeaturesetSpecification(property.Value, options); + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + entities = array; continue; } - if (property.NameEquals("stage"u8)) + if (property.NameEquals("provisioningState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - stage = null; continue; } - stage = property.Value.GetString(); + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); continue; } - if (property.NameEquals("isAnonymous"u8)) + if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isAnonymous = property.Value.GetBoolean(); + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isArchived = property.Value.GetBoolean(); + isAnonymous = property.Value.GetBoolean(); continue; } if (property.NameEquals("description"u8)) @@ -276,11 +276,11 @@ internal static MachineLearningFeatureSetVersionProperties DeserializeMachineLea description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -288,14 +288,14 @@ internal static MachineLearningFeatureSetVersionProperties DeserializeMachineLea { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -303,7 +303,7 @@ internal static MachineLearningFeatureSetVersionProperties DeserializeMachineLea { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -314,16 +314,16 @@ internal static MachineLearningFeatureSetVersionProperties DeserializeMachineLea serializedAdditionalRawData = rawDataDictionary; return new MachineLearningFeatureSetVersionProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - isAnonymous, isArchived, - entities ?? new ChangeTrackingList(), - materializationSettings, - provisioningState, + isAnonymous, specification, - stage); + materializationSettings, + stage, + entities ?? new ChangeTrackingList(), + provisioningState); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.cs index 304743ac12aed..8d72670ae44f3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureSetVersionProperties.cs @@ -21,31 +21,25 @@ public MachineLearningFeatureSetVersionProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// If the name version are system generated (anonymous registration). /// Is the asset archived?. - /// Specifies list of entities. - /// Specifies the materialization settings. - /// Provisioning state for the featureset version container. + /// If the name version are system generated (anonymous registration). /// Specifies the feature spec details. + /// Specifies the materialization settings. /// Specifies the asset stage. - internal MachineLearningFeatureSetVersionProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isAnonymous, bool? isArchived, IList entities, MaterializationSettings materializationSettings, RegistryAssetProvisioningState? provisioningState, FeaturesetSpecification specification, string stage) : base(description, properties, tags, serializedAdditionalRawData, isAnonymous, isArchived) + /// Specifies list of entities. + /// Provisioning state for the featureset version container. + internal MachineLearningFeatureSetVersionProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, bool? isAnonymous, FeaturesetSpecification specification, MaterializationSettings materializationSettings, string stage, IList entities, RegistryAssetProvisioningState? provisioningState) : base(description, tags, properties, serializedAdditionalRawData, isArchived, isAnonymous) { - Entities = entities; - MaterializationSettings = materializationSettings; - ProvisioningState = provisioningState; Specification = specification; + MaterializationSettings = materializationSettings; Stage = stage; + Entities = entities; + ProvisioningState = provisioningState; } - /// Specifies list of entities. - public IList Entities { get; set; } - /// Specifies the materialization settings. - public MaterializationSettings MaterializationSettings { get; set; } - /// Provisioning state for the featureset version container. - public RegistryAssetProvisioningState? ProvisioningState { get; } /// Specifies the feature spec details. internal FeaturesetSpecification Specification { get; set; } /// Specifies the spec path. @@ -60,7 +54,13 @@ public string SpecificationPath } } + /// Specifies the materialization settings. + public MaterializationSettings MaterializationSettings { get; set; } /// Specifies the asset stage. public string Stage { get; set; } + /// Specifies list of entities. + public IList Entities { get; set; } + /// Provisioning state for the featureset version container. + public RegistryAssetProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.Serialization.cs index 1f4c170ae201f..d68d4c04ea79c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.Serialization.cs @@ -72,13 +72,13 @@ void IJsonModel.Write(Utf8 writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -87,16 +87,16 @@ void IJsonModel.Write(Utf8 } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -105,7 +105,7 @@ void IJsonModel.Write(Utf8 } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -151,8 +151,8 @@ internal static MachineLearningFeatureStoreEntityContainerProperties Deserialize string latestVersion = default; string nextVersion = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -205,11 +205,11 @@ internal static MachineLearningFeatureStoreEntityContainerProperties Deserialize description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -217,14 +217,14 @@ internal static MachineLearningFeatureStoreEntityContainerProperties Deserialize { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -232,7 +232,7 @@ internal static MachineLearningFeatureStoreEntityContainerProperties Deserialize { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -243,8 +243,8 @@ internal static MachineLearningFeatureStoreEntityContainerProperties Deserialize serializedAdditionalRawData = rawDataDictionary; return new MachineLearningFeatureStoreEntityContainerProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, isArchived, latestVersion, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.cs index d92241cbf8852..5670f8a57ee8e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityContainerProperties.cs @@ -20,14 +20,14 @@ public MachineLearningFeatureStoreEntityContainerProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. /// Provisioning state for the featurestore entity container. - internal MachineLearningFeatureStoreEntityContainerProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) + internal MachineLearningFeatureStoreEntityContainerProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, tags, properties, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) { ProvisioningState = provisioningState; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.Serialization.cs index 9c9715910c7cb..d748f1ddf47ab 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.Serialization.cs @@ -43,11 +43,6 @@ void IJsonModel.Write(Utf8Js writer.WriteNull("indexColumns"); } } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } if (Optional.IsDefined(Stage)) { if (Stage != null) @@ -60,16 +55,21 @@ void IJsonModel.Write(Utf8Js writer.WriteNull("stage"); } } - if (Optional.IsDefined(IsAnonymous)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { - writer.WritePropertyName("isAnonymous"u8); - writer.WriteBooleanValue(IsAnonymous.Value); + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); } if (Optional.IsDefined(IsArchived)) { writer.WritePropertyName("isArchived"u8); writer.WriteBooleanValue(IsArchived.Value); } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -82,13 +82,13 @@ void IJsonModel.Write(Utf8Js writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -97,16 +97,16 @@ void IJsonModel.Write(Utf8Js } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -115,7 +115,7 @@ void IJsonModel.Write(Utf8Js } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -157,13 +157,13 @@ internal static MachineLearningFeatureStoreEntityVersionProperties DeserializeMa return null; } IList indexColumns = default; - RegistryAssetProvisioningState? provisioningState = default; string stage = default; - bool? isAnonymous = default; + RegistryAssetProvisioningState? provisioningState = default; bool? isArchived = default; + bool? isAnonymous = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -183,41 +183,41 @@ internal static MachineLearningFeatureStoreEntityVersionProperties DeserializeMa indexColumns = array; continue; } - if (property.NameEquals("provisioningState"u8)) + if (property.NameEquals("stage"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + stage = null; continue; } - provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); + stage = property.Value.GetString(); continue; } - if (property.NameEquals("stage"u8)) + if (property.NameEquals("provisioningState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - stage = null; continue; } - stage = property.Value.GetString(); + provisioningState = new RegistryAssetProvisioningState(property.Value.GetString()); continue; } - if (property.NameEquals("isAnonymous"u8)) + if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isAnonymous = property.Value.GetBoolean(); + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isArchived = property.Value.GetBoolean(); + isAnonymous = property.Value.GetBoolean(); continue; } if (property.NameEquals("description"u8)) @@ -230,11 +230,11 @@ internal static MachineLearningFeatureStoreEntityVersionProperties DeserializeMa description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -242,14 +242,14 @@ internal static MachineLearningFeatureStoreEntityVersionProperties DeserializeMa { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -257,7 +257,7 @@ internal static MachineLearningFeatureStoreEntityVersionProperties DeserializeMa { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -268,14 +268,14 @@ internal static MachineLearningFeatureStoreEntityVersionProperties DeserializeMa serializedAdditionalRawData = rawDataDictionary; return new MachineLearningFeatureStoreEntityVersionProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - isAnonymous, isArchived, + isAnonymous, indexColumns ?? new ChangeTrackingList(), - provisioningState, - stage); + stage, + provisioningState); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.cs index afd396d737a0c..f7bf570ebd665 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureStoreEntityVersionProperties.cs @@ -21,26 +21,26 @@ public MachineLearningFeatureStoreEntityVersionProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// If the name version are system generated (anonymous registration). /// Is the asset archived?. + /// If the name version are system generated (anonymous registration). /// Specifies index columns. - /// Provisioning state for the featurestore entity version. /// Specifies the asset stage. - internal MachineLearningFeatureStoreEntityVersionProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isAnonymous, bool? isArchived, IList indexColumns, RegistryAssetProvisioningState? provisioningState, string stage) : base(description, properties, tags, serializedAdditionalRawData, isAnonymous, isArchived) + /// Provisioning state for the featurestore entity version. + internal MachineLearningFeatureStoreEntityVersionProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, bool? isAnonymous, IList indexColumns, string stage, RegistryAssetProvisioningState? provisioningState) : base(description, tags, properties, serializedAdditionalRawData, isArchived, isAnonymous) { IndexColumns = indexColumns; - ProvisioningState = provisioningState; Stage = stage; + ProvisioningState = provisioningState; } /// Specifies index columns. public IList IndexColumns { get; set; } - /// Provisioning state for the featurestore entity version. - public RegistryAssetProvisioningState? ProvisioningState { get; } /// Specifies the asset stage. public string Stage { get; set; } + /// Provisioning state for the featurestore entity version. + public RegistryAssetProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowAutoLogger.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowAutoLogger.cs deleted file mode 100644 index a65f590ef0737..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowAutoLogger.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Indicates whether mlflow autologger is enabled for notebooks. - public readonly partial struct MachineLearningFlowAutoLogger : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MachineLearningFlowAutoLogger(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static MachineLearningFlowAutoLogger Enabled { get; } = new MachineLearningFlowAutoLogger(EnabledValue); - /// Disabled. - public static MachineLearningFlowAutoLogger Disabled { get; } = new MachineLearningFlowAutoLogger(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(MachineLearningFlowAutoLogger left, MachineLearningFlowAutoLogger right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MachineLearningFlowAutoLogger left, MachineLearningFlowAutoLogger right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MachineLearningFlowAutoLogger(string value) => new MachineLearningFlowAutoLogger(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MachineLearningFlowAutoLogger other && Equals(other); - /// - public bool Equals(MachineLearningFlowAutoLogger 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobInput.Serialization.cs index ae5e504c3bc19..d3cabba2839ae 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobInput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobInput.Serialization.cs @@ -26,13 +26,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteStartObject(); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); writer.WriteStringValue(Mode.Value.ToString()); } - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -45,8 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNull("description"); } } - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -85,14 +85,19 @@ internal static MachineLearningFlowModelJobInput DeserializeMachineLearningFlowM { return null; } - MachineLearningInputDeliveryMode? mode = default; Uri uri = default; - string description = default; + MachineLearningInputDeliveryMode? mode = default; JobInputType jobInputType = default; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("uri"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -102,9 +107,9 @@ internal static MachineLearningFlowModelJobInput DeserializeMachineLearningFlowM mode = new MachineLearningInputDeliveryMode(property.Value.GetString()); continue; } - if (property.NameEquals("uri"u8)) + if (property.NameEquals("jobInputType"u8)) { - uri = new Uri(property.Value.GetString()); + jobInputType = new JobInputType(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -117,18 +122,13 @@ internal static MachineLearningFlowModelJobInput DeserializeMachineLearningFlowM description = property.Value.GetString(); continue; } - if (property.NameEquals("jobInputType"u8)) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningFlowModelJobInput(description, jobInputType, serializedAdditionalRawData, mode, uri); + return new MachineLearningFlowModelJobInput(jobInputType, description, serializedAdditionalRawData, uri, mode); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobInput.cs index dcbaaac2469b6..fc86f5092eddc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobInput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobInput.cs @@ -25,15 +25,15 @@ public MachineLearningFlowModelJobInput(Uri uri) } /// Initializes a new instance of . - /// Description for the input. /// [Required] Specifies the type of job. + /// Description for the input. /// Keeps track of any properties unknown to the library. - /// Input Asset Delivery Mode. /// [Required] Input Asset URI. - internal MachineLearningFlowModelJobInput(string description, JobInputType jobInputType, IDictionary serializedAdditionalRawData, MachineLearningInputDeliveryMode? mode, Uri uri) : base(description, jobInputType, serializedAdditionalRawData) + /// Input Asset Delivery Mode. + internal MachineLearningFlowModelJobInput(JobInputType jobInputType, string description, IDictionary serializedAdditionalRawData, Uri uri, MachineLearningInputDeliveryMode? mode) : base(jobInputType, description, serializedAdditionalRawData) { - Mode = mode; Uri = uri; + Mode = mode; JobInputType = jobInputType; } @@ -42,9 +42,9 @@ internal MachineLearningFlowModelJobInput() { } - /// Input Asset Delivery Mode. - public MachineLearningInputDeliveryMode? Mode { get; set; } /// [Required] Input Asset URI. public Uri Uri { get; set; } + /// Input Asset Delivery Mode. + public MachineLearningInputDeliveryMode? Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.Serialization.cs index e6204bcdacb38..638c58cf1ca46 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"u8); - writer.WriteStringValue(Mode.Value.ToString()); - } if (Optional.IsDefined(Uri)) { if (Uri != null) @@ -43,6 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("uri"); } } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("jobOutputType"u8); + writer.WriteStringValue(JobOutputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -55,8 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("description"); } } - writer.WritePropertyName("jobOutputType"u8); - writer.WriteStringValue(JobOutputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -95,31 +95,36 @@ internal static MachineLearningFlowModelJobOutput DeserializeMachineLearningFlow { return null; } - MachineLearningOutputDeliveryMode? mode = default; Uri uri = default; - string description = default; + MachineLearningOutputDeliveryMode? mode = default; JobOutputType jobOutputType = default; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("mode"u8)) + if (property.NameEquals("uri"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + uri = null; continue; } - mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + uri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("uri"u8)) + if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - uri = null; continue; } - uri = new Uri(property.Value.GetString()); + mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("jobOutputType"u8)) + { + jobOutputType = new JobOutputType(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -132,18 +137,13 @@ internal static MachineLearningFlowModelJobOutput DeserializeMachineLearningFlow description = property.Value.GetString(); continue; } - if (property.NameEquals("jobOutputType"u8)) - { - jobOutputType = new JobOutputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningFlowModelJobOutput(description, jobOutputType, serializedAdditionalRawData, mode, uri); + return new MachineLearningFlowModelJobOutput(jobOutputType, description, serializedAdditionalRawData, uri, mode); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.cs index b18089ed79179..3d440aedb2010 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.cs @@ -20,21 +20,21 @@ public MachineLearningFlowModelJobOutput() } /// Initializes a new instance of . - /// Description for the output. /// [Required] Specifies the type of job. + /// Description for the output. /// Keeps track of any properties unknown to the library. - /// Output Asset Delivery Mode. /// Output Asset URI. - internal MachineLearningFlowModelJobOutput(string description, JobOutputType jobOutputType, IDictionary serializedAdditionalRawData, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType, serializedAdditionalRawData) + /// Output Asset Delivery Mode. + internal MachineLearningFlowModelJobOutput(JobOutputType jobOutputType, string description, IDictionary serializedAdditionalRawData, Uri uri, MachineLearningOutputDeliveryMode? mode) : base(jobOutputType, description, serializedAdditionalRawData) { - Mode = mode; Uri = uri; + Mode = mode; JobOutputType = jobOutputType; } - /// Output Asset Delivery Mode. - public MachineLearningOutputDeliveryMode? Mode { get; set; } /// Output Asset URI. public Uri Uri { get; set; } + /// Output Asset Delivery Mode. + public MachineLearningOutputDeliveryMode? Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.Serialization.cs index 6af5eaf4ad9b6..b39d1653ac4be 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.Serialization.cs @@ -26,6 +26,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteStartObject(); + if (Optional.IsDefined(PrimaryMetric)) + { + writer.WritePropertyName("primaryMetric"u8); + writer.WriteStringValue(PrimaryMetric.Value.ToString()); + } if (Optional.IsDefined(ForecastingSettings)) { if (ForecastingSettings != null) @@ -38,11 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteNull("forecastingSettings"); } } - if (Optional.IsDefined(PrimaryMetric)) - { - writer.WritePropertyName("primaryMetric"u8); - writer.WriteStringValue(PrimaryMetric.Value.ToString()); - } if (Optional.IsDefined(TrainingSettings)) { if (TrainingSettings != null) @@ -55,35 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteNull("trainingSettings"); } } - if (Optional.IsCollectionDefined(CvSplitColumnNames)) - { - if (CvSplitColumnNames != null) - { - writer.WritePropertyName("cvSplitColumnNames"u8); - writer.WriteStartArray(); - foreach (var item in CvSplitColumnNames) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("cvSplitColumnNames"); - } - } - if (Optional.IsDefined(FeaturizationSettings)) - { - if (FeaturizationSettings != null) - { - writer.WritePropertyName("featurizationSettings"u8); - writer.WriteObjectValue(FeaturizationSettings, options); - } - else - { - writer.WriteNull("featurizationSettings"); - } - } if (Optional.IsDefined(LimitSettings)) { if (LimitSettings != null) @@ -108,28 +79,33 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteNull("nCrossValidations"); } } - if (Optional.IsDefined(TestData)) + if (Optional.IsCollectionDefined(CvSplitColumnNames)) { - if (TestData != null) + if (CvSplitColumnNames != null) { - writer.WritePropertyName("testData"u8); - writer.WriteObjectValue(TestData, options); + writer.WritePropertyName("cvSplitColumnNames"u8); + writer.WriteStartArray(); + foreach (var item in CvSplitColumnNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } else { - writer.WriteNull("testData"); + writer.WriteNull("cvSplitColumnNames"); } } - if (Optional.IsDefined(TestDataSize)) + if (Optional.IsDefined(WeightColumnName)) { - if (TestDataSize != null) + if (WeightColumnName != null) { - writer.WritePropertyName("testDataSize"u8); - writer.WriteNumberValue(TestDataSize.Value); + writer.WritePropertyName("weightColumnName"u8); + writer.WriteStringValue(WeightColumnName); } else { - writer.WriteNull("testDataSize"); + writer.WriteNull("weightColumnName"); } } if (Optional.IsDefined(ValidationData)) @@ -144,6 +120,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteNull("validationData"); } } + if (Optional.IsDefined(TestData)) + { + if (TestData != null) + { + writer.WritePropertyName("testData"u8); + writer.WriteObjectValue(TestData, options); + } + else + { + writer.WriteNull("testData"); + } + } if (Optional.IsDefined(ValidationDataSize)) { if (ValidationDataSize != null) @@ -156,23 +144,39 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteNull("validationDataSize"); } } - if (Optional.IsDefined(WeightColumnName)) + if (Optional.IsDefined(TestDataSize)) { - if (WeightColumnName != null) + if (TestDataSize != null) { - writer.WritePropertyName("weightColumnName"u8); - writer.WriteStringValue(WeightColumnName); + writer.WritePropertyName("testDataSize"u8); + writer.WriteNumberValue(TestDataSize.Value); } else { - writer.WriteNull("weightColumnName"); + writer.WriteNull("testDataSize"); + } + } + if (Optional.IsDefined(FeaturizationSettings)) + { + if (FeaturizationSettings != null) + { + writer.WritePropertyName("featurizationSettings"u8); + writer.WriteObjectValue(FeaturizationSettings, options); + } + else + { + writer.WriteNull("featurizationSettings"); } } + writer.WritePropertyName("taskType"u8); + writer.WriteStringValue(TaskType.ToString()); if (Optional.IsDefined(LogVerbosity)) { writer.WritePropertyName("logVerbosity"u8); writer.WriteStringValue(LogVerbosity.Value.ToString()); } + writer.WritePropertyName("trainingData"u8); + writer.WriteObjectValue(TrainingData, options); if (Optional.IsDefined(TargetColumnName)) { if (TargetColumnName != null) @@ -185,10 +189,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteNull("targetColumnName"); } } - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -227,43 +227,43 @@ internal static MachineLearningForecasting DeserializeMachineLearningForecasting { return null; } - ForecastingSettings forecastingSettings = default; ForecastingPrimaryMetric? primaryMetric = default; + ForecastingSettings forecastingSettings = default; ForecastingTrainingSettings trainingSettings = default; - IList cvSplitColumnNames = default; - TableVerticalFeaturizationSettings featurizationSettings = default; TableVerticalLimitSettings limitSettings = default; NCrossValidations nCrossValidations = default; - MachineLearningTableJobInput testData = default; - double? testDataSize = default; + IList cvSplitColumnNames = default; + string weightColumnName = default; MachineLearningTableJobInput validationData = default; + MachineLearningTableJobInput testData = default; double? validationDataSize = default; - string weightColumnName = default; - MachineLearningLogVerbosity? logVerbosity = default; - string targetColumnName = default; + double? testDataSize = default; + TableVerticalFeaturizationSettings featurizationSettings = default; TaskType taskType = default; + MachineLearningLogVerbosity? logVerbosity = default; MachineLearningTableJobInput trainingData = default; + string targetColumnName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("forecastingSettings"u8)) + if (property.NameEquals("primaryMetric"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - forecastingSettings = null; continue; } - forecastingSettings = ForecastingSettings.DeserializeForecastingSettings(property.Value, options); + primaryMetric = new ForecastingPrimaryMetric(property.Value.GetString()); continue; } - if (property.NameEquals("primaryMetric"u8)) + if (property.NameEquals("forecastingSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + forecastingSettings = null; continue; } - primaryMetric = new ForecastingPrimaryMetric(property.Value.GetString()); + forecastingSettings = ForecastingSettings.DeserializeForecastingSettings(property.Value, options); continue; } if (property.NameEquals("trainingSettings"u8)) @@ -276,49 +276,59 @@ internal static MachineLearningForecasting DeserializeMachineLearningForecasting trainingSettings = ForecastingTrainingSettings.DeserializeForecastingTrainingSettings(property.Value, options); continue; } - if (property.NameEquals("cvSplitColumnNames"u8)) + if (property.NameEquals("limitSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - cvSplitColumnNames = null; + limitSettings = null; continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + limitSettings = TableVerticalLimitSettings.DeserializeTableVerticalLimitSettings(property.Value, options); + continue; + } + if (property.NameEquals("nCrossValidations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) { - array.Add(item.GetString()); + nCrossValidations = null; + continue; } - cvSplitColumnNames = array; + nCrossValidations = NCrossValidations.DeserializeNCrossValidations(property.Value, options); continue; } - if (property.NameEquals("featurizationSettings"u8)) + if (property.NameEquals("cvSplitColumnNames"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - featurizationSettings = null; + cvSplitColumnNames = null; continue; } - featurizationSettings = TableVerticalFeaturizationSettings.DeserializeTableVerticalFeaturizationSettings(property.Value, options); + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + cvSplitColumnNames = array; continue; } - if (property.NameEquals("limitSettings"u8)) + if (property.NameEquals("weightColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - limitSettings = null; + weightColumnName = null; continue; } - limitSettings = TableVerticalLimitSettings.DeserializeTableVerticalLimitSettings(property.Value, options); + weightColumnName = property.Value.GetString(); continue; } - if (property.NameEquals("nCrossValidations"u8)) + if (property.NameEquals("validationData"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - nCrossValidations = null; + validationData = null; continue; } - nCrossValidations = NCrossValidations.DeserializeNCrossValidations(property.Value, options); + validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); continue; } if (property.NameEquals("testData"u8)) @@ -331,44 +341,39 @@ internal static MachineLearningForecasting DeserializeMachineLearningForecasting testData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); continue; } - if (property.NameEquals("testDataSize"u8)) + if (property.NameEquals("validationDataSize"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - testDataSize = null; + validationDataSize = null; continue; } - testDataSize = property.Value.GetDouble(); + validationDataSize = property.Value.GetDouble(); continue; } - if (property.NameEquals("validationData"u8)) + if (property.NameEquals("testDataSize"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - validationData = null; + testDataSize = null; continue; } - validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); + testDataSize = property.Value.GetDouble(); continue; } - if (property.NameEquals("validationDataSize"u8)) + if (property.NameEquals("featurizationSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - validationDataSize = null; + featurizationSettings = null; continue; } - validationDataSize = property.Value.GetDouble(); + featurizationSettings = TableVerticalFeaturizationSettings.DeserializeTableVerticalFeaturizationSettings(property.Value, options); continue; } - if (property.NameEquals("weightColumnName"u8)) + if (property.NameEquals("taskType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - weightColumnName = null; - continue; - } - weightColumnName = property.Value.GetString(); + taskType = new TaskType(property.Value.GetString()); continue; } if (property.NameEquals("logVerbosity"u8)) @@ -380,6 +385,11 @@ internal static MachineLearningForecasting DeserializeMachineLearningForecasting logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } + if (property.NameEquals("trainingData"u8)) + { + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); + continue; + } if (property.NameEquals("targetColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -390,16 +400,6 @@ internal static MachineLearningForecasting DeserializeMachineLearningForecasting targetColumnName = property.Value.GetString(); continue; } - if (property.NameEquals("taskType"u8)) - { - taskType = new TaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData"u8)) - { - trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -407,23 +407,23 @@ internal static MachineLearningForecasting DeserializeMachineLearningForecasting } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningForecasting( - logVerbosity, - targetColumnName, taskType, + logVerbosity, trainingData, + targetColumnName, serializedAdditionalRawData, - forecastingSettings, primaryMetric, + forecastingSettings, trainingSettings, - cvSplitColumnNames ?? new ChangeTrackingList(), - featurizationSettings, limitSettings, nCrossValidations, - testData, - testDataSize, + cvSplitColumnNames ?? new ChangeTrackingList(), + weightColumnName, validationData, + testData, validationDataSize, - weightColumnName); + testDataSize, + featurizationSettings); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.cs index 0cafad244c9f0..b84d5b6839fb7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningForecasting.cs @@ -25,19 +25,17 @@ public MachineLearningForecasting(MachineLearningTableJobInput trainingData) : b } /// Initializes a new instance of . + /// [Required] Task type for AutoMLJob. /// Log verbosity for the job. + /// [Required] Training data input. /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. /// Keeps track of any properties unknown to the library. - /// Forecasting task specific inputs. /// Primary metric for forecasting task. + /// Forecasting task specific inputs. /// Inputs for training phase for an AutoML Job. - /// Columns to use for CVSplit data. - /// Featurization inputs needed for AutoML job. /// Execution constraints for AutoMLJob. /// /// Number of cross validation folds to be applied on training dataset @@ -45,33 +43,35 @@ public MachineLearningForecasting(MachineLearningTableJobInput trainingData) : b /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// + /// Columns to use for CVSplit data. + /// The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. + /// Validation data inputs. /// Test data input. - /// - /// The fraction of test dataset that needs to be set aside for validation purpose. + /// + /// The fraction of training dataset that needs to be set aside for validation purpose. /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - /// Validation data inputs. - /// - /// The fraction of training dataset that needs to be set aside for validation purpose. + /// + /// The fraction of test dataset that needs to be set aside for validation purpose. /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - /// The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. - internal MachineLearningForecasting(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, IDictionary serializedAdditionalRawData, ForecastingSettings forecastingSettings, ForecastingPrimaryMetric? primaryMetric, ForecastingTrainingSettings trainingSettings, IList cvSplitColumnNames, TableVerticalFeaturizationSettings featurizationSettings, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, MachineLearningTableJobInput testData, double? testDataSize, MachineLearningTableJobInput validationData, double? validationDataSize, string weightColumnName) : base(logVerbosity, targetColumnName, taskType, trainingData, serializedAdditionalRawData) + /// Featurization inputs needed for AutoML job. + internal MachineLearningForecasting(TaskType taskType, MachineLearningLogVerbosity? logVerbosity, MachineLearningTableJobInput trainingData, string targetColumnName, IDictionary serializedAdditionalRawData, ForecastingPrimaryMetric? primaryMetric, ForecastingSettings forecastingSettings, ForecastingTrainingSettings trainingSettings, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, IList cvSplitColumnNames, string weightColumnName, MachineLearningTableJobInput validationData, MachineLearningTableJobInput testData, double? validationDataSize, double? testDataSize, TableVerticalFeaturizationSettings featurizationSettings) : base(taskType, logVerbosity, trainingData, targetColumnName, serializedAdditionalRawData) { - ForecastingSettings = forecastingSettings; PrimaryMetric = primaryMetric; + ForecastingSettings = forecastingSettings; TrainingSettings = trainingSettings; - CvSplitColumnNames = cvSplitColumnNames; - FeaturizationSettings = featurizationSettings; LimitSettings = limitSettings; NCrossValidations = nCrossValidations; - TestData = testData; - TestDataSize = testDataSize; + CvSplitColumnNames = cvSplitColumnNames; + WeightColumnName = weightColumnName; ValidationData = validationData; + TestData = testData; ValidationDataSize = validationDataSize; - WeightColumnName = weightColumnName; + TestDataSize = testDataSize; + FeaturizationSettings = featurizationSettings; TaskType = taskType; } @@ -80,16 +80,12 @@ internal MachineLearningForecasting() { } - /// Forecasting task specific inputs. - public ForecastingSettings ForecastingSettings { get; set; } /// Primary metric for forecasting task. public ForecastingPrimaryMetric? PrimaryMetric { get; set; } + /// Forecasting task specific inputs. + public ForecastingSettings ForecastingSettings { get; set; } /// Inputs for training phase for an AutoML Job. public ForecastingTrainingSettings TrainingSettings { get; set; } - /// Columns to use for CVSplit data. - public IList CvSplitColumnNames { get; set; } - /// Featurization inputs needed for AutoML job. - public TableVerticalFeaturizationSettings FeaturizationSettings { get; set; } /// Execution constraints for AutoMLJob. public TableVerticalLimitSettings LimitSettings { get; set; } /// @@ -99,23 +95,27 @@ internal MachineLearningForecasting() /// The available derived classes include and . /// public NCrossValidations NCrossValidations { get; set; } + /// Columns to use for CVSplit data. + public IList CvSplitColumnNames { get; set; } + /// The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. + public string WeightColumnName { get; set; } + /// Validation data inputs. + public MachineLearningTableJobInput ValidationData { get; set; } /// Test data input. public MachineLearningTableJobInput TestData { get; set; } /// - /// The fraction of test dataset that needs to be set aside for validation purpose. + /// The fraction of training dataset that needs to be set aside for validation purpose. /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - public double? TestDataSize { get; set; } - /// Validation data inputs. - public MachineLearningTableJobInput ValidationData { get; set; } + public double? ValidationDataSize { get; set; } /// - /// The fraction of training dataset that needs to be set aside for validation purpose. + /// The fraction of test dataset that needs to be set aside for validation purpose. /// Values between (0.0 , 1.0) /// Applied when validation dataset is not provided. /// - public double? ValidationDataSize { get; set; } - /// The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down. - public string WeightColumnName { get; set; } + public double? TestDataSize { get; set; } + /// Featurization inputs needed for AutoML job. + public TableVerticalFeaturizationSettings FeaturizationSettings { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.cs index 0a93a9f292370..2ebb0d95c6e19 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Property bag for FQDN endpoints result. + /// The MachineLearningFqdnEndpoints. public partial class MachineLearningFqdnEndpoints { /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobInput.Serialization.cs index c99771fb76edd..62d86b9260b5c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobInput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobInput.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteStartObject(); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -38,8 +40,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNull("description"); } } - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobInput.cs index 206fe530d5f63..3098ad5ba8266 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobInput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobInput.cs @@ -55,19 +55,19 @@ protected MachineLearningJobInput() } /// Initializes a new instance of . - /// Description for the input. /// [Required] Specifies the type of job. + /// Description for the input. /// Keeps track of any properties unknown to the library. - internal MachineLearningJobInput(string description, JobInputType jobInputType, IDictionary serializedAdditionalRawData) + internal MachineLearningJobInput(JobInputType jobInputType, string description, IDictionary serializedAdditionalRawData) { - Description = description; JobInputType = jobInputType; + Description = description; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Description for the input. - public string Description { get; set; } /// [Required] Specifies the type of job. internal JobInputType JobInputType { get; set; } + /// Description for the input. + public string Description { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobOutput.Serialization.cs index 4f65b2f0d04e9..8ba2396f31891 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobOutput.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } writer.WriteStartObject(); + writer.WritePropertyName("jobOutputType"u8); + writer.WriteStringValue(JobOutputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -38,8 +40,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteNull("description"); } } - writer.WritePropertyName("jobOutputType"u8); - writer.WriteStringValue(JobOutputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobOutput.cs index 172a018d28387..f0af41748e241 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobOutput.cs @@ -55,19 +55,19 @@ protected MachineLearningJobOutput() } /// Initializes a new instance of . - /// Description for the output. /// [Required] Specifies the type of job. + /// Description for the output. /// Keeps track of any properties unknown to the library. - internal MachineLearningJobOutput(string description, JobOutputType jobOutputType, IDictionary serializedAdditionalRawData) + internal MachineLearningJobOutput(JobOutputType jobOutputType, string description, IDictionary serializedAdditionalRawData) { - Description = description; JobOutputType = jobOutputType; + Description = description; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Description for the output. - public string Description { get; set; } /// [Required] Specifies the type of job. internal JobOutputType JobOutputType { get; set; } + /// Description for the output. + public string Description { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.Serialization.cs index 2113e2c45b397..8071a3eba8710 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.Serialization.cs @@ -25,46 +25,64 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } writer.WriteStartObject(); - if (Optional.IsDefined(ComponentId)) + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(DisplayName)) { - if (ComponentId != null) + if (DisplayName != null) { - writer.WritePropertyName("componentId"u8); - writer.WriteStringValue(ComponentId); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); } else { - writer.WriteNull("componentId"); + writer.WriteNull("displayName"); } } - if (Optional.IsDefined(ComputeId)) + if (options.Format != "W" && Optional.IsDefined(Status)) { - if (ComputeId != null) + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + } + if (Optional.IsCollectionDefined(Services)) + { + if (Services != null) { - writer.WritePropertyName("computeId"u8); - writer.WriteStringValue(ComputeId); + writer.WritePropertyName("services"u8); + writer.WriteStartObject(); + foreach (var item in Services) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); } else { - writer.WriteNull("computeId"); + writer.WriteNull("services"); } } - if (Optional.IsDefined(DisplayName)) + if (Optional.IsDefined(ComputeId)) { - if (DisplayName != null) + if (ComputeId != null) { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); + writer.WritePropertyName("computeId"u8); + writer.WriteStringValue(ComputeId); } else { - writer.WriteNull("displayName"); + writer.WriteNull("computeId"); } } - if (Optional.IsDefined(ExperimentName)) + if (Optional.IsDefined(IsArchived)) { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); } if (Optional.IsDefined(Identity)) { @@ -78,48 +96,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteNull("identity"); } } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"u8); - writer.WriteBooleanValue(IsArchived.Value); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsDefined(NotificationSetting)) + if (Optional.IsDefined(ComponentId)) { - if (NotificationSetting != null) + if (ComponentId != null) { - writer.WritePropertyName("notificationSetting"u8); - writer.WriteObjectValue(NotificationSetting, options); + writer.WritePropertyName("componentId"u8); + writer.WriteStringValue(ComponentId); } else { - writer.WriteNull("notificationSetting"); + writer.WriteNull("componentId"); } } - if (Optional.IsCollectionDefined(Services)) + if (Optional.IsDefined(NotificationSetting)) { - if (Services != null) + if (NotificationSetting != null) { - writer.WritePropertyName("services"u8); - writer.WriteStartObject(); - foreach (var item in Services) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting, options); } else { - writer.WriteNull("services"); + writer.WriteNull("notificationSetting"); } } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } if (Optional.IsDefined(Description)) { if (Description != null) @@ -132,13 +132,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -147,16 +147,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -165,7 +165,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -212,7 +212,6 @@ internal static MachineLearningJobProperties DeserializeMachineLearningJobProper { case "AutoML": return AutoMLJob.DeserializeAutoMLJob(element, options); case "Command": return MachineLearningCommandJob.DeserializeMachineLearningCommandJob(element, options); - case "FineTuning": return FineTuningJob.DeserializeFineTuningJob(element, options); case "Pipeline": return MachineLearningPipelineJob.DeserializeMachineLearningPipelineJob(element, options); case "Spark": return SparkJob.DeserializeSparkJob(element, options); case "Sweep": return MachineLearningSweepJob.DeserializeMachineLearningSweepJob(element, options); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.cs index 9efd9ba16b9bd..7c13212e09c7f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// Base definition for a job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . + /// The available derived classes include , , , and . /// public partial class MachineLearningJobProperties : MachineLearningResourceBase { @@ -26,68 +26,68 @@ public MachineLearningJobProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. + /// [Required] Specifies the type of job. /// Display name of job. + /// Status of the job. /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// ARM resource ID of the compute resource. + /// Is the asset archived?. /// /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. /// Defaults to AmlToken if null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// Is the asset archived?. - /// [Required] Specifies the type of job. + /// ARM resource ID of the component resource. /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. - internal MachineLearningJobProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary services, MachineLearningJobStatus? status) : base(description, properties, tags, serializedAdditionalRawData) + internal MachineLearningJobProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, JobType jobType, string displayName, MachineLearningJobStatus? status, string experimentName, IDictionary services, ResourceIdentifier computeId, bool? isArchived, MachineLearningIdentityConfiguration identity, ResourceIdentifier componentId, NotificationSetting notificationSetting) : base(description, tags, properties, serializedAdditionalRawData) { - ComponentId = componentId; - ComputeId = computeId; + JobType = jobType; DisplayName = displayName; + Status = status; ExperimentName = experimentName; - Identity = identity; + Services = services; + ComputeId = computeId; IsArchived = isArchived; - JobType = jobType; + Identity = identity; + ComponentId = componentId; NotificationSetting = notificationSetting; - Services = services; - Status = status; } - /// ARM resource ID of the component resource. - public ResourceIdentifier ComponentId { get; set; } - /// ARM resource ID of the compute resource. - public ResourceIdentifier ComputeId { get; set; } + /// [Required] Specifies the type of job. + internal JobType JobType { get; set; } /// Display name of job. public string DisplayName { get; set; } + /// Status of the job. + public MachineLearningJobStatus? Status { get; } /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. public string ExperimentName { get; set; } /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + public IDictionary Services { get; set; } + /// ARM resource ID of the compute resource. + public ResourceIdentifier ComputeId { get; set; } + /// Is the asset archived?. + public bool? IsArchived { get; set; } + /// /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. /// Defaults to AmlToken if null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// public MachineLearningIdentityConfiguration Identity { get; set; } - /// Is the asset archived?. - public bool? IsArchived { get; set; } - /// [Required] Specifies the type of job. - internal JobType JobType { get; set; } + /// ARM resource ID of the component resource. + public ResourceIdentifier ComponentId { get; set; } /// Notification setting for the job. public NotificationSetting NotificationSetting { get; set; } - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - public IDictionary Services { get; set; } - /// Status of the job. - public MachineLearningJobStatus? Status { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.Serialization.cs index 7566763378f8b..cd5bcce6d3684 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.Serialization.cs @@ -26,6 +26,11 @@ void IJsonModel.Write(Utf8JsonWriter wr } writer.WriteStartObject(); + if (Optional.IsDefined(ShmSize)) + { + writer.WritePropertyName("shmSize"u8); + writer.WriteStringValue(ShmSize); + } if (Optional.IsDefined(DockerArgs)) { if (DockerArgs != null) @@ -38,11 +43,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteNull("dockerArgs"); } } - if (Optional.IsDefined(ShmSize)) - { - writer.WritePropertyName("shmSize"u8); - writer.WriteStringValue(ShmSize); - } if (Optional.IsDefined(InstanceCount)) { writer.WritePropertyName("instanceCount"u8); @@ -128,8 +128,8 @@ internal static MachineLearningJobResourceConfiguration DeserializeMachineLearni { return null; } - string dockerArgs = default; string shmSize = default; + string dockerArgs = default; int? instanceCount = default; string instanceType = default; IDictionary properties = default; @@ -137,6 +137,11 @@ internal static MachineLearningJobResourceConfiguration DeserializeMachineLearni Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("shmSize"u8)) + { + shmSize = property.Value.GetString(); + continue; + } if (property.NameEquals("dockerArgs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -147,11 +152,6 @@ internal static MachineLearningJobResourceConfiguration DeserializeMachineLearni dockerArgs = property.Value.GetString(); continue; } - if (property.NameEquals("shmSize"u8)) - { - shmSize = property.Value.GetString(); - continue; - } if (property.NameEquals("instanceCount"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -204,8 +204,8 @@ internal static MachineLearningJobResourceConfiguration DeserializeMachineLearni instanceType, properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - dockerArgs, - shmSize); + shmSize, + dockerArgs); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.cs index b2950c85222d2..2c7b1f742e006 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.cs @@ -23,17 +23,17 @@ public MachineLearningJobResourceConfiguration() /// Optional type of VM used as supported by the compute target. /// Additional properties bag. /// Keeps track of any properties unknown to the library. - /// Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types. /// Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes). - internal MachineLearningJobResourceConfiguration(int? instanceCount, string instanceType, IDictionary properties, IDictionary serializedAdditionalRawData, string dockerArgs, string shmSize) : base(instanceCount, instanceType, properties, serializedAdditionalRawData) + /// Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types. + internal MachineLearningJobResourceConfiguration(int? instanceCount, string instanceType, IDictionary properties, IDictionary serializedAdditionalRawData, string shmSize, string dockerArgs) : base(instanceCount, instanceType, properties, serializedAdditionalRawData) { - DockerArgs = dockerArgs; ShmSize = shmSize; + DockerArgs = dockerArgs; } - /// Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types. - public string DockerArgs { get; set; } /// Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes). public string ShmSize { get; set; } + /// Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types. + public string DockerArgs { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.cs index 23b52b9e0b7bb..c3441987c6472 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.cs @@ -17,7 +17,7 @@ public partial class MachineLearningJobScheduleAction : MachineLearningScheduleA /// /// [Required] Defines Schedule action definition details. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . + /// The available derived classes include , , , and . /// /// is null. public MachineLearningJobScheduleAction(MachineLearningJobProperties jobDefinition) @@ -34,7 +34,7 @@ public MachineLearningJobScheduleAction(MachineLearningJobProperties jobDefiniti /// /// [Required] Defines Schedule action definition details. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . + /// The available derived classes include , , , and . /// internal MachineLearningJobScheduleAction(ScheduleActionType actionType, IDictionary serializedAdditionalRawData, MachineLearningJobProperties jobDefinition) : base(actionType, serializedAdditionalRawData) { @@ -50,7 +50,7 @@ internal MachineLearningJobScheduleAction() /// /// [Required] Defines Schedule action definition details. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . + /// The available derived classes include , , , and . /// public MachineLearningJobProperties JobDefinition { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.Serialization.cs index 7228b6d9069bd..9632413bd98f2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.Serialization.cs @@ -26,64 +26,64 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteStartObject(); - if (Optional.IsDefined(Endpoint)) + if (Optional.IsDefined(JobServiceType)) { - if (Endpoint != null) + if (JobServiceType != null) { - writer.WritePropertyName("endpoint"u8); - writer.WriteStringValue(Endpoint); + writer.WritePropertyName("jobServiceType"u8); + writer.WriteStringValue(JobServiceType); } else { - writer.WriteNull("endpoint"); + writer.WriteNull("jobServiceType"); } } - if (options.Format != "W" && Optional.IsDefined(ErrorMessage)) + if (Optional.IsDefined(Port)) { - if (ErrorMessage != null) + if (Port != null) { - writer.WritePropertyName("errorMessage"u8); - writer.WriteStringValue(ErrorMessage); + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port.Value); } else { - writer.WriteNull("errorMessage"); + writer.WriteNull("port"); } } - if (Optional.IsDefined(JobServiceType)) + if (Optional.IsDefined(Endpoint)) { - if (JobServiceType != null) + if (Endpoint != null) { - writer.WritePropertyName("jobServiceType"u8); - writer.WriteStringValue(JobServiceType); + writer.WritePropertyName("endpoint"u8); + writer.WriteStringValue(Endpoint); } else { - writer.WriteNull("jobServiceType"); + writer.WriteNull("endpoint"); } } - if (Optional.IsDefined(Nodes)) + if (options.Format != "W" && Optional.IsDefined(Status)) { - if (Nodes != null) + if (Status != null) { - writer.WritePropertyName("nodes"u8); - writer.WriteObjectValue(Nodes, options); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); } else { - writer.WriteNull("nodes"); + writer.WriteNull("status"); } } - if (Optional.IsDefined(Port)) + if (options.Format != "W" && Optional.IsDefined(ErrorMessage)) { - if (Port != null) + if (ErrorMessage != null) { - writer.WritePropertyName("port"u8); - writer.WriteNumberValue(Port.Value); + writer.WritePropertyName("errorMessage"u8); + writer.WriteStringValue(ErrorMessage); } else { - writer.WriteNull("port"); + writer.WriteNull("errorMessage"); } } if (Optional.IsCollectionDefined(Properties)) @@ -104,16 +104,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNull("properties"); } } - if (options.Format != "W" && Optional.IsDefined(Status)) + if (Optional.IsDefined(Nodes)) { - if (Status != null) + if (Nodes != null) { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status); + writer.WritePropertyName("nodes"u8); + writer.WriteObjectValue(Nodes, options); } else { - writer.WriteNull("status"); + writer.WriteNull("nodes"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -154,65 +154,65 @@ internal static MachineLearningJobService DeserializeMachineLearningJobService(J { return null; } - string endpoint = default; - string errorMessage = default; string jobServiceType = default; - JobNodes nodes = default; int? port = default; - IDictionary properties = default; + string endpoint = default; string status = default; + string errorMessage = default; + IDictionary properties = default; + JobNodes nodes = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("endpoint"u8)) + if (property.NameEquals("jobServiceType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - endpoint = null; + jobServiceType = null; continue; } - endpoint = property.Value.GetString(); + jobServiceType = property.Value.GetString(); continue; } - if (property.NameEquals("errorMessage"u8)) + if (property.NameEquals("port"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - errorMessage = null; + port = null; continue; } - errorMessage = property.Value.GetString(); + port = property.Value.GetInt32(); continue; } - if (property.NameEquals("jobServiceType"u8)) + if (property.NameEquals("endpoint"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - jobServiceType = null; + endpoint = null; continue; } - jobServiceType = property.Value.GetString(); + endpoint = property.Value.GetString(); continue; } - if (property.NameEquals("nodes"u8)) + if (property.NameEquals("status"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - nodes = null; + status = null; continue; } - nodes = JobNodes.DeserializeJobNodes(property.Value, options); + status = property.Value.GetString(); continue; } - if (property.NameEquals("port"u8)) + if (property.NameEquals("errorMessage"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - port = null; + errorMessage = null; continue; } - port = property.Value.GetInt32(); + errorMessage = property.Value.GetString(); continue; } if (property.NameEquals("properties"u8)) @@ -230,14 +230,14 @@ internal static MachineLearningJobService DeserializeMachineLearningJobService(J properties = dictionary; continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("nodes"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - status = null; + nodes = null; continue; } - status = property.Value.GetString(); + nodes = JobNodes.DeserializeJobNodes(property.Value, options); continue; } if (options.Format != "W") @@ -247,13 +247,13 @@ internal static MachineLearningJobService DeserializeMachineLearningJobService(J } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningJobService( - endpoint, - errorMessage, jobServiceType, - nodes, port, - properties ?? new ChangeTrackingDictionary(), + endpoint, status, + errorMessage, + properties ?? new ChangeTrackingDictionary(), + nodes, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.cs index e660e21a4c973..518a619b8ff5c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.cs @@ -52,37 +52,43 @@ public MachineLearningJobService() } /// Initializes a new instance of . + /// Endpoint type. + /// Port for endpoint. /// Url for endpoint. + /// Status of endpoint. /// Any error in the service. - /// Endpoint type. + /// Additional properties to set on the endpoint. /// /// Nodes that user would like to start the service on. /// If Nodes is not set or set to null, the service will only be started on leader node. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include . /// - /// Port for endpoint. - /// Additional properties to set on the endpoint. - /// Status of endpoint. /// Keeps track of any properties unknown to the library. - internal MachineLearningJobService(string endpoint, string errorMessage, string jobServiceType, JobNodes nodes, int? port, IDictionary properties, string status, IDictionary serializedAdditionalRawData) + internal MachineLearningJobService(string jobServiceType, int? port, string endpoint, string status, string errorMessage, IDictionary properties, JobNodes nodes, IDictionary serializedAdditionalRawData) { - Endpoint = endpoint; - ErrorMessage = errorMessage; JobServiceType = jobServiceType; - Nodes = nodes; Port = port; - Properties = properties; + Endpoint = endpoint; Status = status; + ErrorMessage = errorMessage; + Properties = properties; + Nodes = nodes; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Endpoint type. + public string JobServiceType { get; set; } + /// Port for endpoint. + public int? Port { get; set; } /// Url for endpoint. public string Endpoint { get; set; } + /// Status of endpoint. + public string Status { get; } /// Any error in the service. public string ErrorMessage { get; } - /// Endpoint type. - public string JobServiceType { get; set; } + /// Additional properties to set on the endpoint. + public IDictionary Properties { get; set; } /// /// Nodes that user would like to start the service on. /// If Nodes is not set or set to null, the service will only be started on leader node. @@ -90,11 +96,5 @@ internal MachineLearningJobService(string endpoint, string errorMessage, string /// The available derived classes include . /// public JobNodes Nodes { get; set; } - /// Port for endpoint. - public int? Port { get; set; } - /// Additional properties to set on the endpoint. - public IDictionary Properties { get; set; } - /// Status of endpoint. - public string Status { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.Serialization.cs index 4bfda2d837f72..8ff0a04ab9071 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.Serialization.cs @@ -38,42 +38,49 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteNull("containerResourceRequirements"); } } - if (Optional.IsDefined(AppInsightsEnabled)) - { - writer.WritePropertyName("appInsightsEnabled"u8); - writer.WriteBooleanValue(AppInsightsEnabled.Value); - } - if (Optional.IsDefined(DataCollector)) + writer.WritePropertyName("endpointComputeType"u8); + writer.WriteStringValue(EndpointComputeType.ToString()); + if (Optional.IsDefined(ScaleSettings)) { - if (DataCollector != null) + if (ScaleSettings != null) { - writer.WritePropertyName("dataCollector"u8); - writer.WriteObjectValue(DataCollector, options); + writer.WritePropertyName("scaleSettings"u8); + writer.WriteObjectValue(ScaleSettings, options); } else { - writer.WriteNull("dataCollector"); + writer.WriteNull("scaleSettings"); } } - if (Optional.IsDefined(EgressPublicNetworkAccess)) + if (Optional.IsDefined(RequestSettings)) { - writer.WritePropertyName("egressPublicNetworkAccess"u8); - writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); + if (RequestSettings != null) + { + writer.WritePropertyName("requestSettings"u8); + writer.WriteObjectValue(RequestSettings, options); + } + else + { + writer.WriteNull("requestSettings"); + } } - writer.WritePropertyName("endpointComputeType"u8); - writer.WriteStringValue(EndpointComputeType.ToString()); - if (Optional.IsDefined(InstanceType)) + if (Optional.IsDefined(ModelMountPath)) { - if (InstanceType != null) + if (ModelMountPath != null) { - writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType); + writer.WritePropertyName("modelMountPath"u8); + writer.WriteStringValue(ModelMountPath); } else { - writer.WriteNull("instanceType"); + writer.WriteNull("modelMountPath"); } } + if (Optional.IsDefined(AppInsightsEnabled)) + { + writer.WritePropertyName("appInsightsEnabled"u8); + writer.WriteBooleanValue(AppInsightsEnabled.Value); + } if (Optional.IsDefined(LivenessProbe)) { if (LivenessProbe != null) @@ -86,93 +93,104 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteNull("livenessProbe"); } } - if (Optional.IsDefined(Model)) + if (Optional.IsDefined(ReadinessProbe)) { - if (Model != null) + if (ReadinessProbe != null) { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WritePropertyName("readinessProbe"u8); + writer.WriteObjectValue(ReadinessProbe, options); } else { - writer.WriteNull("model"); + writer.WriteNull("readinessProbe"); } } - if (Optional.IsDefined(ModelMountPath)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { - if (ModelMountPath != null) + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(InstanceType)) + { + if (InstanceType != null) { - writer.WritePropertyName("modelMountPath"u8); - writer.WriteStringValue(ModelMountPath); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); } else { - writer.WriteNull("modelMountPath"); + writer.WriteNull("instanceType"); } } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(ReadinessProbe)) + if (Optional.IsDefined(Model)) { - if (ReadinessProbe != null) + if (Model != null) { - writer.WritePropertyName("readinessProbe"u8); - writer.WriteObjectValue(ReadinessProbe, options); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } else { - writer.WriteNull("readinessProbe"); + writer.WriteNull("model"); } } - if (Optional.IsDefined(RequestSettings)) + if (Optional.IsDefined(EgressPublicNetworkAccess)) { - if (RequestSettings != null) + writer.WritePropertyName("egressPublicNetworkAccess"u8); + writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); + } + if (Optional.IsDefined(DataCollector)) + { + if (DataCollector != null) { - writer.WritePropertyName("requestSettings"u8); - writer.WriteObjectValue(RequestSettings, options); + writer.WritePropertyName("dataCollector"u8); + writer.WriteObjectValue(DataCollector, options); } else { - writer.WriteNull("requestSettings"); + writer.WriteNull("dataCollector"); } } - if (Optional.IsDefined(ScaleSettings)) + if (Optional.IsDefined(Description)) { - if (ScaleSettings != null) + if (Description != null) { - writer.WritePropertyName("scaleSettings"u8); - writer.WriteObjectValue(ScaleSettings, options); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); } else { - writer.WriteNull("scaleSettings"); + writer.WriteNull("description"); } } - if (Optional.IsDefined(CodeConfiguration)) + if (Optional.IsCollectionDefined(Properties)) { - if (CodeConfiguration != null) + if (Properties != null) { - writer.WritePropertyName("codeConfiguration"u8); - writer.WriteObjectValue(CodeConfiguration, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } else { - writer.WriteNull("codeConfiguration"); + writer.WriteNull("properties"); } } - if (Optional.IsDefined(Description)) + if (Optional.IsDefined(CodeConfiguration)) { - if (Description != null) + if (CodeConfiguration != null) { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); + writer.WritePropertyName("codeConfiguration"u8); + writer.WriteObjectValue(CodeConfiguration, options); } else { - writer.WriteNull("description"); + writer.WriteNull("codeConfiguration"); } } if (Optional.IsDefined(EnvironmentId)) @@ -205,24 +223,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteNull("environmentVariables"); } } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -262,23 +262,23 @@ internal static MachineLearningKubernetesOnlineDeployment DeserializeMachineLear return null; } MachineLearningContainerResourceRequirements containerResourceRequirements = default; - bool? appInsightsEnabled = default; - DataCollector dataCollector = default; - MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default; MachineLearningEndpointComputeType endpointComputeType = default; - string instanceType = default; - MachineLearningProbeSettings livenessProbe = default; - string model = default; + MachineLearningOnlineScaleSettings scaleSettings = default; + MachineLearningOnlineRequestSettings requestSettings = default; string modelMountPath = default; - MachineLearningDeploymentProvisioningState? provisioningState = default; + bool? appInsightsEnabled = default; + MachineLearningProbeSettings livenessProbe = default; MachineLearningProbeSettings readinessProbe = default; - MachineLearningOnlineRequestSettings requestSettings = default; - MachineLearningOnlineScaleSettings scaleSettings = default; - MachineLearningCodeConfiguration codeConfiguration = default; + MachineLearningDeploymentProvisioningState? provisioningState = default; + string instanceType = default; + string model = default; + MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default; + DataCollector dataCollector = default; string description = default; + IDictionary properties = default; + MachineLearningCodeConfiguration codeConfiguration = default; string environmentId = default; IDictionary environmentVariables = default; - IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -293,77 +293,68 @@ internal static MachineLearningKubernetesOnlineDeployment DeserializeMachineLear containerResourceRequirements = MachineLearningContainerResourceRequirements.DeserializeMachineLearningContainerResourceRequirements(property.Value, options); continue; } - if (property.NameEquals("appInsightsEnabled"u8)) + if (property.NameEquals("endpointComputeType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - appInsightsEnabled = property.Value.GetBoolean(); + endpointComputeType = new MachineLearningEndpointComputeType(property.Value.GetString()); continue; } - if (property.NameEquals("dataCollector"u8)) + if (property.NameEquals("scaleSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - dataCollector = null; + scaleSettings = null; continue; } - dataCollector = DataCollector.DeserializeDataCollector(property.Value, options); + scaleSettings = MachineLearningOnlineScaleSettings.DeserializeMachineLearningOnlineScaleSettings(property.Value, options); continue; } - if (property.NameEquals("egressPublicNetworkAccess"u8)) + if (property.NameEquals("requestSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + requestSettings = null; continue; } - egressPublicNetworkAccess = new MachineLearningEgressPublicNetworkAccessType(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpointComputeType"u8)) - { - endpointComputeType = new MachineLearningEndpointComputeType(property.Value.GetString()); + requestSettings = MachineLearningOnlineRequestSettings.DeserializeMachineLearningOnlineRequestSettings(property.Value, options); continue; } - if (property.NameEquals("instanceType"u8)) + if (property.NameEquals("modelMountPath"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - instanceType = null; + modelMountPath = null; continue; } - instanceType = property.Value.GetString(); + modelMountPath = property.Value.GetString(); continue; } - if (property.NameEquals("livenessProbe"u8)) + if (property.NameEquals("appInsightsEnabled"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - livenessProbe = null; continue; } - livenessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value, options); + appInsightsEnabled = property.Value.GetBoolean(); continue; } - if (property.NameEquals("model"u8)) + if (property.NameEquals("livenessProbe"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - model = null; + livenessProbe = null; continue; } - model = property.Value.GetString(); + livenessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value, options); continue; } - if (property.NameEquals("modelMountPath"u8)) + if (property.NameEquals("readinessProbe"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - modelMountPath = null; + readinessProbe = null; continue; } - modelMountPath = property.Value.GetString(); + readinessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value, options); continue; } if (property.NameEquals("provisioningState"u8)) @@ -375,44 +366,43 @@ internal static MachineLearningKubernetesOnlineDeployment DeserializeMachineLear provisioningState = new MachineLearningDeploymentProvisioningState(property.Value.GetString()); continue; } - if (property.NameEquals("readinessProbe"u8)) + if (property.NameEquals("instanceType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - readinessProbe = null; + instanceType = null; continue; } - readinessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value, options); + instanceType = property.Value.GetString(); continue; } - if (property.NameEquals("requestSettings"u8)) + if (property.NameEquals("model"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - requestSettings = null; + model = null; continue; } - requestSettings = MachineLearningOnlineRequestSettings.DeserializeMachineLearningOnlineRequestSettings(property.Value, options); + model = property.Value.GetString(); continue; } - if (property.NameEquals("scaleSettings"u8)) + if (property.NameEquals("egressPublicNetworkAccess"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - scaleSettings = null; continue; } - scaleSettings = MachineLearningOnlineScaleSettings.DeserializeMachineLearningOnlineScaleSettings(property.Value, options); + egressPublicNetworkAccess = new MachineLearningEgressPublicNetworkAccessType(property.Value.GetString()); continue; } - if (property.NameEquals("codeConfiguration"u8)) + if (property.NameEquals("dataCollector"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - codeConfiguration = null; + dataCollector = null; continue; } - codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value, options); + dataCollector = DataCollector.DeserializeDataCollector(property.Value, options); continue; } if (property.NameEquals("description"u8)) @@ -425,36 +415,46 @@ internal static MachineLearningKubernetesOnlineDeployment DeserializeMachineLear description = property.Value.GetString(); continue; } - if (property.NameEquals("environmentId"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - environmentId = null; + properties = null; continue; } - environmentId = property.Value.GetString(); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; continue; } - if (property.NameEquals("environmentVariables"u8)) + if (property.NameEquals("codeConfiguration"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - environmentVariables = null; + codeConfiguration = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("environmentId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) { - dictionary.Add(property0.Name, property0.Value.GetString()); + environmentId = null; + continue; } - environmentVariables = dictionary; + environmentId = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("environmentVariables"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + environmentVariables = null; continue; } Dictionary dictionary = new Dictionary(); @@ -462,7 +462,7 @@ internal static MachineLearningKubernetesOnlineDeployment DeserializeMachineLear { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + environmentVariables = dictionary; continue; } if (options.Format != "W") @@ -472,24 +472,24 @@ internal static MachineLearningKubernetesOnlineDeployment DeserializeMachineLear } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningKubernetesOnlineDeployment( - codeConfiguration, description, + properties ?? new ChangeTrackingDictionary(), + codeConfiguration, environmentId, environmentVariables ?? new ChangeTrackingDictionary(), - properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - appInsightsEnabled, - dataCollector, - egressPublicNetworkAccess, endpointComputeType, - instanceType, - livenessProbe, - model, + scaleSettings, + requestSettings, modelMountPath, - provisioningState, + appInsightsEnabled, + livenessProbe, readinessProbe, - requestSettings, - scaleSettings, + provisioningState, + instanceType, + model, + egressPublicNetworkAccess, + dataCollector, containerResourceRequirements); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.cs index 93a21987e419b..049cf41f7d958 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.cs @@ -20,23 +20,13 @@ public MachineLearningKubernetesOnlineDeployment() } /// Initializes a new instance of . - /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Code configuration for the endpoint deployment. /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. - /// Property dictionary. Properties can be added, but not removed or altered. /// Keeps track of any properties unknown to the library. - /// If true, enables Application Insights logging. - /// The mdc configuration, we disable mdc when it's null. - /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. /// [Required] The compute type of the endpoint. - /// Compute instance type. - /// Liveness probe monitors the health of the container regularly. - /// The URI path to the model. - /// The path to mount the model in custom container. - /// Provisioning state for the endpoint deployment. - /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. - /// Request settings for the deployment. /// /// Scale settings for the deployment. /// If it is null or not provided, @@ -45,8 +35,18 @@ public MachineLearningKubernetesOnlineDeployment() /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// + /// Request settings for the deployment. + /// The path to mount the model in custom container. + /// If true, enables Application Insights logging. + /// Liveness probe monitors the health of the container regularly. + /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. + /// Provisioning state for the endpoint deployment. + /// Compute instance type. + /// The URI path to the model. + /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + /// The mdc configuration, we disable mdc when it's null. /// The resource requirements for the container (cpu and memory). - internal MachineLearningKubernetesOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, IDictionary serializedAdditionalRawData, bool? appInsightsEnabled, DataCollector dataCollector, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, MachineLearningEndpointComputeType endpointComputeType, string instanceType, MachineLearningProbeSettings livenessProbe, string model, string modelMountPath, MachineLearningDeploymentProvisioningState? provisioningState, MachineLearningProbeSettings readinessProbe, MachineLearningOnlineRequestSettings requestSettings, MachineLearningOnlineScaleSettings scaleSettings, MachineLearningContainerResourceRequirements containerResourceRequirements) : base(codeConfiguration, description, environmentId, environmentVariables, properties, serializedAdditionalRawData, appInsightsEnabled, dataCollector, egressPublicNetworkAccess, endpointComputeType, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings) + internal MachineLearningKubernetesOnlineDeployment(string description, IDictionary properties, MachineLearningCodeConfiguration codeConfiguration, string environmentId, IDictionary environmentVariables, IDictionary serializedAdditionalRawData, MachineLearningEndpointComputeType endpointComputeType, MachineLearningOnlineScaleSettings scaleSettings, MachineLearningOnlineRequestSettings requestSettings, string modelMountPath, bool? appInsightsEnabled, MachineLearningProbeSettings livenessProbe, MachineLearningProbeSettings readinessProbe, MachineLearningDeploymentProvisioningState? provisioningState, string instanceType, string model, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, DataCollector dataCollector, MachineLearningContainerResourceRequirements containerResourceRequirements) : base(description, properties, codeConfiguration, environmentId, environmentVariables, serializedAdditionalRawData, endpointComputeType, scaleSettings, requestSettings, modelMountPath, appInsightsEnabled, livenessProbe, readinessProbe, provisioningState, instanceType, model, egressPublicNetworkAccess, dataCollector) { ContainerResourceRequirements = containerResourceRequirements; EndpointComputeType = endpointComputeType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLiteralJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLiteralJobInput.Serialization.cs index 422c6b458f227..d116207d99f42 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLiteralJobInput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLiteralJobInput.Serialization.cs @@ -28,6 +28,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteStringValue(Value); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -40,8 +42,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteNull("description"); } } - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -81,8 +81,8 @@ internal static MachineLearningLiteralJobInput DeserializeMachineLearningLiteral return null; } string value = default; - string description = default; JobInputType jobInputType = default; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -92,6 +92,11 @@ internal static MachineLearningLiteralJobInput DeserializeMachineLearningLiteral value = property.Value.GetString(); continue; } + if (property.NameEquals("jobInputType"u8)) + { + jobInputType = new JobInputType(property.Value.GetString()); + continue; + } if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -102,18 +107,13 @@ internal static MachineLearningLiteralJobInput DeserializeMachineLearningLiteral description = property.Value.GetString(); continue; } - if (property.NameEquals("jobInputType"u8)) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningLiteralJobInput(description, jobInputType, serializedAdditionalRawData, value); + return new MachineLearningLiteralJobInput(jobInputType, description, serializedAdditionalRawData, value); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLiteralJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLiteralJobInput.cs index 06edb0cda0674..d78480f8f50fe 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLiteralJobInput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLiteralJobInput.cs @@ -25,11 +25,11 @@ public MachineLearningLiteralJobInput(string value) } /// Initializes a new instance of . - /// Description for the input. /// [Required] Specifies the type of job. + /// Description for the input. /// Keeps track of any properties unknown to the library. /// [Required] Literal value for the input. - internal MachineLearningLiteralJobInput(string description, JobInputType jobInputType, IDictionary serializedAdditionalRawData, string value) : base(description, jobInputType, serializedAdditionalRawData) + internal MachineLearningLiteralJobInput(JobInputType jobInputType, string description, IDictionary serializedAdditionalRawData, string value) : base(jobInputType, description, serializedAdditionalRawData) { Value = value; JobInputType = jobInputType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.Serialization.cs index b0e178253d690..6b990e7434381 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.Serialization.cs @@ -43,11 +43,6 @@ void IJsonModel.Write writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -63,6 +58,11 @@ void IJsonModel.Write writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -74,16 +74,6 @@ void IJsonModel.Write } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -94,15 +84,15 @@ void IJsonModel.Write } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -146,16 +136,14 @@ internal static MachineLearningManagedIdentityAuthTypeWorkspaceConnection Deseri MachineLearningConnectionAuthType authType = default; MachineLearningConnectionCategory? category = default; ResourceIdentifier createdByWorkspaceArmId = default; - string error = default; DateTimeOffset? expiryTime = default; ConnectionGroup? group = default; bool? isSharedToAll = default; + string target = default; IDictionary metadata = default; - ManagedPERequirement? peRequirement = default; - ManagedPEStatus? peStatus = default; IList sharedUserList = default; - string target = default; - bool? useWorkspaceManagedIdentity = default; + string value = default; + MachineLearningValueFormat? valueFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -192,11 +180,6 @@ internal static MachineLearningManagedIdentityAuthTypeWorkspaceConnection Deseri createdByWorkspaceArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } if (property.NameEquals("expiryTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,6 +207,11 @@ internal static MachineLearningManagedIdentityAuthTypeWorkspaceConnection Deseri isSharedToAll = property.Value.GetBoolean(); continue; } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -238,24 +226,6 @@ internal static MachineLearningManagedIdentityAuthTypeWorkspaceConnection Deseri metadata = dictionary; continue; } - if (property.NameEquals("peRequirement"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peRequirement = new ManagedPERequirement(property.Value.GetString()); - continue; - } - if (property.NameEquals("peStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peStatus = new ManagedPEStatus(property.Value.GetString()); - continue; - } if (property.NameEquals("sharedUserList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -270,18 +240,18 @@ internal static MachineLearningManagedIdentityAuthTypeWorkspaceConnection Deseri sharedUserList = array; continue; } - if (property.NameEquals("target"u8)) + if (property.NameEquals("value"u8)) { - target = property.Value.GetString(); + value = property.Value.GetString(); continue; } - if (property.NameEquals("useWorkspaceManagedIdentity"u8)) + if (property.NameEquals("valueFormat"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - useWorkspaceManagedIdentity = property.Value.GetBoolean(); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } if (options.Format != "W") @@ -294,16 +264,14 @@ internal static MachineLearningManagedIdentityAuthTypeWorkspaceConnection Deseri authType, category, createdByWorkspaceArmId, - error, expiryTime, group, isSharedToAll, + target, metadata ?? new ChangeTrackingDictionary(), - peRequirement, - peStatus, sharedUserList ?? new ChangeTrackingList(), - target, - useWorkspaceManagedIdentity, + value, + valueFormat, serializedAdditionalRawData, credentials); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.cs index 62d1b92848ce5..2fedf624f7a48 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.cs @@ -24,19 +24,17 @@ public MachineLearningManagedIdentityAuthTypeWorkspaceConnection() /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. /// - internal MachineLearningManagedIdentityAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData, MachineLearningWorkspaceConnectionManagedIdentity credentials) : base(authType, category, createdByWorkspaceArmId, error, expiryOn, group, isSharedToAll, metadata, peRequirement, peStatus, sharedUserList, target, useWorkspaceManagedIdentity, serializedAdditionalRawData) + internal MachineLearningManagedIdentityAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData, MachineLearningWorkspaceConnectionManagedIdentity credentials) : base(authType, category, createdByWorkspaceArmId, expiryOn, group, isSharedToAll, target, metadata, sharedUserList, value, valueFormat, serializedAdditionalRawData) { Credentials = credentials; AuthType = authType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.Serialization.cs index ccd682c7494c1..b486f5fc6404b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.Serialization.cs @@ -26,42 +26,49 @@ void IJsonModel.Write(Utf8JsonWriter wri } writer.WriteStartObject(); - if (Optional.IsDefined(AppInsightsEnabled)) - { - writer.WritePropertyName("appInsightsEnabled"u8); - writer.WriteBooleanValue(AppInsightsEnabled.Value); - } - if (Optional.IsDefined(DataCollector)) + writer.WritePropertyName("endpointComputeType"u8); + writer.WriteStringValue(EndpointComputeType.ToString()); + if (Optional.IsDefined(ScaleSettings)) { - if (DataCollector != null) + if (ScaleSettings != null) { - writer.WritePropertyName("dataCollector"u8); - writer.WriteObjectValue(DataCollector, options); + writer.WritePropertyName("scaleSettings"u8); + writer.WriteObjectValue(ScaleSettings, options); } else { - writer.WriteNull("dataCollector"); + writer.WriteNull("scaleSettings"); } } - if (Optional.IsDefined(EgressPublicNetworkAccess)) + if (Optional.IsDefined(RequestSettings)) { - writer.WritePropertyName("egressPublicNetworkAccess"u8); - writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); + if (RequestSettings != null) + { + writer.WritePropertyName("requestSettings"u8); + writer.WriteObjectValue(RequestSettings, options); + } + else + { + writer.WriteNull("requestSettings"); + } } - writer.WritePropertyName("endpointComputeType"u8); - writer.WriteStringValue(EndpointComputeType.ToString()); - if (Optional.IsDefined(InstanceType)) + if (Optional.IsDefined(ModelMountPath)) { - if (InstanceType != null) + if (ModelMountPath != null) { - writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType); + writer.WritePropertyName("modelMountPath"u8); + writer.WriteStringValue(ModelMountPath); } else { - writer.WriteNull("instanceType"); + writer.WriteNull("modelMountPath"); } } + if (Optional.IsDefined(AppInsightsEnabled)) + { + writer.WritePropertyName("appInsightsEnabled"u8); + writer.WriteBooleanValue(AppInsightsEnabled.Value); + } if (Optional.IsDefined(LivenessProbe)) { if (LivenessProbe != null) @@ -74,93 +81,104 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteNull("livenessProbe"); } } - if (Optional.IsDefined(Model)) + if (Optional.IsDefined(ReadinessProbe)) { - if (Model != null) + if (ReadinessProbe != null) { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WritePropertyName("readinessProbe"u8); + writer.WriteObjectValue(ReadinessProbe, options); } else { - writer.WriteNull("model"); + writer.WriteNull("readinessProbe"); } } - if (Optional.IsDefined(ModelMountPath)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { - if (ModelMountPath != null) + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(InstanceType)) + { + if (InstanceType != null) { - writer.WritePropertyName("modelMountPath"u8); - writer.WriteStringValue(ModelMountPath); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); } else { - writer.WriteNull("modelMountPath"); + writer.WriteNull("instanceType"); } } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(ReadinessProbe)) + if (Optional.IsDefined(Model)) { - if (ReadinessProbe != null) + if (Model != null) { - writer.WritePropertyName("readinessProbe"u8); - writer.WriteObjectValue(ReadinessProbe, options); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } else { - writer.WriteNull("readinessProbe"); + writer.WriteNull("model"); } } - if (Optional.IsDefined(RequestSettings)) + if (Optional.IsDefined(EgressPublicNetworkAccess)) { - if (RequestSettings != null) + writer.WritePropertyName("egressPublicNetworkAccess"u8); + writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); + } + if (Optional.IsDefined(DataCollector)) + { + if (DataCollector != null) { - writer.WritePropertyName("requestSettings"u8); - writer.WriteObjectValue(RequestSettings, options); + writer.WritePropertyName("dataCollector"u8); + writer.WriteObjectValue(DataCollector, options); } else { - writer.WriteNull("requestSettings"); + writer.WriteNull("dataCollector"); } } - if (Optional.IsDefined(ScaleSettings)) + if (Optional.IsDefined(Description)) { - if (ScaleSettings != null) + if (Description != null) { - writer.WritePropertyName("scaleSettings"u8); - writer.WriteObjectValue(ScaleSettings, options); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); } else { - writer.WriteNull("scaleSettings"); + writer.WriteNull("description"); } } - if (Optional.IsDefined(CodeConfiguration)) + if (Optional.IsCollectionDefined(Properties)) { - if (CodeConfiguration != null) + if (Properties != null) { - writer.WritePropertyName("codeConfiguration"u8); - writer.WriteObjectValue(CodeConfiguration, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } else { - writer.WriteNull("codeConfiguration"); + writer.WriteNull("properties"); } } - if (Optional.IsDefined(Description)) + if (Optional.IsDefined(CodeConfiguration)) { - if (Description != null) + if (CodeConfiguration != null) { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); + writer.WritePropertyName("codeConfiguration"u8); + writer.WriteObjectValue(CodeConfiguration, options); } else { - writer.WriteNull("description"); + writer.WriteNull("codeConfiguration"); } } if (Optional.IsDefined(EnvironmentId)) @@ -193,24 +211,6 @@ void IJsonModel.Write(Utf8JsonWriter wri writer.WriteNull("environmentVariables"); } } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -249,98 +249,89 @@ internal static MachineLearningManagedOnlineDeployment DeserializeMachineLearnin { return null; } - bool? appInsightsEnabled = default; - DataCollector dataCollector = default; - MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default; MachineLearningEndpointComputeType endpointComputeType = default; - string instanceType = default; - MachineLearningProbeSettings livenessProbe = default; - string model = default; + MachineLearningOnlineScaleSettings scaleSettings = default; + MachineLearningOnlineRequestSettings requestSettings = default; string modelMountPath = default; - MachineLearningDeploymentProvisioningState? provisioningState = default; + bool? appInsightsEnabled = default; + MachineLearningProbeSettings livenessProbe = default; MachineLearningProbeSettings readinessProbe = default; - MachineLearningOnlineRequestSettings requestSettings = default; - MachineLearningOnlineScaleSettings scaleSettings = default; - MachineLearningCodeConfiguration codeConfiguration = default; + MachineLearningDeploymentProvisioningState? provisioningState = default; + string instanceType = default; + string model = default; + MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default; + DataCollector dataCollector = default; string description = default; + IDictionary properties = default; + MachineLearningCodeConfiguration codeConfiguration = default; string environmentId = default; IDictionary environmentVariables = default; - IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("appInsightsEnabled"u8)) + if (property.NameEquals("endpointComputeType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - appInsightsEnabled = property.Value.GetBoolean(); + endpointComputeType = new MachineLearningEndpointComputeType(property.Value.GetString()); continue; } - if (property.NameEquals("dataCollector"u8)) + if (property.NameEquals("scaleSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - dataCollector = null; + scaleSettings = null; continue; } - dataCollector = DataCollector.DeserializeDataCollector(property.Value, options); + scaleSettings = MachineLearningOnlineScaleSettings.DeserializeMachineLearningOnlineScaleSettings(property.Value, options); continue; } - if (property.NameEquals("egressPublicNetworkAccess"u8)) + if (property.NameEquals("requestSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + requestSettings = null; continue; } - egressPublicNetworkAccess = new MachineLearningEgressPublicNetworkAccessType(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpointComputeType"u8)) - { - endpointComputeType = new MachineLearningEndpointComputeType(property.Value.GetString()); + requestSettings = MachineLearningOnlineRequestSettings.DeserializeMachineLearningOnlineRequestSettings(property.Value, options); continue; } - if (property.NameEquals("instanceType"u8)) + if (property.NameEquals("modelMountPath"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - instanceType = null; + modelMountPath = null; continue; } - instanceType = property.Value.GetString(); + modelMountPath = property.Value.GetString(); continue; } - if (property.NameEquals("livenessProbe"u8)) + if (property.NameEquals("appInsightsEnabled"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - livenessProbe = null; continue; } - livenessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value, options); + appInsightsEnabled = property.Value.GetBoolean(); continue; } - if (property.NameEquals("model"u8)) + if (property.NameEquals("livenessProbe"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - model = null; + livenessProbe = null; continue; } - model = property.Value.GetString(); + livenessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value, options); continue; } - if (property.NameEquals("modelMountPath"u8)) + if (property.NameEquals("readinessProbe"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - modelMountPath = null; + readinessProbe = null; continue; } - modelMountPath = property.Value.GetString(); + readinessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value, options); continue; } if (property.NameEquals("provisioningState"u8)) @@ -352,44 +343,43 @@ internal static MachineLearningManagedOnlineDeployment DeserializeMachineLearnin provisioningState = new MachineLearningDeploymentProvisioningState(property.Value.GetString()); continue; } - if (property.NameEquals("readinessProbe"u8)) + if (property.NameEquals("instanceType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - readinessProbe = null; + instanceType = null; continue; } - readinessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value, options); + instanceType = property.Value.GetString(); continue; } - if (property.NameEquals("requestSettings"u8)) + if (property.NameEquals("model"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - requestSettings = null; + model = null; continue; } - requestSettings = MachineLearningOnlineRequestSettings.DeserializeMachineLearningOnlineRequestSettings(property.Value, options); + model = property.Value.GetString(); continue; } - if (property.NameEquals("scaleSettings"u8)) + if (property.NameEquals("egressPublicNetworkAccess"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - scaleSettings = null; continue; } - scaleSettings = MachineLearningOnlineScaleSettings.DeserializeMachineLearningOnlineScaleSettings(property.Value, options); + egressPublicNetworkAccess = new MachineLearningEgressPublicNetworkAccessType(property.Value.GetString()); continue; } - if (property.NameEquals("codeConfiguration"u8)) + if (property.NameEquals("dataCollector"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - codeConfiguration = null; + dataCollector = null; continue; } - codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value, options); + dataCollector = DataCollector.DeserializeDataCollector(property.Value, options); continue; } if (property.NameEquals("description"u8)) @@ -402,36 +392,46 @@ internal static MachineLearningManagedOnlineDeployment DeserializeMachineLearnin description = property.Value.GetString(); continue; } - if (property.NameEquals("environmentId"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - environmentId = null; + properties = null; continue; } - environmentId = property.Value.GetString(); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; continue; } - if (property.NameEquals("environmentVariables"u8)) + if (property.NameEquals("codeConfiguration"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - environmentVariables = null; + codeConfiguration = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("environmentId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) { - dictionary.Add(property0.Name, property0.Value.GetString()); + environmentId = null; + continue; } - environmentVariables = dictionary; + environmentId = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("environmentVariables"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + environmentVariables = null; continue; } Dictionary dictionary = new Dictionary(); @@ -439,7 +439,7 @@ internal static MachineLearningManagedOnlineDeployment DeserializeMachineLearnin { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + environmentVariables = dictionary; continue; } if (options.Format != "W") @@ -449,24 +449,24 @@ internal static MachineLearningManagedOnlineDeployment DeserializeMachineLearnin } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningManagedOnlineDeployment( - codeConfiguration, description, + properties ?? new ChangeTrackingDictionary(), + codeConfiguration, environmentId, environmentVariables ?? new ChangeTrackingDictionary(), - properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - appInsightsEnabled, - dataCollector, - egressPublicNetworkAccess, endpointComputeType, - instanceType, - livenessProbe, - model, + scaleSettings, + requestSettings, modelMountPath, - provisioningState, + appInsightsEnabled, + livenessProbe, readinessProbe, - requestSettings, - scaleSettings); + provisioningState, + instanceType, + model, + egressPublicNetworkAccess, + dataCollector); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.cs index b9dc436df61e4..c0e519b94ab17 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.cs @@ -20,23 +20,13 @@ public MachineLearningManagedOnlineDeployment() } /// Initializes a new instance of . - /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Code configuration for the endpoint deployment. /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. - /// Property dictionary. Properties can be added, but not removed or altered. /// Keeps track of any properties unknown to the library. - /// If true, enables Application Insights logging. - /// The mdc configuration, we disable mdc when it's null. - /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. /// [Required] The compute type of the endpoint. - /// Compute instance type. - /// Liveness probe monitors the health of the container regularly. - /// The URI path to the model. - /// The path to mount the model in custom container. - /// Provisioning state for the endpoint deployment. - /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. - /// Request settings for the deployment. /// /// Scale settings for the deployment. /// If it is null or not provided, @@ -45,7 +35,17 @@ public MachineLearningManagedOnlineDeployment() /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - internal MachineLearningManagedOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, IDictionary serializedAdditionalRawData, bool? appInsightsEnabled, DataCollector dataCollector, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, MachineLearningEndpointComputeType endpointComputeType, string instanceType, MachineLearningProbeSettings livenessProbe, string model, string modelMountPath, MachineLearningDeploymentProvisioningState? provisioningState, MachineLearningProbeSettings readinessProbe, MachineLearningOnlineRequestSettings requestSettings, MachineLearningOnlineScaleSettings scaleSettings) : base(codeConfiguration, description, environmentId, environmentVariables, properties, serializedAdditionalRawData, appInsightsEnabled, dataCollector, egressPublicNetworkAccess, endpointComputeType, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings) + /// Request settings for the deployment. + /// The path to mount the model in custom container. + /// If true, enables Application Insights logging. + /// Liveness probe monitors the health of the container regularly. + /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. + /// Provisioning state for the endpoint deployment. + /// Compute instance type. + /// The URI path to the model. + /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + /// The mdc configuration, we disable mdc when it's null. + internal MachineLearningManagedOnlineDeployment(string description, IDictionary properties, MachineLearningCodeConfiguration codeConfiguration, string environmentId, IDictionary environmentVariables, IDictionary serializedAdditionalRawData, MachineLearningEndpointComputeType endpointComputeType, MachineLearningOnlineScaleSettings scaleSettings, MachineLearningOnlineRequestSettings requestSettings, string modelMountPath, bool? appInsightsEnabled, MachineLearningProbeSettings livenessProbe, MachineLearningProbeSettings readinessProbe, MachineLearningDeploymentProvisioningState? provisioningState, string instanceType, string model, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, DataCollector dataCollector) : base(description, properties, codeConfiguration, environmentId, environmentVariables, serializedAdditionalRawData, endpointComputeType, scaleSettings, requestSettings, modelMountPath, appInsightsEnabled, livenessProbe, readinessProbe, provisioningState, instanceType, model, egressPublicNetworkAccess, dataCollector) { EndpointComputeType = endpointComputeType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.Serialization.cs index ab54a12e53f47..706c44653c3d3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.Serialization.cs @@ -72,13 +72,13 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -87,16 +87,16 @@ void IJsonModel.Write(Utf8JsonWriter wr } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -105,7 +105,7 @@ void IJsonModel.Write(Utf8JsonWriter wr } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -151,8 +151,8 @@ internal static MachineLearningModelContainerProperties DeserializeMachineLearni string latestVersion = default; string nextVersion = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -205,11 +205,11 @@ internal static MachineLearningModelContainerProperties DeserializeMachineLearni description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -217,14 +217,14 @@ internal static MachineLearningModelContainerProperties DeserializeMachineLearni { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -232,7 +232,7 @@ internal static MachineLearningModelContainerProperties DeserializeMachineLearni { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -243,8 +243,8 @@ internal static MachineLearningModelContainerProperties DeserializeMachineLearni serializedAdditionalRawData = rawDataDictionary; return new MachineLearningModelContainerProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, isArchived, latestVersion, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.cs index ccffd379aec6e..362fd585f1a76 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.cs @@ -20,14 +20,14 @@ public MachineLearningModelContainerProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. /// Is the asset archived?. /// The latest version inside this container. /// The next auto incremental version. /// Provisioning state for the model container. - internal MachineLearningModelContainerProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, properties, tags, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) + internal MachineLearningModelContainerProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, string latestVersion, string nextVersion, RegistryAssetProvisioningState? provisioningState) : base(description, tags, properties, serializedAdditionalRawData, isArchived, latestVersion, nextVersion) { ProvisioningState = provisioningState; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.Serialization.cs index 73bcc1a613643..7deee18b35ee9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.Serialization.cs @@ -44,18 +44,6 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteNull("flavors"); } } - if (Optional.IsDefined(JobName)) - { - if (JobName != null) - { - writer.WritePropertyName("jobName"u8); - writer.WriteStringValue(JobName); - } - else - { - writer.WriteNull("jobName"); - } - } if (Optional.IsDefined(ModelType)) { if (ModelType != null) @@ -80,6 +68,18 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteNull("modelUri"); } } + if (Optional.IsDefined(JobName)) + { + if (JobName != null) + { + writer.WritePropertyName("jobName"u8); + writer.WriteStringValue(JobName); + } + else + { + writer.WriteNull("jobName"); + } + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -97,16 +97,16 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteNull("stage"); } } - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"u8); - writer.WriteBooleanValue(IsAnonymous.Value); - } if (Optional.IsDefined(IsArchived)) { writer.WritePropertyName("isArchived"u8); writer.WriteBooleanValue(IsArchived.Value); } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -119,13 +119,13 @@ void IJsonModel.Write(Utf8JsonWriter writ writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -134,16 +134,16 @@ void IJsonModel.Write(Utf8JsonWriter writ } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -152,7 +152,7 @@ void IJsonModel.Write(Utf8JsonWriter writ } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -194,16 +194,16 @@ internal static MachineLearningModelVersionProperties DeserializeMachineLearning return null; } IDictionary flavors = default; - string jobName = default; string modelType = default; Uri modelUri = default; + string jobName = default; RegistryAssetProvisioningState? provisioningState = default; string stage = default; - bool? isAnonymous = default; bool? isArchived = default; + bool? isAnonymous = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -223,34 +223,34 @@ internal static MachineLearningModelVersionProperties DeserializeMachineLearning flavors = dictionary; continue; } - if (property.NameEquals("jobName"u8)) + if (property.NameEquals("modelType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - jobName = null; + modelType = null; continue; } - jobName = property.Value.GetString(); + modelType = property.Value.GetString(); continue; } - if (property.NameEquals("modelType"u8)) + if (property.NameEquals("modelUri"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - modelType = null; + modelUri = null; continue; } - modelType = property.Value.GetString(); + modelUri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("modelUri"u8)) + if (property.NameEquals("jobName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - modelUri = null; + jobName = null; continue; } - modelUri = new Uri(property.Value.GetString()); + jobName = property.Value.GetString(); continue; } if (property.NameEquals("provisioningState"u8)) @@ -272,22 +272,22 @@ internal static MachineLearningModelVersionProperties DeserializeMachineLearning stage = property.Value.GetString(); continue; } - if (property.NameEquals("isAnonymous"u8)) + if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isAnonymous = property.Value.GetBoolean(); + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isArchived = property.Value.GetBoolean(); + isAnonymous = property.Value.GetBoolean(); continue; } if (property.NameEquals("description"u8)) @@ -300,11 +300,11 @@ internal static MachineLearningModelVersionProperties DeserializeMachineLearning description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -312,14 +312,14 @@ internal static MachineLearningModelVersionProperties DeserializeMachineLearning { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -327,7 +327,7 @@ internal static MachineLearningModelVersionProperties DeserializeMachineLearning { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -338,15 +338,15 @@ internal static MachineLearningModelVersionProperties DeserializeMachineLearning serializedAdditionalRawData = rawDataDictionary; return new MachineLearningModelVersionProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - isAnonymous, isArchived, + isAnonymous, flavors ?? new ChangeTrackingDictionary(), - jobName, modelType, modelUri, + jobName, provisioningState, stage); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.cs index 59e6668734377..d06798ebbfac3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.cs @@ -21,35 +21,35 @@ public MachineLearningModelVersionProperties() /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// If the name version are system generated (anonymous registration). /// Is the asset archived?. + /// If the name version are system generated (anonymous registration). /// Mapping of model flavors to their properties. - /// Name of the training job which produced this model. /// The storage format for this entity. Used for NCD. /// The URI path to the model contents. + /// Name of the training job which produced this model. /// Provisioning state for the model version. /// Stage in the model lifecycle assigned to this model. - internal MachineLearningModelVersionProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isAnonymous, bool? isArchived, IDictionary flavors, string jobName, string modelType, Uri modelUri, RegistryAssetProvisioningState? provisioningState, string stage) : base(description, properties, tags, serializedAdditionalRawData, isAnonymous, isArchived) + internal MachineLearningModelVersionProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, bool? isAnonymous, IDictionary flavors, string modelType, Uri modelUri, string jobName, RegistryAssetProvisioningState? provisioningState, string stage) : base(description, tags, properties, serializedAdditionalRawData, isArchived, isAnonymous) { Flavors = flavors; - JobName = jobName; ModelType = modelType; ModelUri = modelUri; + JobName = jobName; ProvisioningState = provisioningState; Stage = stage; } /// Mapping of model flavors to their properties. public IDictionary Flavors { get; set; } - /// Name of the training job which produced this model. - public string JobName { get; set; } /// The storage format for this entity. Used for NCD. public string ModelType { get; set; } /// The URI path to the model contents. public Uri ModelUri { get; set; } + /// Name of the training job which produced this model. + public string JobName { get; set; } /// Provisioning state for the model version. public RegistryAssetProvisioningState? ProvisioningState { get; } /// Stage in the model lifecycle assigned to this model. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.Serialization.cs index ebec68aa984c9..3c4e596e7571a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.Serialization.cs @@ -38,11 +38,6 @@ void IJsonModel.Write(Utf8JsonWr writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -58,6 +53,11 @@ void IJsonModel.Write(Utf8JsonWr writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -69,16 +69,6 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -89,15 +79,15 @@ void IJsonModel.Write(Utf8JsonWr } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -140,16 +130,14 @@ internal static MachineLearningNoneAuthTypeWorkspaceConnection DeserializeMachin MachineLearningConnectionAuthType authType = default; MachineLearningConnectionCategory? category = default; ResourceIdentifier createdByWorkspaceArmId = default; - string error = default; DateTimeOffset? expiryTime = default; ConnectionGroup? group = default; bool? isSharedToAll = default; + string target = default; IDictionary metadata = default; - ManagedPERequirement? peRequirement = default; - ManagedPEStatus? peStatus = default; IList sharedUserList = default; - string target = default; - bool? useWorkspaceManagedIdentity = default; + string value = default; + MachineLearningValueFormat? valueFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -177,11 +165,6 @@ internal static MachineLearningNoneAuthTypeWorkspaceConnection DeserializeMachin createdByWorkspaceArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } if (property.NameEquals("expiryTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -209,6 +192,11 @@ internal static MachineLearningNoneAuthTypeWorkspaceConnection DeserializeMachin isSharedToAll = property.Value.GetBoolean(); continue; } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -223,24 +211,6 @@ internal static MachineLearningNoneAuthTypeWorkspaceConnection DeserializeMachin metadata = dictionary; continue; } - if (property.NameEquals("peRequirement"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peRequirement = new ManagedPERequirement(property.Value.GetString()); - continue; - } - if (property.NameEquals("peStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peStatus = new ManagedPEStatus(property.Value.GetString()); - continue; - } if (property.NameEquals("sharedUserList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -255,18 +225,18 @@ internal static MachineLearningNoneAuthTypeWorkspaceConnection DeserializeMachin sharedUserList = array; continue; } - if (property.NameEquals("target"u8)) + if (property.NameEquals("value"u8)) { - target = property.Value.GetString(); + value = property.Value.GetString(); continue; } - if (property.NameEquals("useWorkspaceManagedIdentity"u8)) + if (property.NameEquals("valueFormat"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - useWorkspaceManagedIdentity = property.Value.GetBoolean(); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } if (options.Format != "W") @@ -279,16 +249,14 @@ internal static MachineLearningNoneAuthTypeWorkspaceConnection DeserializeMachin authType, category, createdByWorkspaceArmId, - error, expiryTime, group, isSharedToAll, + target, metadata ?? new ChangeTrackingDictionary(), - peRequirement, - peStatus, sharedUserList ?? new ChangeTrackingList(), - target, - useWorkspaceManagedIdentity, + value, + valueFormat, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.cs index 80ed5abe5039c..ec140dd829ec9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.cs @@ -24,18 +24,16 @@ public MachineLearningNoneAuthTypeWorkspaceConnection() /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. - internal MachineLearningNoneAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData) : base(authType, category, createdByWorkspaceArmId, error, expiryOn, group, isSharedToAll, metadata, peRequirement, peStatus, sharedUserList, target, useWorkspaceManagedIdentity, serializedAdditionalRawData) + internal MachineLearningNoneAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData) : base(authType, category, createdByWorkspaceArmId, expiryOn, group, isSharedToAll, target, metadata, sharedUserList, value, valueFormat, serializedAdditionalRawData) { AuthType = authType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.Serialization.cs index f0204f935801a..6e23307389365 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.Serialization.cs @@ -31,21 +31,23 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WritePropertyName("fqdn"u8); writer.WriteStringValue(Fqdn); } - if (Optional.IsDefined(IsPrivateLinkEnabled)) - { - writer.WritePropertyName("isPrivateLinkEnabled"u8); - writer.WriteBooleanValue(IsPrivateLinkEnabled.Value); - } - if (Optional.IsDefined(NotebookPreparationError)) - { - writer.WritePropertyName("notebookPreparationError"u8); - writer.WriteObjectValue(NotebookPreparationError, options); - } if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); writer.WriteStringValue(ResourceId); } + if (Optional.IsDefined(NotebookPreparationError)) + { + if (NotebookPreparationError != null) + { + writer.WritePropertyName("notebookPreparationError"u8); + writer.WriteObjectValue(NotebookPreparationError, options); + } + else + { + writer.WriteNull("notebookPreparationError"); + } + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -85,9 +87,8 @@ internal static MachineLearningNotebookResourceInfo DeserializeMachineLearningNo return null; } string fqdn = default; - bool? isPrivateLinkEnabled = default; - MachineLearningNotebookPreparationError notebookPreparationError = default; string resourceId = default; + MachineLearningNotebookPreparationError notebookPreparationError = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -97,36 +98,28 @@ internal static MachineLearningNotebookResourceInfo DeserializeMachineLearningNo fqdn = property.Value.GetString(); continue; } - if (property.NameEquals("isPrivateLinkEnabled"u8)) + if (property.NameEquals("resourceId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isPrivateLinkEnabled = property.Value.GetBoolean(); + resourceId = property.Value.GetString(); continue; } if (property.NameEquals("notebookPreparationError"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + notebookPreparationError = null; continue; } notebookPreparationError = MachineLearningNotebookPreparationError.DeserializeMachineLearningNotebookPreparationError(property.Value, options); continue; } - if (property.NameEquals("resourceId"u8)) - { - resourceId = property.Value.GetString(); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningNotebookResourceInfo(fqdn, isPrivateLinkEnabled, notebookPreparationError, resourceId, serializedAdditionalRawData); + return new MachineLearningNotebookResourceInfo(fqdn, resourceId, notebookPreparationError, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.cs index 922ca334a7b01..1a3940ed59292 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.cs @@ -52,26 +52,22 @@ internal MachineLearningNotebookResourceInfo() /// Initializes a new instance of . /// - /// - /// The error that occurs when preparing notebook. /// the data plane resourceId that used to initialize notebook component. + /// The error that occurs when preparing notebook. /// Keeps track of any properties unknown to the library. - internal MachineLearningNotebookResourceInfo(string fqdn, bool? isPrivateLinkEnabled, MachineLearningNotebookPreparationError notebookPreparationError, string resourceId, IDictionary serializedAdditionalRawData) + internal MachineLearningNotebookResourceInfo(string fqdn, string resourceId, MachineLearningNotebookPreparationError notebookPreparationError, IDictionary serializedAdditionalRawData) { Fqdn = fqdn; - IsPrivateLinkEnabled = isPrivateLinkEnabled; - NotebookPreparationError = notebookPreparationError; ResourceId = resourceId; + NotebookPreparationError = notebookPreparationError; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Gets the fqdn. public string Fqdn { get; } - /// Gets the is private link enabled. - public bool? IsPrivateLinkEnabled { get; } - /// The error that occurs when preparing notebook. - public MachineLearningNotebookPreparationError NotebookPreparationError { get; } /// the data plane resourceId that used to initialize notebook component. public string ResourceId { get; } + /// The error that occurs when preparing notebook. + public MachineLearningNotebookPreparationError NotebookPreparationError { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningObjective.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningObjective.Serialization.cs index 2a00a4a64c319..c960f96d41026 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningObjective.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningObjective.Serialization.cs @@ -26,10 +26,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } writer.WriteStartObject(); - writer.WritePropertyName("goal"u8); - writer.WriteStringValue(Goal.ToString()); writer.WritePropertyName("primaryMetric"u8); writer.WriteStringValue(PrimaryMetric); + writer.WritePropertyName("goal"u8); + writer.WriteStringValue(Goal.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -68,20 +68,20 @@ internal static MachineLearningObjective DeserializeMachineLearningObjective(Jso { return null; } - MachineLearningGoal goal = default; string primaryMetric = default; + MachineLearningGoal goal = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("goal"u8)) + if (property.NameEquals("primaryMetric"u8)) { - goal = new MachineLearningGoal(property.Value.GetString()); + primaryMetric = property.Value.GetString(); continue; } - if (property.NameEquals("primaryMetric"u8)) + if (property.NameEquals("goal"u8)) { - primaryMetric = property.Value.GetString(); + goal = new MachineLearningGoal(property.Value.GetString()); continue; } if (options.Format != "W") @@ -90,7 +90,7 @@ internal static MachineLearningObjective DeserializeMachineLearningObjective(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningObjective(goal, primaryMetric, serializedAdditionalRawData); + return new MachineLearningObjective(primaryMetric, goal, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningObjective.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningObjective.cs index aed25c9811faa..d4596e8e8b401 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningObjective.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningObjective.cs @@ -46,25 +46,25 @@ public partial class MachineLearningObjective private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// [Required] Defines supported metric goals for hyperparameter tuning. /// [Required] Name of the metric to optimize. + /// [Required] Defines supported metric goals for hyperparameter tuning. /// is null. - public MachineLearningObjective(MachineLearningGoal goal, string primaryMetric) + public MachineLearningObjective(string primaryMetric, MachineLearningGoal goal) { Argument.AssertNotNull(primaryMetric, nameof(primaryMetric)); - Goal = goal; PrimaryMetric = primaryMetric; + Goal = goal; } /// Initializes a new instance of . - /// [Required] Defines supported metric goals for hyperparameter tuning. /// [Required] Name of the metric to optimize. + /// [Required] Defines supported metric goals for hyperparameter tuning. /// Keeps track of any properties unknown to the library. - internal MachineLearningObjective(MachineLearningGoal goal, string primaryMetric, IDictionary serializedAdditionalRawData) + internal MachineLearningObjective(string primaryMetric, MachineLearningGoal goal, IDictionary serializedAdditionalRawData) { - Goal = goal; PrimaryMetric = primaryMetric; + Goal = goal; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -73,9 +73,9 @@ internal MachineLearningObjective() { } - /// [Required] Defines supported metric goals for hyperparameter tuning. - public MachineLearningGoal Goal { get; set; } /// [Required] Name of the metric to optimize. public string PrimaryMetric { get; set; } + /// [Required] Defines supported metric goals for hyperparameter tuning. + public MachineLearningGoal Goal { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.Serialization.cs index 720803944fdba..b25e6c630674c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.Serialization.cs @@ -25,42 +25,49 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteStartObject(); - if (Optional.IsDefined(AppInsightsEnabled)) - { - writer.WritePropertyName("appInsightsEnabled"u8); - writer.WriteBooleanValue(AppInsightsEnabled.Value); - } - if (Optional.IsDefined(DataCollector)) + writer.WritePropertyName("endpointComputeType"u8); + writer.WriteStringValue(EndpointComputeType.ToString()); + if (Optional.IsDefined(ScaleSettings)) { - if (DataCollector != null) + if (ScaleSettings != null) { - writer.WritePropertyName("dataCollector"u8); - writer.WriteObjectValue(DataCollector, options); + writer.WritePropertyName("scaleSettings"u8); + writer.WriteObjectValue(ScaleSettings, options); } else { - writer.WriteNull("dataCollector"); + writer.WriteNull("scaleSettings"); } } - if (Optional.IsDefined(EgressPublicNetworkAccess)) + if (Optional.IsDefined(RequestSettings)) { - writer.WritePropertyName("egressPublicNetworkAccess"u8); - writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); + if (RequestSettings != null) + { + writer.WritePropertyName("requestSettings"u8); + writer.WriteObjectValue(RequestSettings, options); + } + else + { + writer.WriteNull("requestSettings"); + } } - writer.WritePropertyName("endpointComputeType"u8); - writer.WriteStringValue(EndpointComputeType.ToString()); - if (Optional.IsDefined(InstanceType)) + if (Optional.IsDefined(ModelMountPath)) { - if (InstanceType != null) + if (ModelMountPath != null) { - writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType); + writer.WritePropertyName("modelMountPath"u8); + writer.WriteStringValue(ModelMountPath); } else { - writer.WriteNull("instanceType"); + writer.WriteNull("modelMountPath"); } } + if (Optional.IsDefined(AppInsightsEnabled)) + { + writer.WritePropertyName("appInsightsEnabled"u8); + writer.WriteBooleanValue(AppInsightsEnabled.Value); + } if (Optional.IsDefined(LivenessProbe)) { if (LivenessProbe != null) @@ -73,93 +80,104 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteNull("livenessProbe"); } } - if (Optional.IsDefined(Model)) + if (Optional.IsDefined(ReadinessProbe)) { - if (Model != null) + if (ReadinessProbe != null) { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WritePropertyName("readinessProbe"u8); + writer.WriteObjectValue(ReadinessProbe, options); } else { - writer.WriteNull("model"); + writer.WriteNull("readinessProbe"); } } - if (Optional.IsDefined(ModelMountPath)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { - if (ModelMountPath != null) + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(InstanceType)) + { + if (InstanceType != null) { - writer.WritePropertyName("modelMountPath"u8); - writer.WriteStringValue(ModelMountPath); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); } else { - writer.WriteNull("modelMountPath"); + writer.WriteNull("instanceType"); } } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(ReadinessProbe)) + if (Optional.IsDefined(Model)) { - if (ReadinessProbe != null) + if (Model != null) { - writer.WritePropertyName("readinessProbe"u8); - writer.WriteObjectValue(ReadinessProbe, options); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } else { - writer.WriteNull("readinessProbe"); + writer.WriteNull("model"); } } - if (Optional.IsDefined(RequestSettings)) + if (Optional.IsDefined(EgressPublicNetworkAccess)) { - if (RequestSettings != null) + writer.WritePropertyName("egressPublicNetworkAccess"u8); + writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); + } + if (Optional.IsDefined(DataCollector)) + { + if (DataCollector != null) { - writer.WritePropertyName("requestSettings"u8); - writer.WriteObjectValue(RequestSettings, options); + writer.WritePropertyName("dataCollector"u8); + writer.WriteObjectValue(DataCollector, options); } else { - writer.WriteNull("requestSettings"); + writer.WriteNull("dataCollector"); } } - if (Optional.IsDefined(ScaleSettings)) + if (Optional.IsDefined(Description)) { - if (ScaleSettings != null) + if (Description != null) { - writer.WritePropertyName("scaleSettings"u8); - writer.WriteObjectValue(ScaleSettings, options); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); } else { - writer.WriteNull("scaleSettings"); + writer.WriteNull("description"); } } - if (Optional.IsDefined(CodeConfiguration)) + if (Optional.IsCollectionDefined(Properties)) { - if (CodeConfiguration != null) + if (Properties != null) { - writer.WritePropertyName("codeConfiguration"u8); - writer.WriteObjectValue(CodeConfiguration, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } else { - writer.WriteNull("codeConfiguration"); + writer.WriteNull("properties"); } } - if (Optional.IsDefined(Description)) + if (Optional.IsDefined(CodeConfiguration)) { - if (Description != null) + if (CodeConfiguration != null) { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); + writer.WritePropertyName("codeConfiguration"u8); + writer.WriteObjectValue(CodeConfiguration, options); } else { - writer.WriteNull("description"); + writer.WriteNull("codeConfiguration"); } } if (Optional.IsDefined(EnvironmentId)) @@ -192,24 +210,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteNull("environmentVariables"); } } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.cs index 90771c71bc0b3..12bb04ef162fd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.cs @@ -22,23 +22,13 @@ public MachineLearningOnlineDeploymentProperties() } /// Initializes a new instance of . - /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Code configuration for the endpoint deployment. /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. - /// Property dictionary. Properties can be added, but not removed or altered. /// Keeps track of any properties unknown to the library. - /// If true, enables Application Insights logging. - /// The mdc configuration, we disable mdc when it's null. - /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. /// [Required] The compute type of the endpoint. - /// Compute instance type. - /// Liveness probe monitors the health of the container regularly. - /// The URI path to the model. - /// The path to mount the model in custom container. - /// Provisioning state for the endpoint deployment. - /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. - /// Request settings for the deployment. /// /// Scale settings for the deployment. /// If it is null or not provided, @@ -47,44 +37,34 @@ public MachineLearningOnlineDeploymentProperties() /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - internal MachineLearningOnlineDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, IDictionary serializedAdditionalRawData, bool? appInsightsEnabled, DataCollector dataCollector, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, MachineLearningEndpointComputeType endpointComputeType, string instanceType, MachineLearningProbeSettings livenessProbe, string model, string modelMountPath, MachineLearningDeploymentProvisioningState? provisioningState, MachineLearningProbeSettings readinessProbe, MachineLearningOnlineRequestSettings requestSettings, MachineLearningOnlineScaleSettings scaleSettings) : base(codeConfiguration, description, environmentId, environmentVariables, properties, serializedAdditionalRawData) + /// Request settings for the deployment. + /// The path to mount the model in custom container. + /// If true, enables Application Insights logging. + /// Liveness probe monitors the health of the container regularly. + /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. + /// Provisioning state for the endpoint deployment. + /// Compute instance type. + /// The URI path to the model. + /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + /// The mdc configuration, we disable mdc when it's null. + internal MachineLearningOnlineDeploymentProperties(string description, IDictionary properties, MachineLearningCodeConfiguration codeConfiguration, string environmentId, IDictionary environmentVariables, IDictionary serializedAdditionalRawData, MachineLearningEndpointComputeType endpointComputeType, MachineLearningOnlineScaleSettings scaleSettings, MachineLearningOnlineRequestSettings requestSettings, string modelMountPath, bool? appInsightsEnabled, MachineLearningProbeSettings livenessProbe, MachineLearningProbeSettings readinessProbe, MachineLearningDeploymentProvisioningState? provisioningState, string instanceType, string model, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, DataCollector dataCollector) : base(description, properties, codeConfiguration, environmentId, environmentVariables, serializedAdditionalRawData) { - AppInsightsEnabled = appInsightsEnabled; - DataCollector = dataCollector; - EgressPublicNetworkAccess = egressPublicNetworkAccess; EndpointComputeType = endpointComputeType; - InstanceType = instanceType; - LivenessProbe = livenessProbe; - Model = model; + ScaleSettings = scaleSettings; + RequestSettings = requestSettings; ModelMountPath = modelMountPath; - ProvisioningState = provisioningState; + AppInsightsEnabled = appInsightsEnabled; + LivenessProbe = livenessProbe; ReadinessProbe = readinessProbe; - RequestSettings = requestSettings; - ScaleSettings = scaleSettings; + ProvisioningState = provisioningState; + InstanceType = instanceType; + Model = model; + EgressPublicNetworkAccess = egressPublicNetworkAccess; + DataCollector = dataCollector; } - /// If true, enables Application Insights logging. - public bool? AppInsightsEnabled { get; set; } - /// The mdc configuration, we disable mdc when it's null. - public DataCollector DataCollector { get; set; } - /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. - public MachineLearningEgressPublicNetworkAccessType? EgressPublicNetworkAccess { get; set; } /// [Required] The compute type of the endpoint. internal MachineLearningEndpointComputeType EndpointComputeType { get; set; } - /// Compute instance type. - public string InstanceType { get; set; } - /// Liveness probe monitors the health of the container regularly. - public MachineLearningProbeSettings LivenessProbe { get; set; } - /// The URI path to the model. - public string Model { get; set; } - /// The path to mount the model in custom container. - public string ModelMountPath { get; set; } - /// Provisioning state for the endpoint deployment. - public MachineLearningDeploymentProvisioningState? ProvisioningState { get; } - /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. - public MachineLearningProbeSettings ReadinessProbe { get; set; } - /// Request settings for the deployment. - public MachineLearningOnlineRequestSettings RequestSettings { get; set; } /// /// Scale settings for the deployment. /// If it is null or not provided, @@ -94,5 +74,25 @@ internal MachineLearningOnlineDeploymentProperties(MachineLearningCodeConfigurat /// The available derived classes include and . /// public MachineLearningOnlineScaleSettings ScaleSettings { get; set; } + /// Request settings for the deployment. + public MachineLearningOnlineRequestSettings RequestSettings { get; set; } + /// The path to mount the model in custom container. + public string ModelMountPath { get; set; } + /// If true, enables Application Insights logging. + public bool? AppInsightsEnabled { get; set; } + /// Liveness probe monitors the health of the container regularly. + public MachineLearningProbeSettings LivenessProbe { get; set; } + /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. + public MachineLearningProbeSettings ReadinessProbe { get; set; } + /// Provisioning state for the endpoint deployment. + public MachineLearningDeploymentProvisioningState? ProvisioningState { get; } + /// Compute instance type. + public string InstanceType { get; set; } + /// The URI path to the model. + public string Model { get; set; } + /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + public MachineLearningEgressPublicNetworkAccessType? EgressPublicNetworkAccess { get; set; } + /// The mdc configuration, we disable mdc when it's null. + public DataCollector DataCollector { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.Serialization.cs index 69e9c9ab2f530..5321963110b91 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.Serialization.cs @@ -26,6 +26,11 @@ void IJsonModel.Write(Utf8JsonWriter wr } writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } if (Optional.IsDefined(Compute)) { if (Compute != null) @@ -38,13 +43,18 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteNull("compute"); } } - if (Optional.IsCollectionDefined(MirrorTraffic)) + if (Optional.IsDefined(PublicNetworkAccess)) { - if (MirrorTraffic != null) + writer.WritePropertyName("publicNetworkAccess"u8); + writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); + } + if (Optional.IsCollectionDefined(Traffic)) + { + if (Traffic != null) { - writer.WritePropertyName("mirrorTraffic"u8); + writer.WritePropertyName("traffic"u8); writer.WriteStartObject(); - foreach (var item in MirrorTraffic) + foreach (var item in Traffic) { writer.WritePropertyName(item.Key); writer.WriteNumberValue(item.Value); @@ -53,26 +63,16 @@ void IJsonModel.Write(Utf8JsonWriter wr } else { - writer.WriteNull("mirrorTraffic"); + writer.WriteNull("traffic"); } } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"u8); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - if (Optional.IsCollectionDefined(Traffic)) + if (Optional.IsCollectionDefined(MirrorTraffic)) { - if (Traffic != null) + if (MirrorTraffic != null) { - writer.WritePropertyName("traffic"u8); + writer.WritePropertyName("mirrorTraffic"u8); writer.WriteStartObject(); - foreach (var item in Traffic) + foreach (var item in MirrorTraffic) { writer.WritePropertyName(item.Key); writer.WriteNumberValue(item.Value); @@ -81,11 +81,9 @@ void IJsonModel.Write(Utf8JsonWriter wr } else { - writer.WriteNull("traffic"); + writer.WriteNull("mirrorTraffic"); } } - writer.WritePropertyName("authMode"u8); - writer.WriteStringValue(AuthMode.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -98,18 +96,6 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteNull("description"); } } - if (Optional.IsDefined(Keys)) - { - if (Keys != null) - { - writer.WritePropertyName("keys"u8); - writer.WriteObjectValue(Keys, options); - } - else - { - writer.WriteNull("keys"); - } - } if (Optional.IsCollectionDefined(Properties)) { if (Properties != null) @@ -152,6 +138,20 @@ void IJsonModel.Write(Utf8JsonWriter wr writer.WriteNull("swaggerUri"); } } + writer.WritePropertyName("authMode"u8); + writer.WriteStringValue(AuthMode.ToString()); + if (Optional.IsDefined(Keys)) + { + if (Keys != null) + { + writer.WritePropertyName("keys"u8); + writer.WriteObjectValue(Keys, options); + } + else + { + writer.WriteNull("keys"); + } + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -190,53 +190,38 @@ internal static MachineLearningOnlineEndpointProperties DeserializeMachineLearni { return null; } - string compute = default; - IDictionary mirrorTraffic = default; MachineLearningEndpointProvisioningState? provisioningState = default; + string compute = default; MachineLearningPublicNetworkAccessType? publicNetworkAccess = default; IDictionary traffic = default; - MachineLearningEndpointAuthMode authMode = default; + IDictionary mirrorTraffic = default; string description = default; - MachineLearningEndpointAuthKeys keys = default; IDictionary properties = default; Uri scoringUri = default; Uri swaggerUri = default; + MachineLearningEndpointAuthMode authMode = default; + MachineLearningEndpointAuthKeys keys = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("compute"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - compute = null; - continue; - } - compute = property.Value.GetString(); - continue; - } - if (property.NameEquals("mirrorTraffic"u8)) + if (property.NameEquals("provisioningState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - mirrorTraffic = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetInt32()); - } - mirrorTraffic = dictionary; + provisioningState = new MachineLearningEndpointProvisioningState(property.Value.GetString()); continue; } - if (property.NameEquals("provisioningState"u8)) + if (property.NameEquals("compute"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + compute = null; continue; } - provisioningState = new MachineLearningEndpointProvisioningState(property.Value.GetString()); + compute = property.Value.GetString(); continue; } if (property.NameEquals("publicNetworkAccess"u8)) @@ -263,29 +248,29 @@ internal static MachineLearningOnlineEndpointProperties DeserializeMachineLearni traffic = dictionary; continue; } - if (property.NameEquals("authMode"u8)) - { - authMode = new MachineLearningEndpointAuthMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("description"u8)) + if (property.NameEquals("mirrorTraffic"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - description = null; + mirrorTraffic = null; continue; } - description = property.Value.GetString(); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetInt32()); + } + mirrorTraffic = dictionary; continue; } - if (property.NameEquals("keys"u8)) + if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - keys = null; + description = null; continue; } - keys = MachineLearningEndpointAuthKeys.DeserializeMachineLearningEndpointAuthKeys(property.Value, options); + description = property.Value.GetString(); continue; } if (property.NameEquals("properties"u8)) @@ -323,6 +308,21 @@ internal static MachineLearningOnlineEndpointProperties DeserializeMachineLearni swaggerUri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("authMode"u8)) + { + authMode = new MachineLearningEndpointAuthMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("keys"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + keys = null; + continue; + } + keys = MachineLearningEndpointAuthKeys.DeserializeMachineLearningEndpointAuthKeys(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -330,18 +330,18 @@ internal static MachineLearningOnlineEndpointProperties DeserializeMachineLearni } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningOnlineEndpointProperties( - authMode, description, - keys, properties ?? new ChangeTrackingDictionary(), scoringUri, swaggerUri, + authMode, + keys, serializedAdditionalRawData, - compute, - mirrorTraffic ?? new ChangeTrackingDictionary(), provisioningState, + compute, publicNetworkAccess, - traffic ?? new ChangeTrackingDictionary()); + traffic ?? new ChangeTrackingDictionary(), + mirrorTraffic ?? new ChangeTrackingDictionary()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.cs index 8ab9260f935a6..86d3f0e3a2624 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.cs @@ -17,36 +17,36 @@ public partial class MachineLearningOnlineEndpointProperties : MachineLearningEn /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. public MachineLearningOnlineEndpointProperties(MachineLearningEndpointAuthMode authMode) : base(authMode) { - MirrorTraffic = new ChangeTrackingDictionary(); Traffic = new ChangeTrackingDictionary(); + MirrorTraffic = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. /// Description of the inference endpoint. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Endpoint URI. + /// Endpoint Swagger URI. + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. /// /// EndpointAuthKeys to set initially on an Endpoint. /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. /// - /// Property dictionary. Properties can be added, but not removed or altered. - /// Endpoint URI. - /// Endpoint Swagger URI. /// Keeps track of any properties unknown to the library. + /// Provisioning state for the endpoint. /// /// ARM resource ID of the compute if it exists. /// optional /// - /// Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50. - /// Provisioning state for the endpoint. /// Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. /// Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. - internal MachineLearningOnlineEndpointProperties(MachineLearningEndpointAuthMode authMode, string description, MachineLearningEndpointAuthKeys keys, IDictionary properties, Uri scoringUri, Uri swaggerUri, IDictionary serializedAdditionalRawData, string compute, IDictionary mirrorTraffic, MachineLearningEndpointProvisioningState? provisioningState, MachineLearningPublicNetworkAccessType? publicNetworkAccess, IDictionary traffic) : base(authMode, description, keys, properties, scoringUri, swaggerUri, serializedAdditionalRawData) + /// Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50. + internal MachineLearningOnlineEndpointProperties(string description, IDictionary properties, Uri scoringUri, Uri swaggerUri, MachineLearningEndpointAuthMode authMode, MachineLearningEndpointAuthKeys keys, IDictionary serializedAdditionalRawData, MachineLearningEndpointProvisioningState? provisioningState, string compute, MachineLearningPublicNetworkAccessType? publicNetworkAccess, IDictionary traffic, IDictionary mirrorTraffic) : base(description, properties, scoringUri, swaggerUri, authMode, keys, serializedAdditionalRawData) { - Compute = compute; - MirrorTraffic = mirrorTraffic; ProvisioningState = provisioningState; + Compute = compute; PublicNetworkAccess = publicNetworkAccess; Traffic = traffic; + MirrorTraffic = mirrorTraffic; } /// Initializes a new instance of for deserialization. @@ -54,18 +54,18 @@ internal MachineLearningOnlineEndpointProperties() { } + /// Provisioning state for the endpoint. + public MachineLearningEndpointProvisioningState? ProvisioningState { get; } /// /// ARM resource ID of the compute if it exists. /// optional /// public string Compute { get; set; } - /// Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50. - public IDictionary MirrorTraffic { get; set; } - /// Provisioning state for the endpoint. - public MachineLearningEndpointProvisioningState? ProvisioningState { get; } /// Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. public MachineLearningPublicNetworkAccessType? PublicNetworkAccess { get; set; } /// Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. public IDictionary Traffic { get; set; } + /// Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50. + public IDictionary MirrorTraffic { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineRequestSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineRequestSettings.Serialization.cs index aaf0672641d38..5fcf25a63b774 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineRequestSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineRequestSettings.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter write } writer.WriteStartObject(); - if (Optional.IsDefined(MaxConcurrentRequestsPerInstance)) - { - writer.WritePropertyName("maxConcurrentRequestsPerInstance"u8); - writer.WriteNumberValue(MaxConcurrentRequestsPerInstance.Value); - } if (Optional.IsDefined(MaxQueueWait)) { writer.WritePropertyName("maxQueueWait"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WritePropertyName("requestTimeout"u8); writer.WriteStringValue(RequestTimeout.Value, "P"); } + if (Optional.IsDefined(MaxConcurrentRequestsPerInstance)) + { + writer.WritePropertyName("maxConcurrentRequestsPerInstance"u8); + writer.WriteNumberValue(MaxConcurrentRequestsPerInstance.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,38 +79,38 @@ internal static MachineLearningOnlineRequestSettings DeserializeMachineLearningO { return null; } - int? maxConcurrentRequestsPerInstance = default; TimeSpan? maxQueueWait = default; TimeSpan? requestTimeout = default; + int? maxConcurrentRequestsPerInstance = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("maxConcurrentRequestsPerInstance"u8)) + if (property.NameEquals("maxQueueWait"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - maxConcurrentRequestsPerInstance = property.Value.GetInt32(); + maxQueueWait = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("maxQueueWait"u8)) + if (property.NameEquals("requestTimeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - maxQueueWait = property.Value.GetTimeSpan("P"); + requestTimeout = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("requestTimeout"u8)) + if (property.NameEquals("maxConcurrentRequestsPerInstance"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - requestTimeout = property.Value.GetTimeSpan("P"); + maxConcurrentRequestsPerInstance = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -119,7 +119,7 @@ internal static MachineLearningOnlineRequestSettings DeserializeMachineLearningO } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningOnlineRequestSettings(maxConcurrentRequestsPerInstance, maxQueueWait, requestTimeout, serializedAdditionalRawData); + return new MachineLearningOnlineRequestSettings(maxQueueWait, requestTimeout, maxConcurrentRequestsPerInstance, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineRequestSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineRequestSettings.cs index faae447934575..5d7ea7a9496d8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineRequestSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineRequestSettings.cs @@ -51,7 +51,6 @@ public MachineLearningOnlineRequestSettings() } /// Initializes a new instance of . - /// The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. /// /// (Deprecated for Managed Online Endpoints) The maximum amount of time a request will stay in the queue in ISO 8601 format. /// Defaults to 500ms. @@ -61,17 +60,16 @@ public MachineLearningOnlineRequestSettings() /// The scoring timeout in ISO 8601 format. /// Defaults to 5000ms. /// + /// The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. /// Keeps track of any properties unknown to the library. - internal MachineLearningOnlineRequestSettings(int? maxConcurrentRequestsPerInstance, TimeSpan? maxQueueWait, TimeSpan? requestTimeout, IDictionary serializedAdditionalRawData) + internal MachineLearningOnlineRequestSettings(TimeSpan? maxQueueWait, TimeSpan? requestTimeout, int? maxConcurrentRequestsPerInstance, IDictionary serializedAdditionalRawData) { - MaxConcurrentRequestsPerInstance = maxConcurrentRequestsPerInstance; MaxQueueWait = maxQueueWait; RequestTimeout = requestTimeout; + MaxConcurrentRequestsPerInstance = maxConcurrentRequestsPerInstance; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. - public int? MaxConcurrentRequestsPerInstance { get; set; } /// /// (Deprecated for Managed Online Endpoints) The maximum amount of time a request will stay in the queue in ISO 8601 format. /// Defaults to 500ms. @@ -83,5 +81,7 @@ internal MachineLearningOnlineRequestSettings(int? maxConcurrentRequestsPerInsta /// Defaults to 5000ms. /// public TimeSpan? RequestTimeout { get; set; } + /// The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. + public int? MaxConcurrentRequestsPerInstance { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationName.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationName.cs index 47201536eea78..7f3860bc2dd98 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationName.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationName.cs @@ -26,7 +26,6 @@ public MachineLearningOperationName(string value) private const string StartValue = "Start"; private const string StopValue = "Stop"; private const string RestartValue = "Restart"; - private const string ResizeValue = "Resize"; private const string ReimageValue = "Reimage"; private const string DeleteValue = "Delete"; @@ -38,8 +37,6 @@ public MachineLearningOperationName(string value) public static MachineLearningOperationName Stop { get; } = new MachineLearningOperationName(StopValue); /// Restart. public static MachineLearningOperationName Restart { get; } = new MachineLearningOperationName(RestartValue); - /// Resize. - public static MachineLearningOperationName Resize { get; } = new MachineLearningOperationName(ResizeValue); /// Reimage. public static MachineLearningOperationName Reimage { get; } = new MachineLearningOperationName(ReimageValue); /// Delete. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationStatus.cs index c6297a42b7fb1..4230c37905411 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationStatus.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationStatus.cs @@ -28,7 +28,6 @@ public MachineLearningOperationStatus(string value) private const string StartFailedValue = "StartFailed"; private const string StopFailedValue = "StopFailed"; private const string RestartFailedValue = "RestartFailed"; - private const string ResizeFailedValue = "ResizeFailed"; private const string ReimageFailedValue = "ReimageFailed"; private const string DeleteFailedValue = "DeleteFailed"; @@ -44,8 +43,6 @@ public MachineLearningOperationStatus(string value) public static MachineLearningOperationStatus StopFailed { get; } = new MachineLearningOperationStatus(StopFailedValue); /// RestartFailed. public static MachineLearningOperationStatus RestartFailed { get; } = new MachineLearningOperationStatus(RestartFailedValue); - /// ResizeFailed. - public static MachineLearningOperationStatus ResizeFailed { get; } = new MachineLearningOperationStatus(ResizeFailedValue); /// ReimageFailed. public static MachineLearningOperationStatus ReimageFailed { get; } = new MachineLearningOperationStatus(ReimageFailedValue); /// DeleteFailed. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.Serialization.cs index 7a02756a749d4..25a9b295e848d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.Serialization.cs @@ -31,16 +31,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.Value.ToString()); } - if (options.Format != "W" && Optional.IsCollectionDefined(ParentRuleNames)) - { - writer.WritePropertyName("parentRuleNames"u8); - writer.WriteStartArray(); - foreach (var item in ParentRuleNames) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.cs index c1ad233e93cf0..cabaf91430a04 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutboundRule.cs @@ -52,19 +52,16 @@ public abstract partial class MachineLearningOutboundRule /// Initializes a new instance of . protected MachineLearningOutboundRule() { - ParentRuleNames = new ChangeTrackingList(); } /// Initializes a new instance of . /// Category of a managed network Outbound Rule of a machine learning workspace. - /// /// Type of a managed network Outbound Rule of a machine learning workspace. /// Type of a managed network Outbound Rule of a machine learning workspace. /// Keeps track of any properties unknown to the library. - internal MachineLearningOutboundRule(OutboundRuleCategory? category, IReadOnlyList parentRuleNames, OutboundRuleStatus? status, OutboundRuleType outboundRuleType, IDictionary serializedAdditionalRawData) + internal MachineLearningOutboundRule(OutboundRuleCategory? category, OutboundRuleStatus? status, OutboundRuleType outboundRuleType, IDictionary serializedAdditionalRawData) { Category = category; - ParentRuleNames = parentRuleNames; Status = status; OutboundRuleType = outboundRuleType; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -72,8 +69,6 @@ internal MachineLearningOutboundRule(OutboundRuleCategory? category, IReadOnlyLi /// Category of a managed network Outbound Rule of a machine learning workspace. public OutboundRuleCategory? Category { get; set; } - /// Gets the parent rule names. - public IReadOnlyList ParentRuleNames { get; } /// Type of a managed network Outbound Rule of a machine learning workspace. public OutboundRuleStatus? Status { get; set; } /// Type of a managed network Outbound Rule of a machine learning workspace. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputPathAssetReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputPathAssetReference.Serialization.cs index bc147ae8b0a30..316519d1d137c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputPathAssetReference.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputPathAssetReference.Serialization.cs @@ -26,28 +26,28 @@ void IJsonModel.Write(Utf8JsonWriter wr } writer.WriteStartObject(); - if (Optional.IsDefined(JobId)) + if (Optional.IsDefined(Path)) { - if (JobId != null) + if (Path != null) { - writer.WritePropertyName("jobId"u8); - writer.WriteStringValue(JobId); + writer.WritePropertyName("path"u8); + writer.WriteStringValue(Path); } else { - writer.WriteNull("jobId"); + writer.WriteNull("path"); } } - if (Optional.IsDefined(Path)) + if (Optional.IsDefined(JobId)) { - if (Path != null) + if (JobId != null) { - writer.WritePropertyName("path"u8); - writer.WriteStringValue(Path); + writer.WritePropertyName("jobId"u8); + writer.WriteStringValue(JobId); } else { - writer.WriteNull("path"); + writer.WriteNull("jobId"); } } writer.WritePropertyName("referenceType"u8); @@ -90,31 +90,31 @@ internal static MachineLearningOutputPathAssetReference DeserializeMachineLearni { return null; } - ResourceIdentifier jobId = default; string path = default; + ResourceIdentifier jobId = default; ReferenceType referenceType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("jobId"u8)) + if (property.NameEquals("path"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - jobId = null; + path = null; continue; } - jobId = new ResourceIdentifier(property.Value.GetString()); + path = property.Value.GetString(); continue; } - if (property.NameEquals("path"u8)) + if (property.NameEquals("jobId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - path = null; + jobId = null; continue; } - path = property.Value.GetString(); + jobId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("referenceType"u8)) @@ -128,7 +128,7 @@ internal static MachineLearningOutputPathAssetReference DeserializeMachineLearni } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningOutputPathAssetReference(referenceType, serializedAdditionalRawData, jobId, path); + return new MachineLearningOutputPathAssetReference(referenceType, serializedAdditionalRawData, path, jobId); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputPathAssetReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputPathAssetReference.cs index df5f2fabe6b42..6ea4a510c0061 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputPathAssetReference.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputPathAssetReference.cs @@ -23,18 +23,18 @@ public MachineLearningOutputPathAssetReference() /// Initializes a new instance of . /// [Required] Specifies the type of asset reference. /// Keeps track of any properties unknown to the library. - /// ARM resource ID of the job. /// The path of the file/directory in the job output. - internal MachineLearningOutputPathAssetReference(ReferenceType referenceType, IDictionary serializedAdditionalRawData, ResourceIdentifier jobId, string path) : base(referenceType, serializedAdditionalRawData) + /// ARM resource ID of the job. + internal MachineLearningOutputPathAssetReference(ReferenceType referenceType, IDictionary serializedAdditionalRawData, string path, ResourceIdentifier jobId) : base(referenceType, serializedAdditionalRawData) { - JobId = jobId; Path = path; + JobId = jobId; ReferenceType = referenceType; } - /// ARM resource ID of the job. - public ResourceIdentifier JobId { get; set; } /// The path of the file/directory in the job output. public string Path { get; set; } + /// ARM resource ID of the job. + public ResourceIdentifier JobId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.Serialization.cs index 59c7f0c4290ef..71e1ab036f1ff 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.Serialization.cs @@ -43,11 +43,6 @@ void IJsonModel.Write(Utf8JsonWri writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -63,6 +58,11 @@ void IJsonModel.Write(Utf8JsonWri writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -74,16 +74,6 @@ void IJsonModel.Write(Utf8JsonWri } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -94,15 +84,15 @@ void IJsonModel.Write(Utf8JsonWri } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -146,16 +136,14 @@ internal static MachineLearningPatAuthTypeWorkspaceConnection DeserializeMachine MachineLearningConnectionAuthType authType = default; MachineLearningConnectionCategory? category = default; ResourceIdentifier createdByWorkspaceArmId = default; - string error = default; DateTimeOffset? expiryTime = default; ConnectionGroup? group = default; bool? isSharedToAll = default; + string target = default; IDictionary metadata = default; - ManagedPERequirement? peRequirement = default; - ManagedPEStatus? peStatus = default; IList sharedUserList = default; - string target = default; - bool? useWorkspaceManagedIdentity = default; + string value = default; + MachineLearningValueFormat? valueFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -192,11 +180,6 @@ internal static MachineLearningPatAuthTypeWorkspaceConnection DeserializeMachine createdByWorkspaceArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } if (property.NameEquals("expiryTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,6 +207,11 @@ internal static MachineLearningPatAuthTypeWorkspaceConnection DeserializeMachine isSharedToAll = property.Value.GetBoolean(); continue; } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -238,24 +226,6 @@ internal static MachineLearningPatAuthTypeWorkspaceConnection DeserializeMachine metadata = dictionary; continue; } - if (property.NameEquals("peRequirement"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peRequirement = new ManagedPERequirement(property.Value.GetString()); - continue; - } - if (property.NameEquals("peStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peStatus = new ManagedPEStatus(property.Value.GetString()); - continue; - } if (property.NameEquals("sharedUserList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -270,18 +240,18 @@ internal static MachineLearningPatAuthTypeWorkspaceConnection DeserializeMachine sharedUserList = array; continue; } - if (property.NameEquals("target"u8)) + if (property.NameEquals("value"u8)) { - target = property.Value.GetString(); + value = property.Value.GetString(); continue; } - if (property.NameEquals("useWorkspaceManagedIdentity"u8)) + if (property.NameEquals("valueFormat"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - useWorkspaceManagedIdentity = property.Value.GetBoolean(); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } if (options.Format != "W") @@ -294,16 +264,14 @@ internal static MachineLearningPatAuthTypeWorkspaceConnection DeserializeMachine authType, category, createdByWorkspaceArmId, - error, expiryTime, group, isSharedToAll, + target, metadata ?? new ChangeTrackingDictionary(), - peRequirement, - peStatus, sharedUserList ?? new ChangeTrackingList(), - target, - useWorkspaceManagedIdentity, + value, + valueFormat, serializedAdditionalRawData, credentials); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.cs index 78f1bb6726fde..21984023be904 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.cs @@ -24,19 +24,17 @@ public MachineLearningPatAuthTypeWorkspaceConnection() /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. /// - internal MachineLearningPatAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData, WorkspaceConnectionPersonalAccessToken credentials) : base(authType, category, createdByWorkspaceArmId, error, expiryOn, group, isSharedToAll, metadata, peRequirement, peStatus, sharedUserList, target, useWorkspaceManagedIdentity, serializedAdditionalRawData) + internal MachineLearningPatAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData, WorkspaceConnectionPersonalAccessToken credentials) : base(authType, category, createdByWorkspaceArmId, expiryOn, group, isSharedToAll, target, metadata, sharedUserList, value, valueFormat, serializedAdditionalRawData) { Credentials = credentials; AuthType = authType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.Serialization.cs index 1c100f0c20425..df0366c180b5d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.Serialization.cs @@ -26,22 +26,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Inputs)) + if (Optional.IsDefined(Settings)) { - if (Inputs != null) + if (Settings != null) { - writer.WritePropertyName("inputs"u8); - writer.WriteStartObject(); - foreach (var item in Inputs) + writer.WritePropertyName("settings"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Settings); +#else + using (JsonDocument document = JsonDocument.Parse(Settings)) { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); + JsonSerializer.Serialize(writer, document.RootElement); } - writer.WriteEndObject(); +#endif } else { - writer.WriteNull("inputs"); + writer.WriteNull("settings"); } } if (Optional.IsCollectionDefined(Jobs)) @@ -74,13 +75,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteNull("jobs"); } } - if (Optional.IsCollectionDefined(Outputs)) + if (Optional.IsCollectionDefined(Inputs)) { - if (Outputs != null) + if (Inputs != null) { - writer.WritePropertyName("outputs"u8); + writer.WritePropertyName("inputs"u8); writer.WriteStartObject(); - foreach (var item in Outputs) + foreach (var item in Inputs) { writer.WritePropertyName(item.Key); writer.WriteObjectValue(item.Value, options); @@ -89,26 +90,25 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } else { - writer.WriteNull("outputs"); + writer.WriteNull("inputs"); } } - if (Optional.IsDefined(Settings)) + if (Optional.IsCollectionDefined(Outputs)) { - if (Settings != null) + if (Outputs != null) { - writer.WritePropertyName("settings"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Settings); -#else - using (JsonDocument document = JsonDocument.Parse(Settings)) + writer.WritePropertyName("outputs"u8); + writer.WriteStartObject(); + foreach (var item in Outputs) { - JsonSerializer.Serialize(writer, document.RootElement); + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); } -#endif + writer.WriteEndObject(); } else { - writer.WriteNull("settings"); + writer.WriteNull("outputs"); } } if (Optional.IsDefined(SourceJobId)) @@ -123,46 +123,64 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteNull("sourceJobId"); } } - if (Optional.IsDefined(ComponentId)) + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(DisplayName)) { - if (ComponentId != null) + if (DisplayName != null) { - writer.WritePropertyName("componentId"u8); - writer.WriteStringValue(ComponentId); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); } else { - writer.WriteNull("componentId"); + writer.WriteNull("displayName"); } } - if (Optional.IsDefined(ComputeId)) + if (options.Format != "W" && Optional.IsDefined(Status)) { - if (ComputeId != null) + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + } + if (Optional.IsCollectionDefined(Services)) + { + if (Services != null) { - writer.WritePropertyName("computeId"u8); - writer.WriteStringValue(ComputeId); + writer.WritePropertyName("services"u8); + writer.WriteStartObject(); + foreach (var item in Services) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); } else { - writer.WriteNull("computeId"); + writer.WriteNull("services"); } } - if (Optional.IsDefined(DisplayName)) + if (Optional.IsDefined(ComputeId)) { - if (DisplayName != null) + if (ComputeId != null) { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); + writer.WritePropertyName("computeId"u8); + writer.WriteStringValue(ComputeId); } else { - writer.WriteNull("displayName"); + writer.WriteNull("computeId"); } } - if (Optional.IsDefined(ExperimentName)) + if (Optional.IsDefined(IsArchived)) { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); } if (Optional.IsDefined(Identity)) { @@ -176,48 +194,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteNull("identity"); } } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"u8); - writer.WriteBooleanValue(IsArchived.Value); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsDefined(NotificationSetting)) + if (Optional.IsDefined(ComponentId)) { - if (NotificationSetting != null) + if (ComponentId != null) { - writer.WritePropertyName("notificationSetting"u8); - writer.WriteObjectValue(NotificationSetting, options); + writer.WritePropertyName("componentId"u8); + writer.WriteStringValue(ComponentId); } else { - writer.WriteNull("notificationSetting"); + writer.WriteNull("componentId"); } } - if (Optional.IsCollectionDefined(Services)) + if (Optional.IsDefined(NotificationSetting)) { - if (Services != null) + if (NotificationSetting != null) { - writer.WritePropertyName("services"u8); - writer.WriteStartObject(); - foreach (var item in Services) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting, options); } else { - writer.WriteNull("services"); + writer.WriteNull("notificationSetting"); } } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } if (Optional.IsDefined(Description)) { if (Description != null) @@ -230,13 +230,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -245,16 +245,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -263,7 +263,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -304,41 +304,36 @@ internal static MachineLearningPipelineJob DeserializeMachineLearningPipelineJob { return null; } - IDictionary inputs = default; + BinaryData settings = default; IDictionary jobs = default; + IDictionary inputs = default; IDictionary outputs = default; - BinaryData settings = default; ResourceIdentifier sourceJobId = default; - ResourceIdentifier componentId = default; - ResourceIdentifier computeId = default; + JobType jobType = default; string displayName = default; + MachineLearningJobStatus? status = default; string experimentName = default; - MachineLearningIdentityConfiguration identity = default; + IDictionary services = default; + ResourceIdentifier computeId = default; bool? isArchived = default; - JobType jobType = default; + MachineLearningIdentityConfiguration identity = default; + ResourceIdentifier componentId = default; NotificationSetting notificationSetting = default; - IDictionary services = default; - MachineLearningJobStatus? status = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("inputs"u8)) + if (property.NameEquals("settings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - inputs = null; + settings = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, MachineLearningJobInput.DeserializeMachineLearningJobInput(property0.Value, options)); - } - inputs = dictionary; + settings = BinaryData.FromString(property.Value.GetRawText()); continue; } if (property.NameEquals("jobs"u8)) @@ -363,29 +358,34 @@ internal static MachineLearningPipelineJob DeserializeMachineLearningPipelineJob jobs = dictionary; continue; } - if (property.NameEquals("outputs"u8)) + if (property.NameEquals("inputs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - outputs = null; + inputs = null; continue; } - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { - dictionary.Add(property0.Name, MachineLearningJobOutput.DeserializeMachineLearningJobOutput(property0.Value, options)); + dictionary.Add(property0.Name, MachineLearningJobInput.DeserializeMachineLearningJobInput(property0.Value, options)); } - outputs = dictionary; + inputs = dictionary; continue; } - if (property.NameEquals("settings"u8)) + if (property.NameEquals("outputs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - settings = null; + outputs = null; continue; } - settings = BinaryData.FromString(property.Value.GetRawText()); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningJobOutput.DeserializeMachineLearningJobOutput(property0.Value, options)); + } + outputs = dictionary; continue; } if (property.NameEquals("sourceJobId"u8)) @@ -398,34 +398,28 @@ internal static MachineLearningPipelineJob DeserializeMachineLearningPipelineJob sourceJobId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("componentId"u8)) + if (property.NameEquals("jobType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - componentId = null; - continue; - } - componentId = new ResourceIdentifier(property.Value.GetString()); + jobType = new JobType(property.Value.GetString()); continue; } - if (property.NameEquals("computeId"u8)) + if (property.NameEquals("displayName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - computeId = null; + displayName = null; continue; } - computeId = new ResourceIdentifier(property.Value.GetString()); + displayName = property.Value.GetString(); continue; } - if (property.NameEquals("displayName"u8)) + if (property.NameEquals("status"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - displayName = null; continue; } - displayName = property.Value.GetString(); + status = new MachineLearningJobStatus(property.Value.GetString()); continue; } if (property.NameEquals("experimentName"u8)) @@ -433,62 +427,68 @@ internal static MachineLearningPipelineJob DeserializeMachineLearningPipelineJob experimentName = property.Value.GetString(); continue; } - if (property.NameEquals("identity"u8)) + if (property.NameEquals("services"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - identity = null; + services = null; continue; } - identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value, options); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value, options)); + } + services = dictionary; continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("computeId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + computeId = null; continue; } - isArchived = property.Value.GetBoolean(); + computeId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("jobType"u8)) + if (property.NameEquals("isArchived"u8)) { - jobType = new JobType(property.Value.GetString()); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("notificationSetting"u8)) + if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - notificationSetting = null; + identity = null; continue; } - notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value, options); + identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value, options); continue; } - if (property.NameEquals("services"u8)) + if (property.NameEquals("componentId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - services = null; + componentId = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value, options)); - } - services = dictionary; + componentId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("notificationSetting"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + notificationSetting = null; continue; } - status = new MachineLearningJobStatus(property.Value.GetString()); + notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value, options); continue; } if (property.NameEquals("description"u8)) @@ -501,11 +501,11 @@ internal static MachineLearningPipelineJob DeserializeMachineLearningPipelineJob description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -513,14 +513,14 @@ internal static MachineLearningPipelineJob DeserializeMachineLearningPipelineJob { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -528,7 +528,7 @@ internal static MachineLearningPipelineJob DeserializeMachineLearningPipelineJob { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -539,23 +539,23 @@ internal static MachineLearningPipelineJob DeserializeMachineLearningPipelineJob serializedAdditionalRawData = rawDataDictionary; return new MachineLearningPipelineJob( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - componentId, - computeId, + jobType, displayName, + status, experimentName, - identity, + services ?? new ChangeTrackingDictionary(), + computeId, isArchived, - jobType, + identity, + componentId, notificationSetting, - services ?? new ChangeTrackingDictionary(), - status, - inputs ?? new ChangeTrackingDictionary(), + settings, jobs ?? new ChangeTrackingDictionary(), + inputs ?? new ChangeTrackingDictionary(), outputs ?? new ChangeTrackingDictionary(), - settings, sourceJobId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.cs index 9891a97bad117..3f662aac93a67 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.cs @@ -17,68 +17,62 @@ public partial class MachineLearningPipelineJob : MachineLearningJobProperties /// Initializes a new instance of . public MachineLearningPipelineJob() { - Inputs = new ChangeTrackingDictionary(); Jobs = new ChangeTrackingDictionary(); + Inputs = new ChangeTrackingDictionary(); Outputs = new ChangeTrackingDictionary(); JobType = JobType.Pipeline; } /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. + /// [Required] Specifies the type of job. /// Display name of job. + /// Status of the job. /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// ARM resource ID of the compute resource. + /// Is the asset archived?. /// /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. /// Defaults to AmlToken if null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// Is the asset archived?. - /// [Required] Specifies the type of job. + /// ARM resource ID of the component resource. /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. + /// Pipeline settings, for things like ContinueRunOnStepFailure etc. + /// Jobs construct the Pipeline Job. /// /// Inputs for the pipeline job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , , and . /// - /// Jobs construct the Pipeline Job. /// /// Outputs for the pipeline job /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , and . /// - /// Pipeline settings, for things like ContinueRunOnStepFailure etc. /// ARM resource ID of source job. - internal MachineLearningPipelineJob(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary services, MachineLearningJobStatus? status, IDictionary inputs, IDictionary jobs, IDictionary outputs, BinaryData settings, ResourceIdentifier sourceJobId) : base(description, properties, tags, serializedAdditionalRawData, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, services, status) + internal MachineLearningPipelineJob(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, JobType jobType, string displayName, MachineLearningJobStatus? status, string experimentName, IDictionary services, ResourceIdentifier computeId, bool? isArchived, MachineLearningIdentityConfiguration identity, ResourceIdentifier componentId, NotificationSetting notificationSetting, BinaryData settings, IDictionary jobs, IDictionary inputs, IDictionary outputs, ResourceIdentifier sourceJobId) : base(description, tags, properties, serializedAdditionalRawData, jobType, displayName, status, experimentName, services, computeId, isArchived, identity, componentId, notificationSetting) { - Inputs = inputs; + Settings = settings; Jobs = jobs; + Inputs = inputs; Outputs = outputs; - Settings = settings; SourceJobId = sourceJobId; JobType = jobType; } /// - /// Inputs for the pipeline job. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - public IDictionary Inputs { get; set; } - /// - /// Jobs construct the Pipeline Job. + /// Pipeline settings, for things like ContinueRunOnStepFailure etc. /// - /// To assign an object to the value of this property use . + /// To assign an object to this property use . /// /// /// To assign an already formatted json string to this property use . @@ -105,17 +99,11 @@ internal MachineLearningPipelineJob(string description, IDictionary /// /// - public IDictionary Jobs { get; set; } - /// - /// Outputs for the pipeline job - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - public IDictionary Outputs { get; set; } + public BinaryData Settings { get; set; } /// - /// Pipeline settings, for things like ContinueRunOnStepFailure etc. + /// Jobs construct the Pipeline Job. /// - /// To assign an object to this property use . + /// To assign an object to the value of this property use . /// /// /// To assign an already formatted json string to this property use . @@ -142,7 +130,19 @@ internal MachineLearningPipelineJob(string description, IDictionary /// /// - public BinaryData Settings { get; set; } + public IDictionary Jobs { get; set; } + /// + /// Inputs for the pipeline job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + public IDictionary Inputs { get; set; } + /// + /// Outputs for the pipeline job + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , and . + /// + public IDictionary Outputs { get; set; } /// ARM resource ID of source job. public ResourceIdentifier SourceJobId { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointServiceConnectionStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointServiceConnectionStatus.cs index 6f7d455218588..41784b61a4ccf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointServiceConnectionStatus.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointServiceConnectionStatus.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Connection status of the service consumer with the service provider. + /// The private endpoint connection status. public readonly partial struct MachineLearningPrivateEndpointServiceConnectionStatus : IEquatable { private readonly string _value; @@ -22,16 +22,16 @@ public MachineLearningPrivateEndpointServiceConnectionStatus(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string ApprovedValue = "Approved"; private const string PendingValue = "Pending"; + private const string ApprovedValue = "Approved"; private const string RejectedValue = "Rejected"; private const string DisconnectedValue = "Disconnected"; private const string TimeoutValue = "Timeout"; - /// Approved. - public static MachineLearningPrivateEndpointServiceConnectionStatus Approved { get; } = new MachineLearningPrivateEndpointServiceConnectionStatus(ApprovedValue); /// Pending. public static MachineLearningPrivateEndpointServiceConnectionStatus Pending { get; } = new MachineLearningPrivateEndpointServiceConnectionStatus(PendingValue); + /// Approved. + public static MachineLearningPrivateEndpointServiceConnectionStatus Approved { get; } = new MachineLearningPrivateEndpointServiceConnectionStatus(ApprovedValue); /// Rejected. public static MachineLearningPrivateEndpointServiceConnectionStatus Rejected { get; } = new MachineLearningPrivateEndpointServiceConnectionStatus(RejectedValue); /// Disconnected. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResource.cs index 2a942f1064856..10f90f3c9c26f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResource.cs @@ -62,8 +62,8 @@ public MachineLearningPrivateLinkResource(AzureLocation location) : base(locatio /// The systemData. /// The tags. /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. + /// The identity of the resource. + /// The sku of the workspace. /// The private link resource group id. /// The private link resource required member names. /// The private link resource Private link DNS zone name. @@ -83,9 +83,9 @@ internal MachineLearningPrivateLinkResource() { } - /// Managed service identity (system assigned and/or user assigned identities). + /// The identity of the resource. public ManagedServiceIdentity Identity { get; set; } - /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. + /// The sku of the workspace. public MachineLearningSku Sku { get; set; } /// The private link resource group id. public string GroupId { get; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResourceListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResourceListResult.cs index 99b210cb4b1f6..0b9d7ee0d6e8c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResourceListResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResourceListResult.cs @@ -52,7 +52,7 @@ internal MachineLearningPrivateLinkResourceListResult() } /// Initializes a new instance of . - /// + /// Array of private link resources. /// Keeps track of any properties unknown to the library. internal MachineLearningPrivateLinkResourceListResult(IReadOnlyList value, IDictionary serializedAdditionalRawData) { @@ -60,7 +60,7 @@ internal MachineLearningPrivateLinkResourceListResult(IReadOnlyList Gets the value. + /// Array of private link resources. public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.Serialization.cs index 32008d40b51aa..bea5e4d2754bb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.Serialization.cs @@ -26,20 +26,20 @@ void IJsonModel.Write(Utf8Json } writer.WriteStartObject(); - if (Optional.IsDefined(ActionsRequired)) + if (Optional.IsDefined(Status)) { - writer.WritePropertyName("actionsRequired"u8); - writer.WriteStringValue(ActionsRequired); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); } if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } - if (Optional.IsDefined(Status)) + if (Optional.IsDefined(ActionsRequired)) { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); + writer.WritePropertyName("actionsRequired"u8); + writer.WriteStringValue(ActionsRequired); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -79,16 +79,20 @@ internal static MachineLearningPrivateLinkServiceConnectionState DeserializeMach { return null; } - string actionsRequired = default; - string description = default; MachineLearningPrivateEndpointServiceConnectionStatus? status = default; + string description = default; + string actionsRequired = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("actionsRequired"u8)) + if (property.NameEquals("status"u8)) { - actionsRequired = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new MachineLearningPrivateEndpointServiceConnectionStatus(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -96,13 +100,9 @@ internal static MachineLearningPrivateLinkServiceConnectionState DeserializeMach description = property.Value.GetString(); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("actionsRequired"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new MachineLearningPrivateEndpointServiceConnectionStatus(property.Value.GetString()); + actionsRequired = property.Value.GetString(); continue; } if (options.Format != "W") @@ -111,7 +111,7 @@ internal static MachineLearningPrivateLinkServiceConnectionState DeserializeMach } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningPrivateLinkServiceConnectionState(actionsRequired, description, status, serializedAdditionalRawData); + return new MachineLearningPrivateLinkServiceConnectionState(status, description, actionsRequired, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.cs index 8ac332bbdae1c..9149a81c06e44 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.cs @@ -51,23 +51,23 @@ public MachineLearningPrivateLinkServiceConnectionState() } /// Initializes a new instance of . - /// Some RP chose "None". Other RPs use this for region expansion. - /// User-defined message that, per NRP doc, may be used for approval-related message. - /// Connection status of the service consumer with the service provider. + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// The reason for approval/rejection of the connection. + /// A message indicating if changes on the service provider require any updates on the consumer. /// Keeps track of any properties unknown to the library. - internal MachineLearningPrivateLinkServiceConnectionState(string actionsRequired, string description, MachineLearningPrivateEndpointServiceConnectionStatus? status, IDictionary serializedAdditionalRawData) + internal MachineLearningPrivateLinkServiceConnectionState(MachineLearningPrivateEndpointServiceConnectionStatus? status, string description, string actionsRequired, IDictionary serializedAdditionalRawData) { - ActionsRequired = actionsRequired; - Description = description; Status = status; + Description = description; + ActionsRequired = actionsRequired; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Some RP chose "None". Other RPs use this for region expansion. - public string ActionsRequired { get; set; } - /// User-defined message that, per NRP doc, may be used for approval-related message. - public string Description { get; set; } - /// Connection status of the service consumer with the service provider. + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. public MachineLearningPrivateEndpointServiceConnectionStatus? Status { get; set; } + /// The reason for approval/rejection of the connection. + public string Description { get; set; } + /// A message indicating if changes on the service provider require any updates on the consumer. + public string ActionsRequired { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProbeSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProbeSettings.Serialization.cs index 9ad0daf1d08fd..27d8ca8a7910d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProbeSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProbeSettings.Serialization.cs @@ -31,6 +31,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("failureThreshold"u8); writer.WriteNumberValue(FailureThreshold.Value); } + if (Optional.IsDefined(SuccessThreshold)) + { + writer.WritePropertyName("successThreshold"u8); + writer.WriteNumberValue(SuccessThreshold.Value); + } + if (Optional.IsDefined(Timeout)) + { + writer.WritePropertyName("timeout"u8); + writer.WriteStringValue(Timeout.Value, "P"); + } + if (Optional.IsDefined(Period)) + { + writer.WritePropertyName("period"u8); + writer.WriteStringValue(Period.Value, "P"); + } if (Optional.IsDefined(InitialDelay)) { if (InitialDelay != null) @@ -43,21 +58,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteNull("initialDelay"); } } - if (Optional.IsDefined(Period)) - { - writer.WritePropertyName("period"u8); - writer.WriteStringValue(Period.Value, "P"); - } - if (Optional.IsDefined(SuccessThreshold)) - { - writer.WritePropertyName("successThreshold"u8); - writer.WriteNumberValue(SuccessThreshold.Value); - } - if (Optional.IsDefined(Timeout)) - { - writer.WritePropertyName("timeout"u8); - writer.WriteStringValue(Timeout.Value, "P"); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -97,10 +97,10 @@ internal static MachineLearningProbeSettings DeserializeMachineLearningProbeSett return null; } int? failureThreshold = default; - TimeSpan? initialDelay = default; - TimeSpan? period = default; int? successThreshold = default; TimeSpan? timeout = default; + TimeSpan? period = default; + TimeSpan? initialDelay = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -114,41 +114,41 @@ internal static MachineLearningProbeSettings DeserializeMachineLearningProbeSett failureThreshold = property.Value.GetInt32(); continue; } - if (property.NameEquals("initialDelay"u8)) + if (property.NameEquals("successThreshold"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - initialDelay = null; continue; } - initialDelay = property.Value.GetTimeSpan("P"); + successThreshold = property.Value.GetInt32(); continue; } - if (property.NameEquals("period"u8)) + if (property.NameEquals("timeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - period = property.Value.GetTimeSpan("P"); + timeout = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("successThreshold"u8)) + if (property.NameEquals("period"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - successThreshold = property.Value.GetInt32(); + period = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("timeout"u8)) + if (property.NameEquals("initialDelay"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + initialDelay = null; continue; } - timeout = property.Value.GetTimeSpan("P"); + initialDelay = property.Value.GetTimeSpan("P"); continue; } if (options.Format != "W") @@ -159,10 +159,10 @@ internal static MachineLearningProbeSettings DeserializeMachineLearningProbeSett serializedAdditionalRawData = rawDataDictionary; return new MachineLearningProbeSettings( failureThreshold, - initialDelay, - period, successThreshold, timeout, + period, + initialDelay, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProbeSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProbeSettings.cs index ba0fe153bb995..f0129cbc79a96 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProbeSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProbeSettings.cs @@ -52,30 +52,30 @@ public MachineLearningProbeSettings() /// Initializes a new instance of . /// The number of failures to allow before returning an unhealthy status. - /// The delay before the first probe in ISO 8601 format. - /// The length of time between probes in ISO 8601 format. /// The number of successful probes before returning a healthy status. /// The probe timeout in ISO 8601 format. + /// The length of time between probes in ISO 8601 format. + /// The delay before the first probe in ISO 8601 format. /// Keeps track of any properties unknown to the library. - internal MachineLearningProbeSettings(int? failureThreshold, TimeSpan? initialDelay, TimeSpan? period, int? successThreshold, TimeSpan? timeout, IDictionary serializedAdditionalRawData) + internal MachineLearningProbeSettings(int? failureThreshold, int? successThreshold, TimeSpan? timeout, TimeSpan? period, TimeSpan? initialDelay, IDictionary serializedAdditionalRawData) { FailureThreshold = failureThreshold; - InitialDelay = initialDelay; - Period = period; SuccessThreshold = successThreshold; Timeout = timeout; + Period = period; + InitialDelay = initialDelay; _serializedAdditionalRawData = serializedAdditionalRawData; } /// The number of failures to allow before returning an unhealthy status. public int? FailureThreshold { get; set; } - /// The delay before the first probe in ISO 8601 format. - public TimeSpan? InitialDelay { get; set; } - /// The length of time between probes in ISO 8601 format. - public TimeSpan? Period { get; set; } /// The number of successful probes before returning a healthy status. public int? SuccessThreshold { get; set; } /// The probe timeout in ISO 8601 format. public TimeSpan? Timeout { get; set; } + /// The length of time between probes in ISO 8601 format. + public TimeSpan? Period { get; set; } + /// The delay before the first probe in ISO 8601 format. + public TimeSpan? InitialDelay { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProvisioningState.cs index 3249d2b6b26e1..8935824276504 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProvisioningState.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProvisioningState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. public readonly partial struct MachineLearningProvisioningState : IEquatable { private readonly string _value; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceSchedule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceSchedule.Serialization.cs index 91e4690136eb5..60afc8f8f3950 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceSchedule.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceSchedule.Serialization.cs @@ -40,38 +40,38 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNumberValue(item); } writer.WriteEndArray(); - if (Optional.IsCollectionDefined(MonthDays)) + if (Optional.IsCollectionDefined(WeekDays)) { - if (MonthDays != null) + if (WeekDays != null) { - writer.WritePropertyName("monthDays"u8); + writer.WritePropertyName("weekDays"u8); writer.WriteStartArray(); - foreach (var item in MonthDays) + foreach (var item in WeekDays) { - writer.WriteNumberValue(item); + writer.WriteStringValue(item.ToString()); } writer.WriteEndArray(); } else { - writer.WriteNull("monthDays"); + writer.WriteNull("weekDays"); } } - if (Optional.IsCollectionDefined(WeekDays)) + if (Optional.IsCollectionDefined(MonthDays)) { - if (WeekDays != null) + if (MonthDays != null) { - writer.WritePropertyName("weekDays"u8); + writer.WritePropertyName("monthDays"u8); writer.WriteStartArray(); - foreach (var item in WeekDays) + foreach (var item in MonthDays) { - writer.WriteStringValue(item.ToString()); + writer.WriteNumberValue(item); } writer.WriteEndArray(); } else { - writer.WriteNull("weekDays"); + writer.WriteNull("monthDays"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -114,8 +114,8 @@ internal static MachineLearningRecurrenceSchedule DeserializeMachineLearningRecu } IList hours = default; IList minutes = default; - IList monthDays = default; IList weekDays = default; + IList monthDays = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -140,34 +140,34 @@ internal static MachineLearningRecurrenceSchedule DeserializeMachineLearningRecu minutes = array; continue; } - if (property.NameEquals("monthDays"u8)) + if (property.NameEquals("weekDays"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - monthDays = null; + weekDays = null; continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(item.GetInt32()); + array.Add(new MachineLearningDayOfWeek(item.GetString())); } - monthDays = array; + weekDays = array; continue; } - if (property.NameEquals("weekDays"u8)) + if (property.NameEquals("monthDays"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - weekDays = null; + monthDays = null; continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(new MachineLearningDayOfWeek(item.GetString())); + array.Add(item.GetInt32()); } - weekDays = array; + monthDays = array; continue; } if (options.Format != "W") @@ -176,7 +176,7 @@ internal static MachineLearningRecurrenceSchedule DeserializeMachineLearningRecu } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningRecurrenceSchedule(hours, minutes, monthDays ?? new ChangeTrackingList(), weekDays ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new MachineLearningRecurrenceSchedule(hours, minutes, weekDays ?? new ChangeTrackingList(), monthDays ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceSchedule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceSchedule.cs index 90a74c59487be..37359cdb380f4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceSchedule.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceSchedule.cs @@ -57,22 +57,22 @@ public MachineLearningRecurrenceSchedule(IEnumerable hours, IEnumerable(); WeekDays = new ChangeTrackingList(); + MonthDays = new ChangeTrackingList(); } /// Initializes a new instance of . /// [Required] List of hours for the schedule. /// [Required] List of minutes for the schedule. - /// List of month days for the schedule. /// List of days for the schedule. + /// List of month days for the schedule. /// Keeps track of any properties unknown to the library. - internal MachineLearningRecurrenceSchedule(IList hours, IList minutes, IList monthDays, IList weekDays, IDictionary serializedAdditionalRawData) + internal MachineLearningRecurrenceSchedule(IList hours, IList minutes, IList weekDays, IList monthDays, IDictionary serializedAdditionalRawData) { Hours = hours; Minutes = minutes; - MonthDays = monthDays; WeekDays = weekDays; + MonthDays = monthDays; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -85,9 +85,9 @@ internal MachineLearningRecurrenceSchedule() public IList Hours { get; } /// [Required] List of minutes for the schedule. public IList Minutes { get; } - /// List of month days for the schedule. - public IList MonthDays { get; set; } /// List of days for the schedule. public IList WeekDays { get; set; } + /// List of month days for the schedule. + public IList MonthDays { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceTrigger.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceTrigger.Serialization.cs index 0f4918e05be2c..dcf3d0d2a6f87 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceTrigger.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceTrigger.Serialization.cs @@ -42,6 +42,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNull("schedule"); } } + writer.WritePropertyName("triggerType"u8); + writer.WriteStringValue(TriggerType.ToString()); if (Optional.IsDefined(EndTime)) { if (EndTime != null) @@ -71,8 +73,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WritePropertyName("timeZone"u8); writer.WriteStringValue(TimeZone); } - writer.WritePropertyName("triggerType"u8); - writer.WriteStringValue(TriggerType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -114,10 +114,10 @@ internal static MachineLearningRecurrenceTrigger DeserializeMachineLearningRecur MachineLearningRecurrenceFrequency frequency = default; int interval = default; MachineLearningRecurrenceSchedule schedule = default; + TriggerType triggerType = default; string endTime = default; string startTime = default; string timeZone = default; - TriggerType triggerType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -142,6 +142,11 @@ internal static MachineLearningRecurrenceTrigger DeserializeMachineLearningRecur schedule = MachineLearningRecurrenceSchedule.DeserializeMachineLearningRecurrenceSchedule(property.Value, options); continue; } + if (property.NameEquals("triggerType"u8)) + { + triggerType = new TriggerType(property.Value.GetString()); + continue; + } if (property.NameEquals("endTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -167,11 +172,6 @@ internal static MachineLearningRecurrenceTrigger DeserializeMachineLearningRecur timeZone = property.Value.GetString(); continue; } - if (property.NameEquals("triggerType"u8)) - { - triggerType = new TriggerType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -179,10 +179,10 @@ internal static MachineLearningRecurrenceTrigger DeserializeMachineLearningRecur } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningRecurrenceTrigger( + triggerType, endTime, startTime, timeZone, - triggerType, serializedAdditionalRawData, frequency, interval, diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceTrigger.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceTrigger.cs index 3e93f5e51107e..b757faf8d24cf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceTrigger.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceTrigger.cs @@ -24,6 +24,7 @@ public MachineLearningRecurrenceTrigger(MachineLearningRecurrenceFrequency frequ } /// Initializes a new instance of . + /// [Required]. /// /// Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. /// Recommented format would be "2022-06-01T00:00:01" @@ -34,12 +35,11 @@ public MachineLearningRecurrenceTrigger(MachineLearningRecurrenceFrequency frequ /// Specifies time zone in which the schedule runs. /// TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 /// - /// [Required]. /// Keeps track of any properties unknown to the library. /// [Required] The frequency to trigger schedule. /// [Required] Specifies schedule interval in conjunction with frequency. /// The recurrence schedule. - internal MachineLearningRecurrenceTrigger(string endTime, string startTime, string timeZone, TriggerType triggerType, IDictionary serializedAdditionalRawData, MachineLearningRecurrenceFrequency frequency, int interval, MachineLearningRecurrenceSchedule schedule) : base(endTime, startTime, timeZone, triggerType, serializedAdditionalRawData) + internal MachineLearningRecurrenceTrigger(TriggerType triggerType, string endTime, string startTime, string timeZone, IDictionary serializedAdditionalRawData, MachineLearningRecurrenceFrequency frequency, int interval, MachineLearningRecurrenceSchedule schedule) : base(triggerType, endTime, startTime, timeZone, serializedAdditionalRawData) { Frequency = frequency; Interval = interval; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceBase.Serialization.cs index a7b7016c293fa..79f6d02240744 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceBase.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceBase.Serialization.cs @@ -38,13 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -53,16 +53,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -71,7 +71,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -113,8 +113,8 @@ internal static MachineLearningResourceBase DeserializeMachineLearningResourceBa return null; } string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -129,11 +129,11 @@ internal static MachineLearningResourceBase DeserializeMachineLearningResourceBa description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -141,14 +141,14 @@ internal static MachineLearningResourceBase DeserializeMachineLearningResourceBa { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -156,7 +156,7 @@ internal static MachineLearningResourceBase DeserializeMachineLearningResourceBa { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -165,7 +165,7 @@ internal static MachineLearningResourceBase DeserializeMachineLearningResourceBa } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningResourceBase(description, properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new MachineLearningResourceBase(description, tags ?? new ChangeTrackingDictionary(), properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceBase.cs index 6302dd5a8140a..ee1ee9c6fd351 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceBase.cs @@ -48,28 +48,28 @@ public partial class MachineLearningResourceBase /// Initializes a new instance of . public MachineLearningResourceBase() { - Properties = new ChangeTrackingDictionary(); Tags = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - internal MachineLearningResourceBase(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData) + internal MachineLearningResourceBase(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData) { Description = description; - Properties = properties; Tags = tags; + Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } /// The asset description text. public string Description { get; set; } - /// The asset property dictionary. - public IDictionary Properties { get; set; } /// Tag dictionary. Tags can be added, removed, and updated. public IDictionary Tags { get; set; } + /// The asset property dictionary. + public IDictionary Properties { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.Serialization.cs index d55249f7f6dd8..abe190d66ee2c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.Serialization.cs @@ -43,11 +43,6 @@ void IJsonModel.Write(Utf8JsonWri writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -63,6 +58,11 @@ void IJsonModel.Write(Utf8JsonWri writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -74,16 +74,6 @@ void IJsonModel.Write(Utf8JsonWri } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -94,15 +84,15 @@ void IJsonModel.Write(Utf8JsonWri } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -146,16 +136,14 @@ internal static MachineLearningSasAuthTypeWorkspaceConnection DeserializeMachine MachineLearningConnectionAuthType authType = default; MachineLearningConnectionCategory? category = default; ResourceIdentifier createdByWorkspaceArmId = default; - string error = default; DateTimeOffset? expiryTime = default; ConnectionGroup? group = default; bool? isSharedToAll = default; + string target = default; IDictionary metadata = default; - ManagedPERequirement? peRequirement = default; - ManagedPEStatus? peStatus = default; IList sharedUserList = default; - string target = default; - bool? useWorkspaceManagedIdentity = default; + string value = default; + MachineLearningValueFormat? valueFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -192,11 +180,6 @@ internal static MachineLearningSasAuthTypeWorkspaceConnection DeserializeMachine createdByWorkspaceArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } if (property.NameEquals("expiryTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,6 +207,11 @@ internal static MachineLearningSasAuthTypeWorkspaceConnection DeserializeMachine isSharedToAll = property.Value.GetBoolean(); continue; } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -238,24 +226,6 @@ internal static MachineLearningSasAuthTypeWorkspaceConnection DeserializeMachine metadata = dictionary; continue; } - if (property.NameEquals("peRequirement"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peRequirement = new ManagedPERequirement(property.Value.GetString()); - continue; - } - if (property.NameEquals("peStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peStatus = new ManagedPEStatus(property.Value.GetString()); - continue; - } if (property.NameEquals("sharedUserList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -270,18 +240,18 @@ internal static MachineLearningSasAuthTypeWorkspaceConnection DeserializeMachine sharedUserList = array; continue; } - if (property.NameEquals("target"u8)) + if (property.NameEquals("value"u8)) { - target = property.Value.GetString(); + value = property.Value.GetString(); continue; } - if (property.NameEquals("useWorkspaceManagedIdentity"u8)) + if (property.NameEquals("valueFormat"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - useWorkspaceManagedIdentity = property.Value.GetBoolean(); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } if (options.Format != "W") @@ -294,16 +264,14 @@ internal static MachineLearningSasAuthTypeWorkspaceConnection DeserializeMachine authType, category, createdByWorkspaceArmId, - error, expiryTime, group, isSharedToAll, + target, metadata ?? new ChangeTrackingDictionary(), - peRequirement, - peStatus, sharedUserList ?? new ChangeTrackingList(), - target, - useWorkspaceManagedIdentity, + value, + valueFormat, serializedAdditionalRawData, credentials); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.cs index 970cce1336077..8cb7b0ab4866d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.cs @@ -24,19 +24,17 @@ public MachineLearningSasAuthTypeWorkspaceConnection() /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. /// - internal MachineLearningSasAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData, WorkspaceConnectionSharedAccessSignature credentials) : base(authType, category, createdByWorkspaceArmId, error, expiryOn, group, isSharedToAll, metadata, peRequirement, peStatus, sharedUserList, target, useWorkspaceManagedIdentity, serializedAdditionalRawData) + internal MachineLearningSasAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData, WorkspaceConnectionSharedAccessSignature credentials) : base(authType, category, createdByWorkspaceArmId, expiryOn, group, isSharedToAll, target, metadata, sharedUserList, value, valueFormat, serializedAdditionalRawData) { Credentials = credentials; AuthType = authType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.Serialization.cs index a1abb03cdb425..0d2791fb096ff 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.Serialization.cs @@ -26,8 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); - writer.WritePropertyName("action"u8); - writer.WriteObjectValue(Action, options); if (Optional.IsDefined(DisplayName)) { if (DisplayName != null) @@ -45,13 +43,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("isEnabled"u8); writer.WriteBooleanValue(IsEnabled.Value); } + writer.WritePropertyName("trigger"u8); + writer.WriteObjectValue(Trigger, options); + writer.WritePropertyName("action"u8); + writer.WriteObjectValue(Action, options); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); } - writer.WritePropertyName("trigger"u8); - writer.WriteObjectValue(Trigger, options); if (Optional.IsDefined(Description)) { if (Description != null) @@ -64,13 +64,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -79,16 +79,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -97,7 +97,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -138,23 +138,18 @@ internal static MachineLearningScheduleProperties DeserializeMachineLearningSche { return null; } - MachineLearningScheduleAction action = default; string displayName = default; bool? isEnabled = default; - MachineLearningScheduleProvisioningStatus? provisioningState = default; MachineLearningTriggerBase trigger = default; + MachineLearningScheduleAction action = default; + MachineLearningScheduleProvisioningStatus? provisioningState = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("action"u8)) - { - action = MachineLearningScheduleAction.DeserializeMachineLearningScheduleAction(property.Value, options); - continue; - } if (property.NameEquals("displayName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -174,6 +169,16 @@ internal static MachineLearningScheduleProperties DeserializeMachineLearningSche isEnabled = property.Value.GetBoolean(); continue; } + if (property.NameEquals("trigger"u8)) + { + trigger = MachineLearningTriggerBase.DeserializeMachineLearningTriggerBase(property.Value, options); + continue; + } + if (property.NameEquals("action"u8)) + { + action = MachineLearningScheduleAction.DeserializeMachineLearningScheduleAction(property.Value, options); + continue; + } if (property.NameEquals("provisioningState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -183,11 +188,6 @@ internal static MachineLearningScheduleProperties DeserializeMachineLearningSche provisioningState = new MachineLearningScheduleProvisioningStatus(property.Value.GetString()); continue; } - if (property.NameEquals("trigger"u8)) - { - trigger = MachineLearningTriggerBase.DeserializeMachineLearningTriggerBase(property.Value, options); - continue; - } if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -198,11 +198,11 @@ internal static MachineLearningScheduleProperties DeserializeMachineLearningSche description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -210,14 +210,14 @@ internal static MachineLearningScheduleProperties DeserializeMachineLearningSche { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -225,7 +225,7 @@ internal static MachineLearningScheduleProperties DeserializeMachineLearningSche { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -236,14 +236,14 @@ internal static MachineLearningScheduleProperties DeserializeMachineLearningSche serializedAdditionalRawData = rawDataDictionary; return new MachineLearningScheduleProperties( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - action, displayName, isEnabled, - provisioningState, - trigger); + trigger, + action, + provisioningState); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.cs index b011f9ad9a545..25f38f0aec440 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.cs @@ -14,51 +14,51 @@ namespace Azure.ResourceManager.MachineLearning.Models public partial class MachineLearningScheduleProperties : MachineLearningResourceBase { /// Initializes a new instance of . - /// - /// [Required] Specifies the action of the schedule - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// /// /// [Required] Specifies the trigger details /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - /// or is null. - public MachineLearningScheduleProperties(MachineLearningScheduleAction action, MachineLearningTriggerBase trigger) + /// + /// [Required] Specifies the action of the schedule + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// or is null. + public MachineLearningScheduleProperties(MachineLearningTriggerBase trigger, MachineLearningScheduleAction action) { - Argument.AssertNotNull(action, nameof(action)); Argument.AssertNotNull(trigger, nameof(trigger)); + Argument.AssertNotNull(action, nameof(action)); - Action = action; Trigger = trigger; + Action = action; } /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// - /// [Required] Specifies the action of the schedule - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// /// Display name of schedule. /// Is the schedule enabled?. - /// Provisioning state for the schedule. /// /// [Required] Specifies the trigger details /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - internal MachineLearningScheduleProperties(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, MachineLearningScheduleAction action, string displayName, bool? isEnabled, MachineLearningScheduleProvisioningStatus? provisioningState, MachineLearningTriggerBase trigger) : base(description, properties, tags, serializedAdditionalRawData) + /// + /// [Required] Specifies the action of the schedule + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Provisioning state for the schedule. + internal MachineLearningScheduleProperties(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, string displayName, bool? isEnabled, MachineLearningTriggerBase trigger, MachineLearningScheduleAction action, MachineLearningScheduleProvisioningStatus? provisioningState) : base(description, tags, properties, serializedAdditionalRawData) { - Action = action; DisplayName = displayName; IsEnabled = isEnabled; - ProvisioningState = provisioningState; Trigger = trigger; + Action = action; + ProvisioningState = provisioningState; } /// Initializes a new instance of for deserialization. @@ -66,23 +66,23 @@ internal MachineLearningScheduleProperties() { } - /// - /// [Required] Specifies the action of the schedule - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public MachineLearningScheduleAction Action { get; set; } /// Display name of schedule. public string DisplayName { get; set; } /// Is the schedule enabled?. public bool? IsEnabled { get; set; } - /// Provisioning state for the schedule. - public MachineLearningScheduleProvisioningStatus? ProvisioningState { get; } /// /// [Required] Specifies the trigger details /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// public MachineLearningTriggerBase Trigger { get; set; } + /// + /// [Required] Specifies the action of the schedule + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MachineLearningScheduleAction Action { get; set; } + /// Provisioning state for the schedule. + public MachineLearningScheduleProvisioningStatus? ProvisioningState { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.cs index f8107b25e3bc8..19f743f57cd3d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.cs @@ -51,7 +51,7 @@ public MachineLearningScriptReference() } /// Initializes a new instance of . - /// The storage source of the script: inline, workspace. + /// The storage source of the script: workspace. /// The location of scripts in the mounted volume. /// Optional command line arguments passed to the script to run. /// Optional time period passed to timeout command. @@ -65,7 +65,7 @@ internal MachineLearningScriptReference(string scriptSource, string scriptData, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The storage source of the script: inline, workspace. + /// The storage source of the script: workspace. public string ScriptSource { get; set; } /// The location of scripts in the mounted volume. public string ScriptData { get; set; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreCredentials.Serialization.cs index 6e6d9ec15f77d..faad3c0a37c2e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreCredentials.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreCredentials.Serialization.cs @@ -38,8 +38,6 @@ void IJsonModel.Write(Utf8J writer.WriteNull("authorityUrl"); } } - writer.WritePropertyName("clientId"u8); - writer.WriteStringValue(ClientId); if (Optional.IsDefined(ResourceUri)) { if (ResourceUri != null) @@ -52,10 +50,12 @@ void IJsonModel.Write(Utf8J writer.WriteNull("resourceUrl"); } } - writer.WritePropertyName("secrets"u8); - writer.WriteObjectValue(Secrets, options); writer.WritePropertyName("tenantId"u8); writer.WriteStringValue(TenantId); + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); + writer.WritePropertyName("secrets"u8); + writer.WriteObjectValue(Secrets, options); writer.WritePropertyName("credentialsType"u8); writer.WriteStringValue(CredentialsType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -97,10 +97,10 @@ internal static MachineLearningServicePrincipalDatastoreCredentials DeserializeM return null; } Uri authorityUrl = default; - Guid clientId = default; Uri resourceUrl = default; - MachineLearningServicePrincipalDatastoreSecrets secrets = default; Guid tenantId = default; + Guid clientId = default; + MachineLearningServicePrincipalDatastoreSecrets secrets = default; CredentialsType credentialsType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -116,11 +116,6 @@ internal static MachineLearningServicePrincipalDatastoreCredentials DeserializeM authorityUrl = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("clientId"u8)) - { - clientId = property.Value.GetGuid(); - continue; - } if (property.NameEquals("resourceUrl"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -131,14 +126,19 @@ internal static MachineLearningServicePrincipalDatastoreCredentials DeserializeM resourceUrl = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("secrets"u8)) + if (property.NameEquals("tenantId"u8)) { - secrets = MachineLearningServicePrincipalDatastoreSecrets.DeserializeMachineLearningServicePrincipalDatastoreSecrets(property.Value, options); + tenantId = property.Value.GetGuid(); continue; } - if (property.NameEquals("tenantId"u8)) + if (property.NameEquals("clientId"u8)) { - tenantId = property.Value.GetGuid(); + clientId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("secrets"u8)) + { + secrets = MachineLearningServicePrincipalDatastoreSecrets.DeserializeMachineLearningServicePrincipalDatastoreSecrets(property.Value, options); continue; } if (property.NameEquals("credentialsType"u8)) @@ -156,10 +156,10 @@ internal static MachineLearningServicePrincipalDatastoreCredentials DeserializeM credentialsType, serializedAdditionalRawData, authorityUrl, - clientId, resourceUrl, - secrets, - tenantId); + tenantId, + clientId, + secrets); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreCredentials.cs index 377948614b36e..be1fbc84d9321 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreCredentials.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreCredentials.cs @@ -14,17 +14,17 @@ namespace Azure.ResourceManager.MachineLearning.Models public partial class MachineLearningServicePrincipalDatastoreCredentials : MachineLearningDatastoreCredentials { /// Initializes a new instance of . + /// [Required] ID of the tenant to which the service principal belongs. /// [Required] Service principal client ID. /// [Required] Service principal secrets. - /// [Required] ID of the tenant to which the service principal belongs. /// is null. - public MachineLearningServicePrincipalDatastoreCredentials(Guid clientId, MachineLearningServicePrincipalDatastoreSecrets secrets, Guid tenantId) + public MachineLearningServicePrincipalDatastoreCredentials(Guid tenantId, Guid clientId, MachineLearningServicePrincipalDatastoreSecrets secrets) { Argument.AssertNotNull(secrets, nameof(secrets)); + TenantId = tenantId; ClientId = clientId; Secrets = secrets; - TenantId = tenantId; CredentialsType = CredentialsType.ServicePrincipal; } @@ -32,17 +32,17 @@ public MachineLearningServicePrincipalDatastoreCredentials(Guid clientId, Machin /// [Required] Credential type used to authentication with storage. /// Keeps track of any properties unknown to the library. /// Authority URL used for authentication. - /// [Required] Service principal client ID. /// Resource the service principal has access to. - /// [Required] Service principal secrets. /// [Required] ID of the tenant to which the service principal belongs. - internal MachineLearningServicePrincipalDatastoreCredentials(CredentialsType credentialsType, IDictionary serializedAdditionalRawData, Uri authorityUri, Guid clientId, Uri resourceUri, MachineLearningServicePrincipalDatastoreSecrets secrets, Guid tenantId) : base(credentialsType, serializedAdditionalRawData) + /// [Required] Service principal client ID. + /// [Required] Service principal secrets. + internal MachineLearningServicePrincipalDatastoreCredentials(CredentialsType credentialsType, IDictionary serializedAdditionalRawData, Uri authorityUri, Uri resourceUri, Guid tenantId, Guid clientId, MachineLearningServicePrincipalDatastoreSecrets secrets) : base(credentialsType, serializedAdditionalRawData) { AuthorityUri = authorityUri; - ClientId = clientId; ResourceUri = resourceUri; - Secrets = secrets; TenantId = tenantId; + ClientId = clientId; + Secrets = secrets; CredentialsType = credentialsType; } @@ -53,13 +53,13 @@ internal MachineLearningServicePrincipalDatastoreCredentials() /// Authority URL used for authentication. public Uri AuthorityUri { get; set; } - /// [Required] Service principal client ID. - public Guid ClientId { get; set; } /// Resource the service principal has access to. public Uri ResourceUri { get; set; } - /// [Required] Service principal secrets. - public MachineLearningServicePrincipalDatastoreSecrets Secrets { get; set; } /// [Required] ID of the tenant to which the service principal belongs. public Guid TenantId { get; set; } + /// [Required] Service principal client ID. + public Guid ClientId { get; set; } + /// [Required] Service principal secrets. + public MachineLearningServicePrincipalDatastoreSecrets Secrets { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.Serialization.cs index 4ab363e778824..e48ca1575507e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.Serialization.cs @@ -33,16 +33,16 @@ void IJsonModel.Write(Utf8JsonWriter w } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsDefined(GroupId)) - { - writer.WritePropertyName("groupId"u8); - writer.WriteStringValue(GroupId); - } if (Optional.IsDefined(PrivateLinkResourceId)) { writer.WritePropertyName("privateLinkResourceId"u8); writer.WriteStringValue(PrivateLinkResourceId); } + if (Optional.IsDefined(GroupId)) + { + writer.WritePropertyName("groupId"u8); + writer.WriteStringValue(GroupId); + } if (Optional.IsDefined(RequestMessage)) { writer.WritePropertyName("requestMessage"u8); @@ -93,8 +93,8 @@ internal static MachineLearningSharedPrivateLinkResource DeserializeMachineLearn return null; } string name = default; - string groupId = default; ResourceIdentifier privateLinkResourceId = default; + string groupId = default; string requestMessage = default; MachineLearningPrivateEndpointServiceConnectionStatus? status = default; IDictionary serializedAdditionalRawData = default; @@ -115,11 +115,6 @@ internal static MachineLearningSharedPrivateLinkResource DeserializeMachineLearn } foreach (var property0 in property.Value.EnumerateObject()) { - if (property0.NameEquals("groupId"u8)) - { - groupId = property0.Value.GetString(); - continue; - } if (property0.NameEquals("privateLinkResourceId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -129,6 +124,11 @@ internal static MachineLearningSharedPrivateLinkResource DeserializeMachineLearn privateLinkResourceId = new ResourceIdentifier(property0.Value.GetString()); continue; } + if (property0.NameEquals("groupId"u8)) + { + groupId = property0.Value.GetString(); + continue; + } if (property0.NameEquals("requestMessage"u8)) { requestMessage = property0.Value.GetString(); @@ -154,8 +154,8 @@ internal static MachineLearningSharedPrivateLinkResource DeserializeMachineLearn serializedAdditionalRawData = rawDataDictionary; return new MachineLearningSharedPrivateLinkResource( name, - groupId, privateLinkResourceId, + groupId, requestMessage, status, serializedAdditionalRawData); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.cs index 415a348fcb99e..2878924ef705f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.cs @@ -53,16 +53,16 @@ public MachineLearningSharedPrivateLinkResource() /// Initializes a new instance of . /// Unique name of the private link. - /// group id of the private link. - /// the resource id that private link links to. + /// The resource id that private link links to. + /// The private link resource group id. /// Request message. - /// Connection status of the service consumer with the service provider. + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. /// Keeps track of any properties unknown to the library. - internal MachineLearningSharedPrivateLinkResource(string name, string groupId, ResourceIdentifier privateLinkResourceId, string requestMessage, MachineLearningPrivateEndpointServiceConnectionStatus? status, IDictionary serializedAdditionalRawData) + internal MachineLearningSharedPrivateLinkResource(string name, ResourceIdentifier privateLinkResourceId, string groupId, string requestMessage, MachineLearningPrivateEndpointServiceConnectionStatus? status, IDictionary serializedAdditionalRawData) { Name = name; - GroupId = groupId; PrivateLinkResourceId = privateLinkResourceId; + GroupId = groupId; RequestMessage = requestMessage; Status = status; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -70,13 +70,13 @@ internal MachineLearningSharedPrivateLinkResource(string name, string groupId, R /// Unique name of the private link. public string Name { get; set; } - /// group id of the private link. - public string GroupId { get; set; } - /// the resource id that private link links to. + /// The resource id that private link links to. public ResourceIdentifier PrivateLinkResourceId { get; set; } + /// The private link resource group id. + public string GroupId { get; set; } /// Request message. public string RequestMessage { get; set; } - /// Connection status of the service consumer with the service provider. + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. public MachineLearningPrivateEndpointServiceConnectionStatus? Status { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuCapacity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuCapacity.Serialization.cs index da5a411878d16..f83a74cbd9251 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuCapacity.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuCapacity.Serialization.cs @@ -26,20 +26,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteStartObject(); - if (Optional.IsDefined(Default)) + if (Optional.IsDefined(Minimum)) { - writer.WritePropertyName("default"u8); - writer.WriteNumberValue(Default.Value); + writer.WritePropertyName("minimum"u8); + writer.WriteNumberValue(Minimum.Value); } if (Optional.IsDefined(Maximum)) { writer.WritePropertyName("maximum"u8); writer.WriteNumberValue(Maximum.Value); } - if (Optional.IsDefined(Minimum)) + if (Optional.IsDefined(Default)) { - writer.WritePropertyName("minimum"u8); - writer.WriteNumberValue(Minimum.Value); + writer.WritePropertyName("default"u8); + writer.WriteNumberValue(Default.Value); } if (Optional.IsDefined(ScaleType)) { @@ -84,21 +84,21 @@ internal static MachineLearningSkuCapacity DeserializeMachineLearningSkuCapacity { return null; } - int? @default = default; - int? maximum = default; int? minimum = default; + int? maximum = default; + int? @default = default; MachineLearningSkuScaleType? scaleType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("default"u8)) + if (property.NameEquals("minimum"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - @default = property.Value.GetInt32(); + minimum = property.Value.GetInt32(); continue; } if (property.NameEquals("maximum"u8)) @@ -110,13 +110,13 @@ internal static MachineLearningSkuCapacity DeserializeMachineLearningSkuCapacity maximum = property.Value.GetInt32(); continue; } - if (property.NameEquals("minimum"u8)) + if (property.NameEquals("default"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - minimum = property.Value.GetInt32(); + @default = property.Value.GetInt32(); continue; } if (property.NameEquals("scaleType"u8)) @@ -134,7 +134,7 @@ internal static MachineLearningSkuCapacity DeserializeMachineLearningSkuCapacity } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningSkuCapacity(@default, maximum, minimum, scaleType, serializedAdditionalRawData); + return new MachineLearningSkuCapacity(minimum, maximum, @default, scaleType, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuCapacity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuCapacity.cs index f73ceeab4e496..494ba447cc103 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuCapacity.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuCapacity.cs @@ -51,26 +51,26 @@ internal MachineLearningSkuCapacity() } /// Initializes a new instance of . - /// Gets or sets the default capacity. - /// Gets or sets the maximum. /// Gets or sets the minimum. + /// Gets or sets the maximum. + /// Gets or sets the default capacity. /// Gets or sets the type of the scale. /// Keeps track of any properties unknown to the library. - internal MachineLearningSkuCapacity(int? @default, int? maximum, int? minimum, MachineLearningSkuScaleType? scaleType, IDictionary serializedAdditionalRawData) + internal MachineLearningSkuCapacity(int? minimum, int? maximum, int? @default, MachineLearningSkuScaleType? scaleType, IDictionary serializedAdditionalRawData) { - Default = @default; - Maximum = maximum; Minimum = minimum; + Maximum = maximum; + Default = @default; ScaleType = scaleType; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the default capacity. - public int? Default { get; } - /// Gets or sets the maximum. - public int? Maximum { get; } /// Gets or sets the minimum. public int? Minimum { get; } + /// Gets or sets the maximum. + public int? Maximum { get; } + /// Gets or sets the default capacity. + public int? Default { get; } /// Gets or sets the type of the scale. public MachineLearningSkuScaleType? ScaleType { get; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuDetail.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuDetail.Serialization.cs index 8b5b2b47f0a79..64f899cb1453a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuDetail.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuDetail.Serialization.cs @@ -26,18 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } writer.WriteStartObject(); - if (Optional.IsDefined(Capacity)) - { - if (Capacity != null) - { - writer.WritePropertyName("capacity"u8); - writer.WriteObjectValue(Capacity, options); - } - else - { - writer.WriteNull("capacity"); - } - } if (options.Format != "W" && Optional.IsDefined(ResourceType)) { if (ResourceType != null) @@ -62,6 +50,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteNull("sku"); } } + if (Optional.IsDefined(Capacity)) + { + if (Capacity != null) + { + writer.WritePropertyName("capacity"u8); + writer.WriteObjectValue(Capacity, options); + } + else + { + writer.WriteNull("capacity"); + } + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -100,41 +100,41 @@ internal static MachineLearningSkuDetail DeserializeMachineLearningSkuDetail(Jso { return null; } - MachineLearningSkuCapacity capacity = default; string resourceType = default; MachineLearningSkuSetting sku = default; + MachineLearningSkuCapacity capacity = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("capacity"u8)) + if (property.NameEquals("resourceType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - capacity = null; + resourceType = null; continue; } - capacity = MachineLearningSkuCapacity.DeserializeMachineLearningSkuCapacity(property.Value, options); + resourceType = property.Value.GetString(); continue; } - if (property.NameEquals("resourceType"u8)) + if (property.NameEquals("sku"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - resourceType = null; + sku = null; continue; } - resourceType = property.Value.GetString(); + sku = MachineLearningSkuSetting.DeserializeMachineLearningSkuSetting(property.Value, options); continue; } - if (property.NameEquals("sku"u8)) + if (property.NameEquals("capacity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - sku = null; + capacity = null; continue; } - sku = MachineLearningSkuSetting.DeserializeMachineLearningSkuSetting(property.Value, options); + capacity = MachineLearningSkuCapacity.DeserializeMachineLearningSkuCapacity(property.Value, options); continue; } if (options.Format != "W") @@ -143,7 +143,7 @@ internal static MachineLearningSkuDetail DeserializeMachineLearningSkuDetail(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningSkuDetail(capacity, resourceType, sku, serializedAdditionalRawData); + return new MachineLearningSkuDetail(resourceType, sku, capacity, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuDetail.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuDetail.cs index d59d89861868b..5259c7d1c5f4e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuDetail.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuDetail.cs @@ -51,23 +51,23 @@ internal MachineLearningSkuDetail() } /// Initializes a new instance of . - /// Gets or sets the Sku Capacity. /// The resource type name. /// Gets or sets the Sku. + /// Gets or sets the Sku Capacity. /// Keeps track of any properties unknown to the library. - internal MachineLearningSkuDetail(MachineLearningSkuCapacity capacity, string resourceType, MachineLearningSkuSetting sku, IDictionary serializedAdditionalRawData) + internal MachineLearningSkuDetail(string resourceType, MachineLearningSkuSetting sku, MachineLearningSkuCapacity capacity, IDictionary serializedAdditionalRawData) { - Capacity = capacity; ResourceType = resourceType; Sku = sku; + Capacity = capacity; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the Sku Capacity. - public MachineLearningSkuCapacity Capacity { get; } /// The resource type name. public string ResourceType { get; } /// Gets or sets the Sku. public MachineLearningSkuSetting Sku { get; } + /// Gets or sets the Sku Capacity. + public MachineLearningSkuCapacity Capacity { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuPatch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuPatch.Serialization.cs index 3702a324655be..5a03147ea9603 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuPatch.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuPatch.Serialization.cs @@ -26,30 +26,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteStartObject(); - if (Optional.IsDefined(Capacity)) - { - writer.WritePropertyName("capacity"u8); - writer.WriteNumberValue(Capacity.Value); - } - if (Optional.IsDefined(Family)) - { - writer.WritePropertyName("family"u8); - writer.WriteStringValue(Family); - } if (Optional.IsDefined(Name)) { writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); } + if (Optional.IsDefined(Tier)) + { + writer.WritePropertyName("tier"u8); + writer.WriteStringValue(Tier.Value.ToSerialString()); + } if (Optional.IsDefined(Size)) { writer.WritePropertyName("size"u8); writer.WriteStringValue(Size); } - if (Optional.IsDefined(Tier)) + if (Optional.IsDefined(Family)) { - writer.WritePropertyName("tier"u8); - writer.WriteStringValue(Tier.Value.ToSerialString()); + writer.WritePropertyName("family"u8); + writer.WriteStringValue(Family); + } + if (Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"u8); + writer.WriteNumberValue(Capacity.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -89,46 +89,46 @@ internal static MachineLearningSkuPatch DeserializeMachineLearningSkuPatch(JsonE { return null; } - int? capacity = default; - string family = default; string name = default; - string size = default; MachineLearningSkuTier? tier = default; + string size = default; + string family = default; + int? capacity = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("capacity"u8)) + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("tier"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - capacity = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("family"u8)) - { - family = property.Value.GetString(); + tier = property.Value.GetString().ToMachineLearningSkuTier(); continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("size"u8)) { - name = property.Value.GetString(); + size = property.Value.GetString(); continue; } - if (property.NameEquals("size"u8)) + if (property.NameEquals("family"u8)) { - size = property.Value.GetString(); + family = property.Value.GetString(); continue; } - if (property.NameEquals("tier"u8)) + if (property.NameEquals("capacity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - tier = property.Value.GetString().ToMachineLearningSkuTier(); + capacity = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -138,11 +138,11 @@ internal static MachineLearningSkuPatch DeserializeMachineLearningSkuPatch(JsonE } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningSkuPatch( - capacity, - family, name, - size, tier, + size, + family, + capacity, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuPatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuPatch.cs index 7689cf09b074a..3b8286b7638e7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuPatch.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuPatch.cs @@ -51,31 +51,31 @@ public MachineLearningSkuPatch() } /// Initializes a new instance of . - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. /// The name of the SKU. Ex - P3. It is typically a letter+number code. - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. /// Keeps track of any properties unknown to the library. - internal MachineLearningSkuPatch(int? capacity, string family, string name, string size, MachineLearningSkuTier? tier, IDictionary serializedAdditionalRawData) + internal MachineLearningSkuPatch(string name, MachineLearningSkuTier? tier, string size, string family, int? capacity, IDictionary serializedAdditionalRawData) { - Capacity = capacity; - Family = family; Name = name; - Size = size; Tier = tier; + Size = size; + Family = family; + Capacity = capacity; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. - public int? Capacity { get; set; } - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - public string Family { get; set; } /// The name of the SKU. Ex - P3. It is typically a letter+number code. public string Name { get; set; } - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - public string Size { get; set; } /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. public MachineLearningSkuTier? Tier { get; set; } + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + public string Size { get; set; } + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + public string Family { get; set; } + /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. + public int? Capacity { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackEnsembleSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackEnsembleSettings.Serialization.cs index de3610a49ed78..d1cde7f3df837 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackEnsembleSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackEnsembleSettings.Serialization.cs @@ -26,6 +26,16 @@ void IJsonModel.Write(Utf8JsonWriter write } writer.WriteStartObject(); + if (Optional.IsDefined(StackMetaLearnerType)) + { + writer.WritePropertyName("stackMetaLearnerType"u8); + writer.WriteStringValue(StackMetaLearnerType.Value.ToString()); + } + if (Optional.IsDefined(StackMetaLearnerTrainPercentage)) + { + writer.WritePropertyName("stackMetaLearnerTrainPercentage"u8); + writer.WriteNumberValue(StackMetaLearnerTrainPercentage.Value); + } if (Optional.IsDefined(StackMetaLearnerKWargs)) { if (StackMetaLearnerKWargs != null) @@ -45,16 +55,6 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteNull("stackMetaLearnerKWargs"); } } - if (Optional.IsDefined(StackMetaLearnerTrainPercentage)) - { - writer.WritePropertyName("stackMetaLearnerTrainPercentage"u8); - writer.WriteNumberValue(StackMetaLearnerTrainPercentage.Value); - } - if (Optional.IsDefined(StackMetaLearnerType)) - { - writer.WritePropertyName("stackMetaLearnerType"u8); - writer.WriteStringValue(StackMetaLearnerType.Value.ToString()); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -93,21 +93,20 @@ internal static MachineLearningStackEnsembleSettings DeserializeMachineLearningS { return null; } - BinaryData stackMetaLearnerKWargs = default; - double? stackMetaLearnerTrainPercentage = default; MachineLearningStackMetaLearnerType? stackMetaLearnerType = default; + double? stackMetaLearnerTrainPercentage = default; + BinaryData stackMetaLearnerKWargs = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("stackMetaLearnerKWargs"u8)) + if (property.NameEquals("stackMetaLearnerType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - stackMetaLearnerKWargs = null; continue; } - stackMetaLearnerKWargs = BinaryData.FromString(property.Value.GetRawText()); + stackMetaLearnerType = new MachineLearningStackMetaLearnerType(property.Value.GetString()); continue; } if (property.NameEquals("stackMetaLearnerTrainPercentage"u8)) @@ -119,13 +118,14 @@ internal static MachineLearningStackEnsembleSettings DeserializeMachineLearningS stackMetaLearnerTrainPercentage = property.Value.GetDouble(); continue; } - if (property.NameEquals("stackMetaLearnerType"u8)) + if (property.NameEquals("stackMetaLearnerKWargs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + stackMetaLearnerKWargs = null; continue; } - stackMetaLearnerType = new MachineLearningStackMetaLearnerType(property.Value.GetString()); + stackMetaLearnerKWargs = BinaryData.FromString(property.Value.GetRawText()); continue; } if (options.Format != "W") @@ -134,7 +134,7 @@ internal static MachineLearningStackEnsembleSettings DeserializeMachineLearningS } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningStackEnsembleSettings(stackMetaLearnerKWargs, stackMetaLearnerTrainPercentage, stackMetaLearnerType, serializedAdditionalRawData); + return new MachineLearningStackEnsembleSettings(stackMetaLearnerType, stackMetaLearnerTrainPercentage, stackMetaLearnerKWargs, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackEnsembleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackEnsembleSettings.cs index 09fbd426cb6f5..148622d6ebd12 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackEnsembleSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackEnsembleSettings.cs @@ -51,18 +51,22 @@ public MachineLearningStackEnsembleSettings() } /// Initializes a new instance of . - /// Optional parameters to pass to the initializer of the meta-learner. - /// Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2. /// The meta-learner is a model trained on the output of the individual heterogeneous models. + /// Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2. + /// Optional parameters to pass to the initializer of the meta-learner. /// Keeps track of any properties unknown to the library. - internal MachineLearningStackEnsembleSettings(BinaryData stackMetaLearnerKWargs, double? stackMetaLearnerTrainPercentage, MachineLearningStackMetaLearnerType? stackMetaLearnerType, IDictionary serializedAdditionalRawData) + internal MachineLearningStackEnsembleSettings(MachineLearningStackMetaLearnerType? stackMetaLearnerType, double? stackMetaLearnerTrainPercentage, BinaryData stackMetaLearnerKWargs, IDictionary serializedAdditionalRawData) { - StackMetaLearnerKWargs = stackMetaLearnerKWargs; - StackMetaLearnerTrainPercentage = stackMetaLearnerTrainPercentage; StackMetaLearnerType = stackMetaLearnerType; + StackMetaLearnerTrainPercentage = stackMetaLearnerTrainPercentage; + StackMetaLearnerKWargs = stackMetaLearnerKWargs; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The meta-learner is a model trained on the output of the individual heterogeneous models. + public MachineLearningStackMetaLearnerType? StackMetaLearnerType { get; set; } + /// Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2. + public double? StackMetaLearnerTrainPercentage { get; set; } /// /// Optional parameters to pass to the initializer of the meta-learner. /// @@ -94,9 +98,5 @@ internal MachineLearningStackEnsembleSettings(BinaryData stackMetaLearnerKWargs, /// /// public BinaryData StackMetaLearnerKWargs { get; set; } - /// Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2. - public double? StackMetaLearnerTrainPercentage { get; set; } - /// The meta-learner is a model trained on the output of the individual heterogeneous models. - public MachineLearningStackMetaLearnerType? StackMetaLearnerType { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.Serialization.cs index 4a037be4b4579..e2ae79706fe46 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.Serialization.cs @@ -26,6 +26,22 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteStartObject(); + writer.WritePropertyName("searchSpace"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(SearchSpace); +#else + using (JsonDocument document = JsonDocument.Parse(SearchSpace)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + writer.WritePropertyName("samplingAlgorithm"u8); + writer.WriteObjectValue(SamplingAlgorithm, options); + if (Optional.IsDefined(Limits)) + { + writer.WritePropertyName("limits"u8); + writer.WriteObjectValue(Limits, options); + } if (Optional.IsDefined(EarlyTermination)) { if (EarlyTermination != null) @@ -38,6 +54,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNull("earlyTermination"); } } + writer.WritePropertyName("objective"u8); + writer.WriteObjectValue(Objective, options); + writer.WritePropertyName("trial"u8); + writer.WriteObjectValue(Trial, options); if (Optional.IsCollectionDefined(Inputs)) { if (Inputs != null) @@ -56,13 +76,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNull("inputs"); } } - if (Optional.IsDefined(Limits)) - { - writer.WritePropertyName("limits"u8); - writer.WriteObjectValue(Limits, options); - } - writer.WritePropertyName("objective"u8); - writer.WriteObjectValue(Objective, options); if (Optional.IsCollectionDefined(Outputs)) { if (Outputs != null) @@ -93,59 +106,64 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNull("queueSettings"); } } - writer.WritePropertyName("samplingAlgorithm"u8); - writer.WriteObjectValue(SamplingAlgorithm, options); - writer.WritePropertyName("searchSpace"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(SearchSpace); -#else - using (JsonDocument document = JsonDocument.Parse(SearchSpace)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - writer.WritePropertyName("trial"u8); - writer.WriteObjectValue(Trial, options); - if (Optional.IsDefined(ComponentId)) + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(DisplayName)) { - if (ComponentId != null) + if (DisplayName != null) { - writer.WritePropertyName("componentId"u8); - writer.WriteStringValue(ComponentId); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); } else { - writer.WriteNull("componentId"); + writer.WriteNull("displayName"); } } - if (Optional.IsDefined(ComputeId)) + if (options.Format != "W" && Optional.IsDefined(Status)) { - if (ComputeId != null) + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + } + if (Optional.IsCollectionDefined(Services)) + { + if (Services != null) { - writer.WritePropertyName("computeId"u8); - writer.WriteStringValue(ComputeId); + writer.WritePropertyName("services"u8); + writer.WriteStartObject(); + foreach (var item in Services) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); } else { - writer.WriteNull("computeId"); + writer.WriteNull("services"); } } - if (Optional.IsDefined(DisplayName)) + if (Optional.IsDefined(ComputeId)) { - if (DisplayName != null) + if (ComputeId != null) { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); + writer.WritePropertyName("computeId"u8); + writer.WriteStringValue(ComputeId); } else { - writer.WriteNull("displayName"); + writer.WriteNull("computeId"); } } - if (Optional.IsDefined(ExperimentName)) + if (Optional.IsDefined(IsArchived)) { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); } if (Optional.IsDefined(Identity)) { @@ -159,48 +177,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNull("identity"); } } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"u8); - writer.WriteBooleanValue(IsArchived.Value); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsDefined(NotificationSetting)) + if (Optional.IsDefined(ComponentId)) { - if (NotificationSetting != null) + if (ComponentId != null) { - writer.WritePropertyName("notificationSetting"u8); - writer.WriteObjectValue(NotificationSetting, options); + writer.WritePropertyName("componentId"u8); + writer.WriteStringValue(ComponentId); } else { - writer.WriteNull("notificationSetting"); + writer.WriteNull("componentId"); } } - if (Optional.IsCollectionDefined(Services)) + if (Optional.IsDefined(NotificationSetting)) { - if (Services != null) + if (NotificationSetting != null) { - writer.WritePropertyName("services"u8); - writer.WriteStartObject(); - foreach (var item in Services) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting, options); } else { - writer.WriteNull("services"); + writer.WriteNull("notificationSetting"); } } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } if (Optional.IsDefined(Description)) { if (Description != null) @@ -213,13 +213,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -228,16 +228,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -246,7 +246,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -287,32 +287,51 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE { return null; } - MachineLearningEarlyTerminationPolicy earlyTermination = default; - IDictionary inputs = default; + BinaryData searchSpace = default; + SamplingAlgorithm samplingAlgorithm = default; MachineLearningSweepJobLimits limits = default; + MachineLearningEarlyTerminationPolicy earlyTermination = default; MachineLearningObjective objective = default; + MachineLearningTrialComponent trial = default; + IDictionary inputs = default; IDictionary outputs = default; JobQueueSettings queueSettings = default; - SamplingAlgorithm samplingAlgorithm = default; - BinaryData searchSpace = default; - MachineLearningTrialComponent trial = default; - ResourceIdentifier componentId = default; - ResourceIdentifier computeId = default; + JobType jobType = default; string displayName = default; + MachineLearningJobStatus? status = default; string experimentName = default; - MachineLearningIdentityConfiguration identity = default; + IDictionary services = default; + ResourceIdentifier computeId = default; bool? isArchived = default; - JobType jobType = default; + MachineLearningIdentityConfiguration identity = default; + ResourceIdentifier componentId = default; NotificationSetting notificationSetting = default; - IDictionary services = default; - MachineLearningJobStatus? status = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("searchSpace"u8)) + { + searchSpace = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("samplingAlgorithm"u8)) + { + samplingAlgorithm = SamplingAlgorithm.DeserializeSamplingAlgorithm(property.Value, options); + continue; + } + if (property.NameEquals("limits"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + limits = MachineLearningSweepJobLimits.DeserializeMachineLearningSweepJobLimits(property.Value, options); + continue; + } if (property.NameEquals("earlyTermination"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -323,6 +342,16 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE earlyTermination = MachineLearningEarlyTerminationPolicy.DeserializeMachineLearningEarlyTerminationPolicy(property.Value, options); continue; } + if (property.NameEquals("objective"u8)) + { + objective = MachineLearningObjective.DeserializeMachineLearningObjective(property.Value, options); + continue; + } + if (property.NameEquals("trial"u8)) + { + trial = MachineLearningTrialComponent.DeserializeMachineLearningTrialComponent(property.Value, options); + continue; + } if (property.NameEquals("inputs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -338,20 +367,6 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE inputs = dictionary; continue; } - if (property.NameEquals("limits"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - limits = MachineLearningSweepJobLimits.DeserializeMachineLearningSweepJobLimits(property.Value, options); - continue; - } - if (property.NameEquals("objective"u8)) - { - objective = MachineLearningObjective.DeserializeMachineLearningObjective(property.Value, options); - continue; - } if (property.NameEquals("outputs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -377,64 +392,58 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE queueSettings = JobQueueSettings.DeserializeJobQueueSettings(property.Value, options); continue; } - if (property.NameEquals("samplingAlgorithm"u8)) - { - samplingAlgorithm = SamplingAlgorithm.DeserializeSamplingAlgorithm(property.Value, options); - continue; - } - if (property.NameEquals("searchSpace"u8)) - { - searchSpace = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("trial"u8)) + if (property.NameEquals("jobType"u8)) { - trial = MachineLearningTrialComponent.DeserializeMachineLearningTrialComponent(property.Value, options); + jobType = new JobType(property.Value.GetString()); continue; } - if (property.NameEquals("componentId"u8)) + if (property.NameEquals("displayName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - componentId = null; + displayName = null; continue; } - componentId = new ResourceIdentifier(property.Value.GetString()); + displayName = property.Value.GetString(); continue; } - if (property.NameEquals("computeId"u8)) + if (property.NameEquals("status"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - computeId = null; continue; } - computeId = new ResourceIdentifier(property.Value.GetString()); + status = new MachineLearningJobStatus(property.Value.GetString()); continue; } - if (property.NameEquals("displayName"u8)) + if (property.NameEquals("experimentName"u8)) + { + experimentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("services"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - displayName = null; + services = null; continue; } - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("experimentName"u8)) - { - experimentName = property.Value.GetString(); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value, options)); + } + services = dictionary; continue; } - if (property.NameEquals("identity"u8)) + if (property.NameEquals("computeId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - identity = null; + computeId = null; continue; } - identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value, options); + computeId = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("isArchived"u8)) @@ -446,43 +455,34 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("jobType"u8)) - { - jobType = new JobType(property.Value.GetString()); - continue; - } - if (property.NameEquals("notificationSetting"u8)) + if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - notificationSetting = null; + identity = null; continue; } - notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value, options); + identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value, options); continue; } - if (property.NameEquals("services"u8)) + if (property.NameEquals("componentId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - services = null; + componentId = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value, options)); - } - services = dictionary; + componentId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("notificationSetting"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + notificationSetting = null; continue; } - status = new MachineLearningJobStatus(property.Value.GetString()); + notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value, options); continue; } if (property.NameEquals("description"u8)) @@ -495,11 +495,11 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -507,14 +507,14 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -522,7 +522,7 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -533,28 +533,28 @@ internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonE serializedAdditionalRawData = rawDataDictionary; return new MachineLearningSweepJob( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - componentId, - computeId, + jobType, displayName, + status, experimentName, - identity, + services ?? new ChangeTrackingDictionary(), + computeId, isArchived, - jobType, + identity, + componentId, notificationSetting, - services ?? new ChangeTrackingDictionary(), - status, - earlyTermination, - inputs ?? new ChangeTrackingDictionary(), + searchSpace, + samplingAlgorithm, limits, + earlyTermination, objective, + trial, + inputs ?? new ChangeTrackingDictionary(), outputs ?? new ChangeTrackingDictionary(), - queueSettings, - samplingAlgorithm, - searchSpace, - trial); + queueSettings); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.cs index e6a36abd77e42..a8de39758365f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.cs @@ -15,90 +15,90 @@ namespace Azure.ResourceManager.MachineLearning.Models public partial class MachineLearningSweepJob : MachineLearningJobProperties { /// Initializes a new instance of . - /// [Required] Optimization objective. + /// [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. /// /// [Required] The hyperparameter sampling algorithm /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. + /// [Required] Optimization objective. /// [Required] Trial component definition. - /// , , or is null. - public MachineLearningSweepJob(MachineLearningObjective objective, SamplingAlgorithm samplingAlgorithm, BinaryData searchSpace, MachineLearningTrialComponent trial) + /// , , or is null. + public MachineLearningSweepJob(BinaryData searchSpace, SamplingAlgorithm samplingAlgorithm, MachineLearningObjective objective, MachineLearningTrialComponent trial) { - Argument.AssertNotNull(objective, nameof(objective)); - Argument.AssertNotNull(samplingAlgorithm, nameof(samplingAlgorithm)); Argument.AssertNotNull(searchSpace, nameof(searchSpace)); + Argument.AssertNotNull(samplingAlgorithm, nameof(samplingAlgorithm)); + Argument.AssertNotNull(objective, nameof(objective)); Argument.AssertNotNull(trial, nameof(trial)); - Inputs = new ChangeTrackingDictionary(); - Objective = objective; - Outputs = new ChangeTrackingDictionary(); - SamplingAlgorithm = samplingAlgorithm; SearchSpace = searchSpace; + SamplingAlgorithm = samplingAlgorithm; + Objective = objective; Trial = trial; + Inputs = new ChangeTrackingDictionary(); + Outputs = new ChangeTrackingDictionary(); JobType = JobType.Sweep; } /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. + /// [Required] Specifies the type of job. /// Display name of job. + /// Status of the job. /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// ARM resource ID of the compute resource. + /// Is the asset archived?. /// /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. /// Defaults to AmlToken if null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// Is the asset archived?. - /// [Required] Specifies the type of job. + /// ARM resource ID of the component resource. /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. + /// + /// [Required] The hyperparameter sampling algorithm + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . /// - /// Status of the job. + /// Sweep Job limit. /// /// Early termination policies enable canceling poor-performing runs before they complete /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// + /// [Required] Optimization objective. + /// [Required] Trial component definition. /// /// Mapping of input data bindings used in the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , , and . /// - /// Sweep Job limit. - /// [Required] Optimization objective. /// /// Mapping of output data bindings used in the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , and . /// /// Queue settings for the job. - /// - /// [Required] The hyperparameter sampling algorithm - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter. - /// [Required] Trial component definition. - internal MachineLearningSweepJob(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary services, MachineLearningJobStatus? status, MachineLearningEarlyTerminationPolicy earlyTermination, IDictionary inputs, MachineLearningSweepJobLimits limits, MachineLearningObjective objective, IDictionary outputs, JobQueueSettings queueSettings, SamplingAlgorithm samplingAlgorithm, BinaryData searchSpace, MachineLearningTrialComponent trial) : base(description, properties, tags, serializedAdditionalRawData, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, services, status) + internal MachineLearningSweepJob(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, JobType jobType, string displayName, MachineLearningJobStatus? status, string experimentName, IDictionary services, ResourceIdentifier computeId, bool? isArchived, MachineLearningIdentityConfiguration identity, ResourceIdentifier componentId, NotificationSetting notificationSetting, BinaryData searchSpace, SamplingAlgorithm samplingAlgorithm, MachineLearningSweepJobLimits limits, MachineLearningEarlyTerminationPolicy earlyTermination, MachineLearningObjective objective, MachineLearningTrialComponent trial, IDictionary inputs, IDictionary outputs, JobQueueSettings queueSettings) : base(description, tags, properties, serializedAdditionalRawData, jobType, displayName, status, experimentName, services, computeId, isArchived, identity, componentId, notificationSetting) { - EarlyTermination = earlyTermination; - Inputs = inputs; + SearchSpace = searchSpace; + SamplingAlgorithm = samplingAlgorithm; Limits = limits; + EarlyTermination = earlyTermination; Objective = objective; + Trial = trial; + Inputs = inputs; Outputs = outputs; QueueSettings = queueSettings; - SamplingAlgorithm = samplingAlgorithm; - SearchSpace = searchSpace; - Trial = trial; JobType = jobType; } @@ -107,48 +107,6 @@ internal MachineLearningSweepJob() { } - /// - /// Early termination policies enable canceling poor-performing runs before they complete - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public MachineLearningEarlyTerminationPolicy EarlyTermination { get; set; } - /// - /// Mapping of input data bindings used in the job. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - public IDictionary Inputs { get; set; } - /// Sweep Job limit. - public MachineLearningSweepJobLimits Limits { get; set; } - /// [Required] Optimization objective. - public MachineLearningObjective Objective { get; set; } - /// - /// Mapping of output data bindings used in the job. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , and . - /// - public IDictionary Outputs { get; set; } - /// Queue settings for the job. - internal JobQueueSettings QueueSettings { get; set; } - /// Controls the compute job tier. - public JobTier? QueueJobTier - { - get => QueueSettings is null ? default : QueueSettings.JobTier; - set - { - if (QueueSettings is null) - QueueSettings = new JobQueueSettings(); - QueueSettings.JobTier = value; - } - } - - /// - /// [Required] The hyperparameter sampling algorithm - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public SamplingAlgorithm SamplingAlgorithm { get; set; } /// /// [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter /// @@ -180,7 +138,48 @@ public JobTier? QueueJobTier /// /// public BinaryData SearchSpace { get; set; } + /// + /// [Required] The hyperparameter sampling algorithm + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public SamplingAlgorithm SamplingAlgorithm { get; set; } + /// Sweep Job limit. + public MachineLearningSweepJobLimits Limits { get; set; } + /// + /// Early termination policies enable canceling poor-performing runs before they complete + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public MachineLearningEarlyTerminationPolicy EarlyTermination { get; set; } + /// [Required] Optimization objective. + public MachineLearningObjective Objective { get; set; } /// [Required] Trial component definition. public MachineLearningTrialComponent Trial { get; set; } + /// + /// Mapping of input data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , , and . + /// + public IDictionary Inputs { get; set; } + /// + /// Mapping of output data bindings used in the job. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , , and . + /// + public IDictionary Outputs { get; set; } + /// Queue settings for the job. + internal JobQueueSettings QueueSettings { get; set; } + /// Controls the compute job tier. + public JobTier? QueueJobTier + { + get => QueueSettings is null ? default : QueueSettings.JobTier; + set + { + if (QueueSettings is null) + QueueSettings = new JobQueueSettings(); + QueueSettings.JobTier = value; + } + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJobLimits.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJobLimits.Serialization.cs index 6b6f9104d80cf..56b9f7734b19f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJobLimits.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJobLimits.Serialization.cs @@ -26,28 +26,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteStartObject(); - if (Optional.IsDefined(MaxConcurrentTrials)) + if (Optional.IsDefined(MaxTotalTrials)) { - if (MaxConcurrentTrials != null) + if (MaxTotalTrials != null) { - writer.WritePropertyName("maxConcurrentTrials"u8); - writer.WriteNumberValue(MaxConcurrentTrials.Value); + writer.WritePropertyName("maxTotalTrials"u8); + writer.WriteNumberValue(MaxTotalTrials.Value); } else { - writer.WriteNull("maxConcurrentTrials"); + writer.WriteNull("maxTotalTrials"); } } - if (Optional.IsDefined(MaxTotalTrials)) + if (Optional.IsDefined(MaxConcurrentTrials)) { - if (MaxTotalTrials != null) + if (MaxConcurrentTrials != null) { - writer.WritePropertyName("maxTotalTrials"u8); - writer.WriteNumberValue(MaxTotalTrials.Value); + writer.WritePropertyName("maxConcurrentTrials"u8); + writer.WriteNumberValue(MaxConcurrentTrials.Value); } else { - writer.WriteNull("maxTotalTrials"); + writer.WriteNull("maxConcurrentTrials"); } } if (Optional.IsDefined(TrialTimeout)) @@ -114,8 +114,8 @@ internal static MachineLearningSweepJobLimits DeserializeMachineLearningSweepJob { return null; } - int? maxConcurrentTrials = default; int? maxTotalTrials = default; + int? maxConcurrentTrials = default; TimeSpan? trialTimeout = default; JobLimitsType jobLimitsType = default; TimeSpan? timeout = default; @@ -123,24 +123,24 @@ internal static MachineLearningSweepJobLimits DeserializeMachineLearningSweepJob Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("maxConcurrentTrials"u8)) + if (property.NameEquals("maxTotalTrials"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - maxConcurrentTrials = null; + maxTotalTrials = null; continue; } - maxConcurrentTrials = property.Value.GetInt32(); + maxTotalTrials = property.Value.GetInt32(); continue; } - if (property.NameEquals("maxTotalTrials"u8)) + if (property.NameEquals("maxConcurrentTrials"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - maxTotalTrials = null; + maxConcurrentTrials = null; continue; } - maxTotalTrials = property.Value.GetInt32(); + maxConcurrentTrials = property.Value.GetInt32(); continue; } if (property.NameEquals("trialTimeout"u8)) @@ -178,8 +178,8 @@ internal static MachineLearningSweepJobLimits DeserializeMachineLearningSweepJob jobLimitsType, timeout, serializedAdditionalRawData, - maxConcurrentTrials, maxTotalTrials, + maxConcurrentTrials, trialTimeout); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJobLimits.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJobLimits.cs index 5271a99afe13f..81e45e622572f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJobLimits.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJobLimits.cs @@ -23,21 +23,21 @@ public MachineLearningSweepJobLimits() /// [Required] JobLimit type. /// The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. /// Keeps track of any properties unknown to the library. - /// Sweep Job max concurrent trials. /// Sweep Job max total trials. + /// Sweep Job max concurrent trials. /// Sweep Job Trial timeout value. - internal MachineLearningSweepJobLimits(JobLimitsType jobLimitsType, TimeSpan? timeout, IDictionary serializedAdditionalRawData, int? maxConcurrentTrials, int? maxTotalTrials, TimeSpan? trialTimeout) : base(jobLimitsType, timeout, serializedAdditionalRawData) + internal MachineLearningSweepJobLimits(JobLimitsType jobLimitsType, TimeSpan? timeout, IDictionary serializedAdditionalRawData, int? maxTotalTrials, int? maxConcurrentTrials, TimeSpan? trialTimeout) : base(jobLimitsType, timeout, serializedAdditionalRawData) { - MaxConcurrentTrials = maxConcurrentTrials; MaxTotalTrials = maxTotalTrials; + MaxConcurrentTrials = maxConcurrentTrials; TrialTimeout = trialTimeout; JobLimitsType = jobLimitsType; } - /// Sweep Job max concurrent trials. - public int? MaxConcurrentTrials { get; set; } /// Sweep Job max total trials. public int? MaxTotalTrials { get; set; } + /// Sweep Job max concurrent trials. + public int? MaxConcurrentTrials { get; set; } /// Sweep Job Trial timeout value. public TimeSpan? TrialTimeout { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.Serialization.cs index 531367a1c5530..ce4847defcdd7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.Serialization.cs @@ -52,16 +52,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteStringValue(DataType.ToString()); writer.WritePropertyName("dataUri"u8); writer.WriteStringValue(DataUri.AbsoluteUri); - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"u8); - writer.WriteBooleanValue(IsAnonymous.Value); - } if (Optional.IsDefined(IsArchived)) { writer.WritePropertyName("isArchived"u8); writer.WriteBooleanValue(IsArchived.Value); } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -74,13 +74,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -89,16 +89,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -107,7 +107,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -151,11 +151,11 @@ internal static MachineLearningTable DeserializeMachineLearningTable(JsonElement IList referencedUris = default; MachineLearningDataType dataType = default; Uri dataUri = default; - bool? isAnonymous = default; bool? isArchived = default; + bool? isAnonymous = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -192,22 +192,22 @@ internal static MachineLearningTable DeserializeMachineLearningTable(JsonElement dataUri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("isAnonymous"u8)) + if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isAnonymous = property.Value.GetBoolean(); + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isArchived = property.Value.GetBoolean(); + isAnonymous = property.Value.GetBoolean(); continue; } if (property.NameEquals("description"u8)) @@ -220,11 +220,11 @@ internal static MachineLearningTable DeserializeMachineLearningTable(JsonElement description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -232,14 +232,14 @@ internal static MachineLearningTable DeserializeMachineLearningTable(JsonElement { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -247,7 +247,7 @@ internal static MachineLearningTable DeserializeMachineLearningTable(JsonElement { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -258,11 +258,11 @@ internal static MachineLearningTable DeserializeMachineLearningTable(JsonElement serializedAdditionalRawData = rawDataDictionary; return new MachineLearningTable( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - isAnonymous, isArchived, + isAnonymous, dataType, dataUri, referencedUris ?? new ChangeTrackingList()); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.cs index 2d7ee18335fcb..50d710e8563a9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.cs @@ -26,15 +26,15 @@ public MachineLearningTable(Uri dataUri) : base(dataUri) /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// If the name version are system generated (anonymous registration). /// Is the asset archived?. + /// If the name version are system generated (anonymous registration). /// [Required] Specifies the type of data. /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. /// Uris referenced in the MLTable definition (required for lineage). - internal MachineLearningTable(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri, IList referencedUris) : base(description, properties, tags, serializedAdditionalRawData, isAnonymous, isArchived, dataType, dataUri) + internal MachineLearningTable(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, bool? isAnonymous, MachineLearningDataType dataType, Uri dataUri, IList referencedUris) : base(description, tags, properties, serializedAdditionalRawData, isArchived, isAnonymous, dataType, dataUri) { ReferencedUris = referencedUris; DataType = dataType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobInput.Serialization.cs index 31237d42f9324..f415877cda262 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobInput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobInput.Serialization.cs @@ -26,13 +26,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } writer.WriteStartObject(); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); writer.WriteStringValue(Mode.Value.ToString()); } - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -45,8 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteNull("description"); } } - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -85,14 +85,19 @@ internal static MachineLearningTableJobInput DeserializeMachineLearningTableJobI { return null; } - MachineLearningInputDeliveryMode? mode = default; Uri uri = default; - string description = default; + MachineLearningInputDeliveryMode? mode = default; JobInputType jobInputType = default; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("uri"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -102,9 +107,9 @@ internal static MachineLearningTableJobInput DeserializeMachineLearningTableJobI mode = new MachineLearningInputDeliveryMode(property.Value.GetString()); continue; } - if (property.NameEquals("uri"u8)) + if (property.NameEquals("jobInputType"u8)) { - uri = new Uri(property.Value.GetString()); + jobInputType = new JobInputType(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -117,18 +122,13 @@ internal static MachineLearningTableJobInput DeserializeMachineLearningTableJobI description = property.Value.GetString(); continue; } - if (property.NameEquals("jobInputType"u8)) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningTableJobInput(description, jobInputType, serializedAdditionalRawData, mode, uri); + return new MachineLearningTableJobInput(jobInputType, description, serializedAdditionalRawData, uri, mode); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobInput.cs index 36ced9a04df88..1a7d0c0c2419f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobInput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobInput.cs @@ -25,15 +25,15 @@ public MachineLearningTableJobInput(Uri uri) } /// Initializes a new instance of . - /// Description for the input. /// [Required] Specifies the type of job. + /// Description for the input. /// Keeps track of any properties unknown to the library. - /// Input Asset Delivery Mode. /// [Required] Input Asset URI. - internal MachineLearningTableJobInput(string description, JobInputType jobInputType, IDictionary serializedAdditionalRawData, MachineLearningInputDeliveryMode? mode, Uri uri) : base(description, jobInputType, serializedAdditionalRawData) + /// Input Asset Delivery Mode. + internal MachineLearningTableJobInput(JobInputType jobInputType, string description, IDictionary serializedAdditionalRawData, Uri uri, MachineLearningInputDeliveryMode? mode) : base(jobInputType, description, serializedAdditionalRawData) { - Mode = mode; Uri = uri; + Mode = mode; JobInputType = jobInputType; } @@ -42,9 +42,9 @@ internal MachineLearningTableJobInput() { } - /// Input Asset Delivery Mode. - public MachineLearningInputDeliveryMode? Mode { get; set; } /// [Required] Input Asset URI. public Uri Uri { get; set; } + /// Input Asset Delivery Mode. + public MachineLearningInputDeliveryMode? Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.Serialization.cs index e0ae676b51280..0d67ec95e3da8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"u8); - writer.WriteStringValue(Mode.Value.ToString()); - } if (Optional.IsDefined(Uri)) { if (Uri != null) @@ -43,6 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteNull("uri"); } } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("jobOutputType"u8); + writer.WriteStringValue(JobOutputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -55,8 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteNull("description"); } } - writer.WritePropertyName("jobOutputType"u8); - writer.WriteStringValue(JobOutputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -95,31 +95,36 @@ internal static MachineLearningTableJobOutput DeserializeMachineLearningTableJob { return null; } - MachineLearningOutputDeliveryMode? mode = default; Uri uri = default; - string description = default; + MachineLearningOutputDeliveryMode? mode = default; JobOutputType jobOutputType = default; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("mode"u8)) + if (property.NameEquals("uri"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + uri = null; continue; } - mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + uri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("uri"u8)) + if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - uri = null; continue; } - uri = new Uri(property.Value.GetString()); + mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("jobOutputType"u8)) + { + jobOutputType = new JobOutputType(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -132,18 +137,13 @@ internal static MachineLearningTableJobOutput DeserializeMachineLearningTableJob description = property.Value.GetString(); continue; } - if (property.NameEquals("jobOutputType"u8)) - { - jobOutputType = new JobOutputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningTableJobOutput(description, jobOutputType, serializedAdditionalRawData, mode, uri); + return new MachineLearningTableJobOutput(jobOutputType, description, serializedAdditionalRawData, uri, mode); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.cs index 7ccc97f227f38..016983af239b2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.cs @@ -20,21 +20,21 @@ public MachineLearningTableJobOutput() } /// Initializes a new instance of . - /// Description for the output. /// [Required] Specifies the type of job. + /// Description for the output. /// Keeps track of any properties unknown to the library. - /// Output Asset Delivery Mode. /// Output Asset URI. - internal MachineLearningTableJobOutput(string description, JobOutputType jobOutputType, IDictionary serializedAdditionalRawData, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType, serializedAdditionalRawData) + /// Output Asset Delivery Mode. + internal MachineLearningTableJobOutput(JobOutputType jobOutputType, string description, IDictionary serializedAdditionalRawData, Uri uri, MachineLearningOutputDeliveryMode? mode) : base(jobOutputType, description, serializedAdditionalRawData) { - Mode = mode; Uri = uri; + Mode = mode; JobOutputType = jobOutputType; } - /// Output Asset Delivery Mode. - public MachineLearningOutputDeliveryMode? Mode { get; set; } /// Output Asset URI. public Uri Uri { get; set; } + /// Output Asset Delivery Mode. + public MachineLearningOutputDeliveryMode? Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTargetUtilizationScaleSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTargetUtilizationScaleSettings.Serialization.cs index 7a43f9fcce25b..dde2d3b34e91a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTargetUtilizationScaleSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTargetUtilizationScaleSettings.Serialization.cs @@ -26,16 +26,6 @@ void IJsonModel.Write(Utf8JsonWri } writer.WriteStartObject(); - if (Optional.IsDefined(MaxInstances)) - { - writer.WritePropertyName("maxInstances"u8); - writer.WriteNumberValue(MaxInstances.Value); - } - if (Optional.IsDefined(MinInstances)) - { - writer.WritePropertyName("minInstances"u8); - writer.WriteNumberValue(MinInstances.Value); - } if (Optional.IsDefined(PollingInterval)) { writer.WritePropertyName("pollingInterval"u8); @@ -46,6 +36,16 @@ void IJsonModel.Write(Utf8JsonWri writer.WritePropertyName("targetUtilizationPercentage"u8); writer.WriteNumberValue(TargetUtilizationPercentage.Value); } + if (Optional.IsDefined(MinInstances)) + { + writer.WritePropertyName("minInstances"u8); + writer.WriteNumberValue(MinInstances.Value); + } + if (Optional.IsDefined(MaxInstances)) + { + writer.WritePropertyName("maxInstances"u8); + writer.WriteNumberValue(MaxInstances.Value); + } writer.WritePropertyName("scaleType"u8); writer.WriteStringValue(ScaleType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -86,49 +86,49 @@ internal static MachineLearningTargetUtilizationScaleSettings DeserializeMachine { return null; } - int? maxInstances = default; - int? minInstances = default; TimeSpan? pollingInterval = default; int? targetUtilizationPercentage = default; + int? minInstances = default; + int? maxInstances = default; ScaleType scaleType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("maxInstances"u8)) + if (property.NameEquals("pollingInterval"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - maxInstances = property.Value.GetInt32(); + pollingInterval = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("minInstances"u8)) + if (property.NameEquals("targetUtilizationPercentage"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - minInstances = property.Value.GetInt32(); + targetUtilizationPercentage = property.Value.GetInt32(); continue; } - if (property.NameEquals("pollingInterval"u8)) + if (property.NameEquals("minInstances"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - pollingInterval = property.Value.GetTimeSpan("P"); + minInstances = property.Value.GetInt32(); continue; } - if (property.NameEquals("targetUtilizationPercentage"u8)) + if (property.NameEquals("maxInstances"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - targetUtilizationPercentage = property.Value.GetInt32(); + maxInstances = property.Value.GetInt32(); continue; } if (property.NameEquals("scaleType"u8)) @@ -145,10 +145,10 @@ internal static MachineLearningTargetUtilizationScaleSettings DeserializeMachine return new MachineLearningTargetUtilizationScaleSettings( scaleType, serializedAdditionalRawData, - maxInstances, - minInstances, pollingInterval, - targetUtilizationPercentage); + targetUtilizationPercentage, + minInstances, + maxInstances); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTargetUtilizationScaleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTargetUtilizationScaleSettings.cs index b7d94e4e2206c..c4c256a88a17e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTargetUtilizationScaleSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTargetUtilizationScaleSettings.cs @@ -22,26 +22,26 @@ public MachineLearningTargetUtilizationScaleSettings() /// Initializes a new instance of . /// [Required] Type of deployment scaling algorithm. /// Keeps track of any properties unknown to the library. - /// The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. - /// The minimum number of instances to always be present. /// The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. /// Target CPU usage for the autoscaler. - internal MachineLearningTargetUtilizationScaleSettings(ScaleType scaleType, IDictionary serializedAdditionalRawData, int? maxInstances, int? minInstances, TimeSpan? pollingInterval, int? targetUtilizationPercentage) : base(scaleType, serializedAdditionalRawData) + /// The minimum number of instances to always be present. + /// The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. + internal MachineLearningTargetUtilizationScaleSettings(ScaleType scaleType, IDictionary serializedAdditionalRawData, TimeSpan? pollingInterval, int? targetUtilizationPercentage, int? minInstances, int? maxInstances) : base(scaleType, serializedAdditionalRawData) { - MaxInstances = maxInstances; - MinInstances = minInstances; PollingInterval = pollingInterval; TargetUtilizationPercentage = targetUtilizationPercentage; + MinInstances = minInstances; + MaxInstances = maxInstances; ScaleType = scaleType; } - /// The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. - public int? MaxInstances { get; set; } - /// The minimum number of instances to always be present. - public int? MinInstances { get; set; } /// The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. public TimeSpan? PollingInterval { get; set; } /// Target CPU usage for the autoscaler. public int? TargetUtilizationPercentage { get; set; } + /// The minimum number of instances to always be present. + public int? MinInstances { get; set; } + /// The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. + public int? MaxInstances { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.Serialization.cs index 28e2d071730f9..4b4a6fb55d28d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.Serialization.cs @@ -26,21 +26,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } writer.WriteStartObject(); - if (Optional.IsDefined(IsDnnTrainingEnabled)) - { - writer.WritePropertyName("enableDnnTraining"u8); - writer.WriteBooleanValue(IsDnnTrainingEnabled.Value); - } - if (Optional.IsDefined(IsModelExplainabilityEnabled)) - { - writer.WritePropertyName("enableModelExplainability"u8); - writer.WriteBooleanValue(IsModelExplainabilityEnabled.Value); - } if (Optional.IsDefined(IsOnnxCompatibleModelsEnabled)) { writer.WritePropertyName("enableOnnxCompatibleModels"u8); writer.WriteBooleanValue(IsOnnxCompatibleModelsEnabled.Value); } + if (Optional.IsDefined(StackEnsembleSettings)) + { + if (StackEnsembleSettings != null) + { + writer.WritePropertyName("stackEnsembleSettings"u8); + writer.WriteObjectValue(StackEnsembleSettings, options); + } + else + { + writer.WriteNull("stackEnsembleSettings"); + } + } if (Optional.IsDefined(IsStackEnsembleEnabled)) { writer.WritePropertyName("enableStackEnsemble"u8); @@ -56,17 +58,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("ensembleModelDownloadTimeout"u8); writer.WriteStringValue(EnsembleModelDownloadTimeout.Value, "P"); } - if (Optional.IsDefined(StackEnsembleSettings)) + if (Optional.IsDefined(IsModelExplainabilityEnabled)) { - if (StackEnsembleSettings != null) - { - writer.WritePropertyName("stackEnsembleSettings"u8); - writer.WriteObjectValue(StackEnsembleSettings, options); - } - else - { - writer.WriteNull("stackEnsembleSettings"); - } + writer.WritePropertyName("enableModelExplainability"u8); + writer.WriteBooleanValue(IsModelExplainabilityEnabled.Value); + } + if (Optional.IsDefined(IsDnnTrainingEnabled)) + { + writer.WritePropertyName("enableDnnTraining"u8); + writer.WriteBooleanValue(IsDnnTrainingEnabled.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -106,79 +106,79 @@ internal static MachineLearningTrainingSettings DeserializeMachineLearningTraini { return null; } - bool? enableDnnTraining = default; - bool? enableModelExplainability = default; bool? enableOnnxCompatibleModels = default; + MachineLearningStackEnsembleSettings stackEnsembleSettings = default; bool? enableStackEnsemble = default; bool? enableVoteEnsemble = default; TimeSpan? ensembleModelDownloadTimeout = default; - MachineLearningStackEnsembleSettings stackEnsembleSettings = default; + bool? enableModelExplainability = default; + bool? enableDnnTraining = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("enableDnnTraining"u8)) + if (property.NameEquals("enableOnnxCompatibleModels"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableDnnTraining = property.Value.GetBoolean(); + enableOnnxCompatibleModels = property.Value.GetBoolean(); continue; } - if (property.NameEquals("enableModelExplainability"u8)) + if (property.NameEquals("stackEnsembleSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + stackEnsembleSettings = null; continue; } - enableModelExplainability = property.Value.GetBoolean(); + stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value, options); continue; } - if (property.NameEquals("enableOnnxCompatibleModels"u8)) + if (property.NameEquals("enableStackEnsemble"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableOnnxCompatibleModels = property.Value.GetBoolean(); + enableStackEnsemble = property.Value.GetBoolean(); continue; } - if (property.NameEquals("enableStackEnsemble"u8)) + if (property.NameEquals("enableVoteEnsemble"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableStackEnsemble = property.Value.GetBoolean(); + enableVoteEnsemble = property.Value.GetBoolean(); continue; } - if (property.NameEquals("enableVoteEnsemble"u8)) + if (property.NameEquals("ensembleModelDownloadTimeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableVoteEnsemble = property.Value.GetBoolean(); + ensembleModelDownloadTimeout = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("ensembleModelDownloadTimeout"u8)) + if (property.NameEquals("enableModelExplainability"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - ensembleModelDownloadTimeout = property.Value.GetTimeSpan("P"); + enableModelExplainability = property.Value.GetBoolean(); continue; } - if (property.NameEquals("stackEnsembleSettings"u8)) + if (property.NameEquals("enableDnnTraining"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - stackEnsembleSettings = null; continue; } - stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value, options); + enableDnnTraining = property.Value.GetBoolean(); continue; } if (options.Format != "W") @@ -188,13 +188,13 @@ internal static MachineLearningTrainingSettings DeserializeMachineLearningTraini } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningTrainingSettings( - enableDnnTraining, - enableModelExplainability, enableOnnxCompatibleModels, + stackEnsembleSettings, enableStackEnsemble, enableVoteEnsemble, ensembleModelDownloadTimeout, - stackEnsembleSettings, + enableModelExplainability, + enableDnnTraining, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.cs index 4f7d3b4e49768..136c972448fbd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.cs @@ -51,35 +51,33 @@ public MachineLearningTrainingSettings() } /// Initializes a new instance of . - /// Enable recommendation of DNN models. - /// Flag to turn on explainability on best model. /// Flag for enabling onnx compatible models. + /// Stack ensemble settings for stack ensemble run. /// Enable stack ensemble run. /// Enable voting ensemble run. /// /// During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. /// Configure this parameter with a higher value than 300 secs, if more time is needed. /// - /// Stack ensemble settings for stack ensemble run. + /// Flag to turn on explainability on best model. + /// Enable recommendation of DNN models. /// Keeps track of any properties unknown to the library. - internal MachineLearningTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, IDictionary serializedAdditionalRawData) + internal MachineLearningTrainingSettings(bool? isOnnxCompatibleModelsEnabled, MachineLearningStackEnsembleSettings stackEnsembleSettings, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, bool? isModelExplainabilityEnabled, bool? isDnnTrainingEnabled, IDictionary serializedAdditionalRawData) { - IsDnnTrainingEnabled = isDnnTrainingEnabled; - IsModelExplainabilityEnabled = isModelExplainabilityEnabled; IsOnnxCompatibleModelsEnabled = isOnnxCompatibleModelsEnabled; + StackEnsembleSettings = stackEnsembleSettings; IsStackEnsembleEnabled = isStackEnsembleEnabled; IsVoteEnsembleEnabled = isVoteEnsembleEnabled; EnsembleModelDownloadTimeout = ensembleModelDownloadTimeout; - StackEnsembleSettings = stackEnsembleSettings; + IsModelExplainabilityEnabled = isModelExplainabilityEnabled; + IsDnnTrainingEnabled = isDnnTrainingEnabled; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Enable recommendation of DNN models. - public bool? IsDnnTrainingEnabled { get; set; } - /// Flag to turn on explainability on best model. - public bool? IsModelExplainabilityEnabled { get; set; } /// Flag for enabling onnx compatible models. public bool? IsOnnxCompatibleModelsEnabled { get; set; } + /// Stack ensemble settings for stack ensemble run. + public MachineLearningStackEnsembleSettings StackEnsembleSettings { get; set; } /// Enable stack ensemble run. public bool? IsStackEnsembleEnabled { get; set; } /// Enable voting ensemble run. @@ -89,7 +87,9 @@ internal MachineLearningTrainingSettings(bool? isDnnTrainingEnabled, bool? isMod /// Configure this parameter with a higher value than 300 secs, if more time is needed. /// public TimeSpan? EnsembleModelDownloadTimeout { get; set; } - /// Stack ensemble settings for stack ensemble run. - public MachineLearningStackEnsembleSettings StackEnsembleSettings { get; set; } + /// Flag to turn on explainability on best model. + public bool? IsModelExplainabilityEnabled { get; set; } + /// Enable recommendation of DNN models. + public bool? IsDnnTrainingEnabled { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrialComponent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrialComponent.Serialization.cs index 84f3005744877..85a2e28f9e82d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrialComponent.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrialComponent.Serialization.cs @@ -40,18 +40,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WritePropertyName("command"u8); writer.WriteStringValue(Command); - if (Optional.IsDefined(Distribution)) - { - if (Distribution != null) - { - writer.WritePropertyName("distribution"u8); - writer.WriteObjectValue(Distribution, options); - } - else - { - writer.WriteNull("distribution"); - } - } writer.WritePropertyName("environmentId"u8); writer.WriteStringValue(EnvironmentId); if (Optional.IsCollectionDefined(EnvironmentVariables)) @@ -72,6 +60,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WriteNull("environmentVariables"); } } + if (Optional.IsDefined(Distribution)) + { + if (Distribution != null) + { + writer.WritePropertyName("distribution"u8); + writer.WriteObjectValue(Distribution, options); + } + else + { + writer.WriteNull("distribution"); + } + } if (Optional.IsDefined(Resources)) { writer.WritePropertyName("resources"u8); @@ -117,9 +117,9 @@ internal static MachineLearningTrialComponent DeserializeMachineLearningTrialCom } ResourceIdentifier codeId = default; string command = default; - MachineLearningDistributionConfiguration distribution = default; ResourceIdentifier environmentId = default; IDictionary environmentVariables = default; + MachineLearningDistributionConfiguration distribution = default; MachineLearningJobResourceConfiguration resources = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -140,16 +140,6 @@ internal static MachineLearningTrialComponent DeserializeMachineLearningTrialCom command = property.Value.GetString(); continue; } - if (property.NameEquals("distribution"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - distribution = null; - continue; - } - distribution = MachineLearningDistributionConfiguration.DeserializeMachineLearningDistributionConfiguration(property.Value, options); - continue; - } if (property.NameEquals("environmentId"u8)) { environmentId = new ResourceIdentifier(property.Value.GetString()); @@ -170,6 +160,16 @@ internal static MachineLearningTrialComponent DeserializeMachineLearningTrialCom environmentVariables = dictionary; continue; } + if (property.NameEquals("distribution"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + distribution = null; + continue; + } + distribution = MachineLearningDistributionConfiguration.DeserializeMachineLearningDistributionConfiguration(property.Value, options); + continue; + } if (property.NameEquals("resources"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -188,9 +188,9 @@ internal static MachineLearningTrialComponent DeserializeMachineLearningTrialCom return new MachineLearningTrialComponent( codeId, command, - distribution, environmentId, environmentVariables ?? new ChangeTrackingDictionary(), + distribution, resources, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrialComponent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrialComponent.cs index 1488e8ba27074..ad7a7cc62747d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrialComponent.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrialComponent.cs @@ -63,22 +63,22 @@ public MachineLearningTrialComponent(string command, ResourceIdentifier environm /// Initializes a new instance of . /// ARM resource ID of the code asset. /// [Required] The command to execute on startup of the job. eg. "python train.py". + /// [Required] The ARM resource ID of the Environment specification for the job. + /// Environment variables included in the job. /// /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// [Required] The ARM resource ID of the Environment specification for the job. - /// Environment variables included in the job. /// Compute Resource configuration for the job. /// Keeps track of any properties unknown to the library. - internal MachineLearningTrialComponent(ResourceIdentifier codeId, string command, MachineLearningDistributionConfiguration distribution, ResourceIdentifier environmentId, IDictionary environmentVariables, MachineLearningJobResourceConfiguration resources, IDictionary serializedAdditionalRawData) + internal MachineLearningTrialComponent(ResourceIdentifier codeId, string command, ResourceIdentifier environmentId, IDictionary environmentVariables, MachineLearningDistributionConfiguration distribution, MachineLearningJobResourceConfiguration resources, IDictionary serializedAdditionalRawData) { CodeId = codeId; Command = command; - Distribution = distribution; EnvironmentId = environmentId; EnvironmentVariables = environmentVariables; + Distribution = distribution; Resources = resources; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -92,16 +92,16 @@ internal MachineLearningTrialComponent() public ResourceIdentifier CodeId { get; set; } /// [Required] The command to execute on startup of the job. eg. "python train.py". public string Command { get; set; } + /// [Required] The ARM resource ID of the Environment specification for the job. + public ResourceIdentifier EnvironmentId { get; set; } + /// Environment variables included in the job. + public IDictionary EnvironmentVariables { get; set; } /// /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// public MachineLearningDistributionConfiguration Distribution { get; set; } - /// [Required] The ARM resource ID of the Environment specification for the job. - public ResourceIdentifier EnvironmentId { get; set; } - /// Environment variables included in the job. - public IDictionary EnvironmentVariables { get; set; } /// Compute Resource configuration for the job. public MachineLearningJobResourceConfiguration Resources { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerBase.Serialization.cs index 9c7b59e2a1a0b..94cd6f590e3f7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerBase.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerBase.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteStartObject(); + writer.WritePropertyName("triggerType"u8); + writer.WriteStringValue(TriggerType.ToString()); if (Optional.IsDefined(EndTime)) { if (EndTime != null) @@ -55,8 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("timeZone"u8); writer.WriteStringValue(TimeZone); } - writer.WritePropertyName("triggerType"u8); - writer.WriteStringValue(TriggerType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerBase.cs index 8e6b48c59b659..129ddd07ff452 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerBase.cs @@ -54,6 +54,7 @@ protected MachineLearningTriggerBase() } /// Initializes a new instance of . + /// [Required]. /// /// Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. /// Recommented format would be "2022-06-01T00:00:01" @@ -64,17 +65,18 @@ protected MachineLearningTriggerBase() /// Specifies time zone in which the schedule runs. /// TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 /// - /// [Required]. /// Keeps track of any properties unknown to the library. - internal MachineLearningTriggerBase(string endTime, string startTime, string timeZone, TriggerType triggerType, IDictionary serializedAdditionalRawData) + internal MachineLearningTriggerBase(TriggerType triggerType, string endTime, string startTime, string timeZone, IDictionary serializedAdditionalRawData) { + TriggerType = triggerType; EndTime = endTime; StartTime = startTime; TimeZone = timeZone; - TriggerType = triggerType; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// [Required]. + internal TriggerType TriggerType { get; set; } /// /// Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. /// Recommented format would be "2022-06-01T00:00:01" @@ -88,7 +90,5 @@ internal MachineLearningTriggerBase(string endTime, string startTime, string tim /// TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 /// public string TimeZone { get; set; } - /// [Required]. - internal TriggerType TriggerType { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerType.cs index dbd3a9b86dc84..9ecd05061cba6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The MachineLearningTriggerType. + /// Is the trigger type recurrence or cron. public readonly partial struct MachineLearningTriggerType : IEquatable { private readonly string _value; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobInput.Serialization.cs index b9bbda34b6b40..26c26fe69f9ac 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobInput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobInput.Serialization.cs @@ -26,13 +26,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); writer.WriteStringValue(Mode.Value.ToString()); } - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -45,8 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("description"); } } - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -85,14 +85,19 @@ internal static MachineLearningTritonModelJobInput DeserializeMachineLearningTri { return null; } - MachineLearningInputDeliveryMode? mode = default; Uri uri = default; - string description = default; + MachineLearningInputDeliveryMode? mode = default; JobInputType jobInputType = default; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("uri"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -102,9 +107,9 @@ internal static MachineLearningTritonModelJobInput DeserializeMachineLearningTri mode = new MachineLearningInputDeliveryMode(property.Value.GetString()); continue; } - if (property.NameEquals("uri"u8)) + if (property.NameEquals("jobInputType"u8)) { - uri = new Uri(property.Value.GetString()); + jobInputType = new JobInputType(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -117,18 +122,13 @@ internal static MachineLearningTritonModelJobInput DeserializeMachineLearningTri description = property.Value.GetString(); continue; } - if (property.NameEquals("jobInputType"u8)) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningTritonModelJobInput(description, jobInputType, serializedAdditionalRawData, mode, uri); + return new MachineLearningTritonModelJobInput(jobInputType, description, serializedAdditionalRawData, uri, mode); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobInput.cs index 9ff9960bb1aea..f914dc484c401 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobInput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobInput.cs @@ -25,15 +25,15 @@ public MachineLearningTritonModelJobInput(Uri uri) } /// Initializes a new instance of . - /// Description for the input. /// [Required] Specifies the type of job. + /// Description for the input. /// Keeps track of any properties unknown to the library. - /// Input Asset Delivery Mode. /// [Required] Input Asset URI. - internal MachineLearningTritonModelJobInput(string description, JobInputType jobInputType, IDictionary serializedAdditionalRawData, MachineLearningInputDeliveryMode? mode, Uri uri) : base(description, jobInputType, serializedAdditionalRawData) + /// Input Asset Delivery Mode. + internal MachineLearningTritonModelJobInput(JobInputType jobInputType, string description, IDictionary serializedAdditionalRawData, Uri uri, MachineLearningInputDeliveryMode? mode) : base(jobInputType, description, serializedAdditionalRawData) { - Mode = mode; Uri = uri; + Mode = mode; JobInputType = jobInputType; } @@ -42,9 +42,9 @@ internal MachineLearningTritonModelJobInput() { } - /// Input Asset Delivery Mode. - public MachineLearningInputDeliveryMode? Mode { get; set; } /// [Required] Input Asset URI. public Uri Uri { get; set; } + /// Input Asset Delivery Mode. + public MachineLearningInputDeliveryMode? Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.Serialization.cs index 24f607a237514..529b324bc426d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer } writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"u8); - writer.WriteStringValue(Mode.Value.ToString()); - } if (Optional.IsDefined(Uri)) { if (Uri != null) @@ -43,6 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteNull("uri"); } } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("jobOutputType"u8); + writer.WriteStringValue(JobOutputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -55,8 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteNull("description"); } } - writer.WritePropertyName("jobOutputType"u8); - writer.WriteStringValue(JobOutputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -95,31 +95,36 @@ internal static MachineLearningTritonModelJobOutput DeserializeMachineLearningTr { return null; } - MachineLearningOutputDeliveryMode? mode = default; Uri uri = default; - string description = default; + MachineLearningOutputDeliveryMode? mode = default; JobOutputType jobOutputType = default; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("mode"u8)) + if (property.NameEquals("uri"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + uri = null; continue; } - mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + uri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("uri"u8)) + if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - uri = null; continue; } - uri = new Uri(property.Value.GetString()); + mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("jobOutputType"u8)) + { + jobOutputType = new JobOutputType(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -132,18 +137,13 @@ internal static MachineLearningTritonModelJobOutput DeserializeMachineLearningTr description = property.Value.GetString(); continue; } - if (property.NameEquals("jobOutputType"u8)) - { - jobOutputType = new JobOutputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningTritonModelJobOutput(description, jobOutputType, serializedAdditionalRawData, mode, uri); + return new MachineLearningTritonModelJobOutput(jobOutputType, description, serializedAdditionalRawData, uri, mode); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.cs index 6b1adb8a10190..337796468d86c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.cs @@ -20,21 +20,21 @@ public MachineLearningTritonModelJobOutput() } /// Initializes a new instance of . - /// Description for the output. /// [Required] Specifies the type of job. + /// Description for the output. /// Keeps track of any properties unknown to the library. - /// Output Asset Delivery Mode. /// Output Asset URI. - internal MachineLearningTritonModelJobOutput(string description, JobOutputType jobOutputType, IDictionary serializedAdditionalRawData, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType, serializedAdditionalRawData) + /// Output Asset Delivery Mode. + internal MachineLearningTritonModelJobOutput(JobOutputType jobOutputType, string description, IDictionary serializedAdditionalRawData, Uri uri, MachineLearningOutputDeliveryMode? mode) : base(jobOutputType, description, serializedAdditionalRawData) { - Mode = mode; Uri = uri; + Mode = mode; JobOutputType = jobOutputType; } - /// Output Asset Delivery Mode. - public MachineLearningOutputDeliveryMode? Mode { get; set; } /// Output Asset URI. public Uri Uri { get; set; } + /// Output Asset Delivery Mode. + public MachineLearningOutputDeliveryMode? Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.Serialization.cs index 82cb1403705cc..1fa8efbb9b207 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.Serialization.cs @@ -30,16 +30,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteStringValue(DataType.ToString()); writer.WritePropertyName("dataUri"u8); writer.WriteStringValue(DataUri.AbsoluteUri); - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"u8); - writer.WriteBooleanValue(IsAnonymous.Value); - } if (Optional.IsDefined(IsArchived)) { writer.WritePropertyName("isArchived"u8); writer.WriteBooleanValue(IsArchived.Value); } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -52,13 +52,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -67,16 +67,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -85,7 +85,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -128,11 +128,11 @@ internal static MachineLearningUriFileDataVersion DeserializeMachineLearningUriF } MachineLearningDataType dataType = default; Uri dataUri = default; - bool? isAnonymous = default; bool? isArchived = default; + bool? isAnonymous = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -147,22 +147,22 @@ internal static MachineLearningUriFileDataVersion DeserializeMachineLearningUriF dataUri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("isAnonymous"u8)) + if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isAnonymous = property.Value.GetBoolean(); + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isArchived = property.Value.GetBoolean(); + isAnonymous = property.Value.GetBoolean(); continue; } if (property.NameEquals("description"u8)) @@ -175,11 +175,11 @@ internal static MachineLearningUriFileDataVersion DeserializeMachineLearningUriF description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -187,14 +187,14 @@ internal static MachineLearningUriFileDataVersion DeserializeMachineLearningUriF { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -202,7 +202,7 @@ internal static MachineLearningUriFileDataVersion DeserializeMachineLearningUriF { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -213,11 +213,11 @@ internal static MachineLearningUriFileDataVersion DeserializeMachineLearningUriF serializedAdditionalRawData = rawDataDictionary; return new MachineLearningUriFileDataVersion( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - isAnonymous, isArchived, + isAnonymous, dataType, dataUri); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.cs index 014754d285aed..fa06dd7ae33d6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.cs @@ -25,14 +25,14 @@ public MachineLearningUriFileDataVersion(Uri dataUri) : base(dataUri) /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// If the name version are system generated (anonymous registration). /// Is the asset archived?. + /// If the name version are system generated (anonymous registration). /// [Required] Specifies the type of data. /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. - internal MachineLearningUriFileDataVersion(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri) : base(description, properties, tags, serializedAdditionalRawData, isAnonymous, isArchived, dataType, dataUri) + internal MachineLearningUriFileDataVersion(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, bool? isAnonymous, MachineLearningDataType dataType, Uri dataUri) : base(description, tags, properties, serializedAdditionalRawData, isArchived, isAnonymous, dataType, dataUri) { DataType = dataType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobInput.Serialization.cs index bbc44c15f71d5..c26fa0a2c7fa6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobInput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobInput.Serialization.cs @@ -26,13 +26,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WriteStartObject(); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); writer.WriteStringValue(Mode.Value.ToString()); } - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -45,8 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WriteNull("description"); } } - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -85,14 +85,19 @@ internal static MachineLearningUriFileJobInput DeserializeMachineLearningUriFile { return null; } - MachineLearningInputDeliveryMode? mode = default; Uri uri = default; - string description = default; + MachineLearningInputDeliveryMode? mode = default; JobInputType jobInputType = default; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("uri"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -102,9 +107,9 @@ internal static MachineLearningUriFileJobInput DeserializeMachineLearningUriFile mode = new MachineLearningInputDeliveryMode(property.Value.GetString()); continue; } - if (property.NameEquals("uri"u8)) + if (property.NameEquals("jobInputType"u8)) { - uri = new Uri(property.Value.GetString()); + jobInputType = new JobInputType(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -117,18 +122,13 @@ internal static MachineLearningUriFileJobInput DeserializeMachineLearningUriFile description = property.Value.GetString(); continue; } - if (property.NameEquals("jobInputType"u8)) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningUriFileJobInput(description, jobInputType, serializedAdditionalRawData, mode, uri); + return new MachineLearningUriFileJobInput(jobInputType, description, serializedAdditionalRawData, uri, mode); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobInput.cs index 97fb594342bc1..e7a53e607b4fc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobInput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobInput.cs @@ -25,15 +25,15 @@ public MachineLearningUriFileJobInput(Uri uri) } /// Initializes a new instance of . - /// Description for the input. /// [Required] Specifies the type of job. + /// Description for the input. /// Keeps track of any properties unknown to the library. - /// Input Asset Delivery Mode. /// [Required] Input Asset URI. - internal MachineLearningUriFileJobInput(string description, JobInputType jobInputType, IDictionary serializedAdditionalRawData, MachineLearningInputDeliveryMode? mode, Uri uri) : base(description, jobInputType, serializedAdditionalRawData) + /// Input Asset Delivery Mode. + internal MachineLearningUriFileJobInput(JobInputType jobInputType, string description, IDictionary serializedAdditionalRawData, Uri uri, MachineLearningInputDeliveryMode? mode) : base(jobInputType, description, serializedAdditionalRawData) { - Mode = mode; Uri = uri; + Mode = mode; JobInputType = jobInputType; } @@ -42,9 +42,9 @@ internal MachineLearningUriFileJobInput() { } - /// Input Asset Delivery Mode. - public MachineLearningInputDeliveryMode? Mode { get; set; } /// [Required] Input Asset URI. public Uri Uri { get; set; } + /// Input Asset Delivery Mode. + public MachineLearningInputDeliveryMode? Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.Serialization.cs index 968bf30fce756..8ec62a10e6dba 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"u8); - writer.WriteStringValue(Mode.Value.ToString()); - } if (Optional.IsDefined(Uri)) { if (Uri != null) @@ -43,6 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteNull("uri"); } } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("jobOutputType"u8); + writer.WriteStringValue(JobOutputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -55,8 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteNull("description"); } } - writer.WritePropertyName("jobOutputType"u8); - writer.WriteStringValue(JobOutputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -95,31 +95,36 @@ internal static MachineLearningUriFileJobOutput DeserializeMachineLearningUriFil { return null; } - MachineLearningOutputDeliveryMode? mode = default; Uri uri = default; - string description = default; + MachineLearningOutputDeliveryMode? mode = default; JobOutputType jobOutputType = default; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("mode"u8)) + if (property.NameEquals("uri"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + uri = null; continue; } - mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + uri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("uri"u8)) + if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - uri = null; continue; } - uri = new Uri(property.Value.GetString()); + mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("jobOutputType"u8)) + { + jobOutputType = new JobOutputType(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -132,18 +137,13 @@ internal static MachineLearningUriFileJobOutput DeserializeMachineLearningUriFil description = property.Value.GetString(); continue; } - if (property.NameEquals("jobOutputType"u8)) - { - jobOutputType = new JobOutputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningUriFileJobOutput(description, jobOutputType, serializedAdditionalRawData, mode, uri); + return new MachineLearningUriFileJobOutput(jobOutputType, description, serializedAdditionalRawData, uri, mode); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.cs index 75989ed6f5553..7c49f38f3fd39 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.cs @@ -20,21 +20,21 @@ public MachineLearningUriFileJobOutput() } /// Initializes a new instance of . - /// Description for the output. /// [Required] Specifies the type of job. + /// Description for the output. /// Keeps track of any properties unknown to the library. - /// Output Asset Delivery Mode. /// Output Asset URI. - internal MachineLearningUriFileJobOutput(string description, JobOutputType jobOutputType, IDictionary serializedAdditionalRawData, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType, serializedAdditionalRawData) + /// Output Asset Delivery Mode. + internal MachineLearningUriFileJobOutput(JobOutputType jobOutputType, string description, IDictionary serializedAdditionalRawData, Uri uri, MachineLearningOutputDeliveryMode? mode) : base(jobOutputType, description, serializedAdditionalRawData) { - Mode = mode; Uri = uri; + Mode = mode; JobOutputType = jobOutputType; } - /// Output Asset Delivery Mode. - public MachineLearningOutputDeliveryMode? Mode { get; set; } /// Output Asset URI. public Uri Uri { get; set; } + /// Output Asset Delivery Mode. + public MachineLearningOutputDeliveryMode? Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.Serialization.cs index ab3582a8a149b..87f5d21738233 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.Serialization.cs @@ -30,16 +30,16 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteStringValue(DataType.ToString()); writer.WritePropertyName("dataUri"u8); writer.WriteStringValue(DataUri.AbsoluteUri); - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"u8); - writer.WriteBooleanValue(IsAnonymous.Value); - } if (Optional.IsDefined(IsArchived)) { writer.WritePropertyName("isArchived"u8); writer.WriteBooleanValue(IsArchived.Value); } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -52,13 +52,13 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -67,16 +67,16 @@ void IJsonModel.Write(Utf8JsonWriter writer } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -85,7 +85,7 @@ void IJsonModel.Write(Utf8JsonWriter writer } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -128,11 +128,11 @@ internal static MachineLearningUriFolderDataVersion DeserializeMachineLearningUr } MachineLearningDataType dataType = default; Uri dataUri = default; - bool? isAnonymous = default; bool? isArchived = default; + bool? isAnonymous = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -147,22 +147,22 @@ internal static MachineLearningUriFolderDataVersion DeserializeMachineLearningUr dataUri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("isAnonymous"u8)) + if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isAnonymous = property.Value.GetBoolean(); + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isArchived = property.Value.GetBoolean(); + isAnonymous = property.Value.GetBoolean(); continue; } if (property.NameEquals("description"u8)) @@ -175,11 +175,11 @@ internal static MachineLearningUriFolderDataVersion DeserializeMachineLearningUr description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -187,14 +187,14 @@ internal static MachineLearningUriFolderDataVersion DeserializeMachineLearningUr { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -202,7 +202,7 @@ internal static MachineLearningUriFolderDataVersion DeserializeMachineLearningUr { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -213,11 +213,11 @@ internal static MachineLearningUriFolderDataVersion DeserializeMachineLearningUr serializedAdditionalRawData = rawDataDictionary; return new MachineLearningUriFolderDataVersion( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - isAnonymous, isArchived, + isAnonymous, dataType, dataUri); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.cs index 079791aabfd84..9f5e828a6ca46 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.cs @@ -25,14 +25,14 @@ public MachineLearningUriFolderDataVersion(Uri dataUri) : base(dataUri) /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// If the name version are system generated (anonymous registration). /// Is the asset archived?. + /// If the name version are system generated (anonymous registration). /// [Required] Specifies the type of data. /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. - internal MachineLearningUriFolderDataVersion(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri) : base(description, properties, tags, serializedAdditionalRawData, isAnonymous, isArchived, dataType, dataUri) + internal MachineLearningUriFolderDataVersion(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, bool? isAnonymous, MachineLearningDataType dataType, Uri dataUri) : base(description, tags, properties, serializedAdditionalRawData, isArchived, isAnonymous, dataType, dataUri) { DataType = dataType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobInput.Serialization.cs index 232ec9ed24a29..b9e2406a47737 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobInput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobInput.Serialization.cs @@ -26,13 +26,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, M } writer.WriteStartObject(); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); if (Optional.IsDefined(Mode)) { writer.WritePropertyName("mode"u8); writer.WriteStringValue(Mode.Value.ToString()); } - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -45,8 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, M writer.WriteNull("description"); } } - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -85,14 +85,19 @@ internal static MachineLearningUriFolderJobInput DeserializeMachineLearningUriFo { return null; } - MachineLearningInputDeliveryMode? mode = default; Uri uri = default; - string description = default; + MachineLearningInputDeliveryMode? mode = default; JobInputType jobInputType = default; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("uri"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -102,9 +107,9 @@ internal static MachineLearningUriFolderJobInput DeserializeMachineLearningUriFo mode = new MachineLearningInputDeliveryMode(property.Value.GetString()); continue; } - if (property.NameEquals("uri"u8)) + if (property.NameEquals("jobInputType"u8)) { - uri = new Uri(property.Value.GetString()); + jobInputType = new JobInputType(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -117,18 +122,13 @@ internal static MachineLearningUriFolderJobInput DeserializeMachineLearningUriFo description = property.Value.GetString(); continue; } - if (property.NameEquals("jobInputType"u8)) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningUriFolderJobInput(description, jobInputType, serializedAdditionalRawData, mode, uri); + return new MachineLearningUriFolderJobInput(jobInputType, description, serializedAdditionalRawData, uri, mode); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobInput.cs index f713d8f50b761..33be28ffb88f9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobInput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobInput.cs @@ -25,15 +25,15 @@ public MachineLearningUriFolderJobInput(Uri uri) } /// Initializes a new instance of . - /// Description for the input. /// [Required] Specifies the type of job. + /// Description for the input. /// Keeps track of any properties unknown to the library. - /// Input Asset Delivery Mode. /// [Required] Input Asset URI. - internal MachineLearningUriFolderJobInput(string description, JobInputType jobInputType, IDictionary serializedAdditionalRawData, MachineLearningInputDeliveryMode? mode, Uri uri) : base(description, jobInputType, serializedAdditionalRawData) + /// Input Asset Delivery Mode. + internal MachineLearningUriFolderJobInput(JobInputType jobInputType, string description, IDictionary serializedAdditionalRawData, Uri uri, MachineLearningInputDeliveryMode? mode) : base(jobInputType, description, serializedAdditionalRawData) { - Mode = mode; Uri = uri; + Mode = mode; JobInputType = jobInputType; } @@ -42,9 +42,9 @@ internal MachineLearningUriFolderJobInput() { } - /// Input Asset Delivery Mode. - public MachineLearningInputDeliveryMode? Mode { get; set; } /// [Required] Input Asset URI. public Uri Uri { get; set; } + /// Input Asset Delivery Mode. + public MachineLearningInputDeliveryMode? Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.Serialization.cs index edbc33a33ac2d..d7cd73834cf16 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"u8); - writer.WriteStringValue(Mode.Value.ToString()); - } if (Optional.IsDefined(Uri)) { if (Uri != null) @@ -43,6 +38,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("uri"); } } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("jobOutputType"u8); + writer.WriteStringValue(JobOutputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -55,8 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("description"); } } - writer.WritePropertyName("jobOutputType"u8); - writer.WriteStringValue(JobOutputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -95,31 +95,36 @@ internal static MachineLearningUriFolderJobOutput DeserializeMachineLearningUriF { return null; } - MachineLearningOutputDeliveryMode? mode = default; Uri uri = default; - string description = default; + MachineLearningOutputDeliveryMode? mode = default; JobOutputType jobOutputType = default; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("mode"u8)) + if (property.NameEquals("uri"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + uri = null; continue; } - mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + uri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("uri"u8)) + if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - uri = null; continue; } - uri = new Uri(property.Value.GetString()); + mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("jobOutputType"u8)) + { + jobOutputType = new JobOutputType(property.Value.GetString()); continue; } if (property.NameEquals("description"u8)) @@ -132,18 +137,13 @@ internal static MachineLearningUriFolderJobOutput DeserializeMachineLearningUriF description = property.Value.GetString(); continue; } - if (property.NameEquals("jobOutputType"u8)) - { - jobOutputType = new JobOutputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningUriFolderJobOutput(description, jobOutputType, serializedAdditionalRawData, mode, uri); + return new MachineLearningUriFolderJobOutput(jobOutputType, description, serializedAdditionalRawData, uri, mode); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.cs index 36bafc62e0455..36728d5059f96 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.cs @@ -20,21 +20,21 @@ public MachineLearningUriFolderJobOutput() } /// Initializes a new instance of . - /// Description for the output. /// [Required] Specifies the type of job. + /// Description for the output. /// Keeps track of any properties unknown to the library. - /// Output Asset Delivery Mode. /// Output Asset URI. - internal MachineLearningUriFolderJobOutput(string description, JobOutputType jobOutputType, IDictionary serializedAdditionalRawData, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType, serializedAdditionalRawData) + /// Output Asset Delivery Mode. + internal MachineLearningUriFolderJobOutput(JobOutputType jobOutputType, string description, IDictionary serializedAdditionalRawData, Uri uri, MachineLearningOutputDeliveryMode? mode) : base(jobOutputType, description, serializedAdditionalRawData) { - Mode = mode; Uri = uri; + Mode = mode; JobOutputType = jobOutputType; } - /// Output Asset Delivery Mode. - public MachineLearningOutputDeliveryMode? Mode { get; set; } /// Output Asset URI. public Uri Uri { get; set; } + /// Output Asset Delivery Mode. + public MachineLearningOutputDeliveryMode? Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.Serialization.cs index fe22e39d41553..378f33f0e4bde 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.Serialization.cs @@ -43,11 +43,6 @@ void IJsonModel.Writ writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -63,6 +58,11 @@ void IJsonModel.Writ writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -74,16 +74,6 @@ void IJsonModel.Writ } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -94,15 +84,15 @@ void IJsonModel.Writ } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -146,16 +136,14 @@ internal static MachineLearningUsernamePasswordAuthTypeWorkspaceConnection Deser MachineLearningConnectionAuthType authType = default; MachineLearningConnectionCategory? category = default; ResourceIdentifier createdByWorkspaceArmId = default; - string error = default; DateTimeOffset? expiryTime = default; ConnectionGroup? group = default; bool? isSharedToAll = default; + string target = default; IDictionary metadata = default; - ManagedPERequirement? peRequirement = default; - ManagedPEStatus? peStatus = default; IList sharedUserList = default; - string target = default; - bool? useWorkspaceManagedIdentity = default; + string value = default; + MachineLearningValueFormat? valueFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -192,11 +180,6 @@ internal static MachineLearningUsernamePasswordAuthTypeWorkspaceConnection Deser createdByWorkspaceArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } if (property.NameEquals("expiryTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,6 +207,11 @@ internal static MachineLearningUsernamePasswordAuthTypeWorkspaceConnection Deser isSharedToAll = property.Value.GetBoolean(); continue; } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -238,24 +226,6 @@ internal static MachineLearningUsernamePasswordAuthTypeWorkspaceConnection Deser metadata = dictionary; continue; } - if (property.NameEquals("peRequirement"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peRequirement = new ManagedPERequirement(property.Value.GetString()); - continue; - } - if (property.NameEquals("peStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peStatus = new ManagedPEStatus(property.Value.GetString()); - continue; - } if (property.NameEquals("sharedUserList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -270,18 +240,18 @@ internal static MachineLearningUsernamePasswordAuthTypeWorkspaceConnection Deser sharedUserList = array; continue; } - if (property.NameEquals("target"u8)) + if (property.NameEquals("value"u8)) { - target = property.Value.GetString(); + value = property.Value.GetString(); continue; } - if (property.NameEquals("useWorkspaceManagedIdentity"u8)) + if (property.NameEquals("valueFormat"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - useWorkspaceManagedIdentity = property.Value.GetBoolean(); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } if (options.Format != "W") @@ -294,16 +264,14 @@ internal static MachineLearningUsernamePasswordAuthTypeWorkspaceConnection Deser authType, category, createdByWorkspaceArmId, - error, expiryTime, group, isSharedToAll, + target, metadata ?? new ChangeTrackingDictionary(), - peRequirement, - peStatus, sharedUserList ?? new ChangeTrackingList(), - target, - useWorkspaceManagedIdentity, + value, + valueFormat, serializedAdditionalRawData, credentials); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.cs index cd667ba3a7ace..c849d7a415ad5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.cs @@ -24,19 +24,17 @@ public MachineLearningUsernamePasswordAuthTypeWorkspaceConnection() /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. /// - internal MachineLearningUsernamePasswordAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData, MachineLearningWorkspaceConnectionUsernamePassword credentials) : base(authType, category, createdByWorkspaceArmId, error, expiryOn, group, isSharedToAll, metadata, peRequirement, peStatus, sharedUserList, target, useWorkspaceManagedIdentity, serializedAdditionalRawData) + internal MachineLearningUsernamePasswordAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData, MachineLearningWorkspaceConnectionUsernamePassword credentials) : base(authType, category, createdByWorkspaceArmId, expiryOn, group, isSharedToAll, target, metadata, sharedUserList, value, valueFormat, serializedAdditionalRawData) { Credentials = credentials; AuthType = authType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningValueFormat.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningValueFormat.cs new file mode 100644 index 0000000000000..314d53469cd3a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningValueFormat.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// format for the workspace connection value. + public readonly partial struct MachineLearningValueFormat : IEquatable + { + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.Serialization.cs index 5d41aaef0a2bf..574eb06da9d4c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteStartObject(); + writer.WritePropertyName("webhookType"u8); + writer.WriteStringValue(WebhookType.ToString()); if (Optional.IsDefined(EventType)) { if (EventType != null) @@ -38,8 +40,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteNull("eventType"); } } - writer.WritePropertyName("webhookType"u8); - writer.WriteStringValue(WebhookType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.cs index a0e5f02a1e83a..65130769da420 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWebhook.cs @@ -55,19 +55,19 @@ protected MachineLearningWebhook() } /// Initializes a new instance of . - /// Send callback on a specified notification event. /// [Required] Specifies the type of service to send a callback. + /// Send callback on a specified notification event. /// Keeps track of any properties unknown to the library. - internal MachineLearningWebhook(string eventType, MachineLearningWebhookType webhookType, IDictionary serializedAdditionalRawData) + internal MachineLearningWebhook(MachineLearningWebhookType webhookType, string eventType, IDictionary serializedAdditionalRawData) { - EventType = eventType; WebhookType = webhookType; + EventType = eventType; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Send callback on a specified notification event. - public string EventType { get; set; } /// [Required] Specifies the type of service to send a callback. internal MachineLearningWebhookType WebhookType { get; set; } + /// Send callback on a specified notification event. + public string EventType { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.Serialization.cs index 4ed10da4c95e0..073c169111127 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.Serialization.cs @@ -26,16 +26,16 @@ void IJsonModel.Write(Utf8Jso } writer.WriteStartObject(); - if (Optional.IsDefined(ClientId)) - { - writer.WritePropertyName("clientId"u8); - writer.WriteStringValue(ClientId); - } if (Optional.IsDefined(ResourceId)) { writer.WritePropertyName("resourceId"u8); writer.WriteStringValue(ResourceId); } + if (Optional.IsDefined(ClientId)) + { + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -74,17 +74,12 @@ internal static MachineLearningWorkspaceConnectionManagedIdentity DeserializeMac { return null; } - string clientId = default; ResourceIdentifier resourceId = default; + string clientId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("clientId"u8)) - { - clientId = property.Value.GetString(); - continue; - } if (property.NameEquals("resourceId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -94,13 +89,18 @@ internal static MachineLearningWorkspaceConnectionManagedIdentity DeserializeMac resourceId = new ResourceIdentifier(property.Value.GetString()); continue; } + if (property.NameEquals("clientId"u8)) + { + clientId = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningWorkspaceConnectionManagedIdentity(clientId, resourceId, serializedAdditionalRawData); + return new MachineLearningWorkspaceConnectionManagedIdentity(resourceId, clientId, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.cs index 4e13e8522bc0b..0af246ac1f77b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.cs @@ -52,19 +52,19 @@ public MachineLearningWorkspaceConnectionManagedIdentity() } /// Initializes a new instance of . - /// /// + /// /// Keeps track of any properties unknown to the library. - internal MachineLearningWorkspaceConnectionManagedIdentity(string clientId, ResourceIdentifier resourceId, IDictionary serializedAdditionalRawData) + internal MachineLearningWorkspaceConnectionManagedIdentity(ResourceIdentifier resourceId, string clientId, IDictionary serializedAdditionalRawData) { - ClientId = clientId; ResourceId = resourceId; + ClientId = clientId; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the client id. - public string ClientId { get; set; } /// Gets or sets the resource id. public ResourceIdentifier ResourceId { get; set; } + /// Gets or sets the client id. + public string ClientId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.Serialization.cs deleted file mode 100644 index b7dc8419312b0..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.Serialization.cs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class MachineLearningWorkspaceConnectionPatch : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MachineLearningWorkspaceConnectionPatch)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - MachineLearningWorkspaceConnectionPatch 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(MachineLearningWorkspaceConnectionPatch)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMachineLearningWorkspaceConnectionPatch(document.RootElement, options); - } - - internal static MachineLearningWorkspaceConnectionPatch DeserializeMachineLearningWorkspaceConnectionPatch(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MachineLearningWorkspaceConnectionProperties properties = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = MachineLearningWorkspaceConnectionProperties.DeserializeMachineLearningWorkspaceConnectionProperties(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningWorkspaceConnectionPatch(properties, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(MachineLearningWorkspaceConnectionPatch)} does not support writing '{options.Format}' format."); - } - } - - MachineLearningWorkspaceConnectionPatch 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 DeserializeMachineLearningWorkspaceConnectionPatch(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MachineLearningWorkspaceConnectionPatch)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.cs deleted file mode 100644 index a3b3d1abed5b5..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionPatch.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The properties that the machine learning workspace connection will be updated with. - public partial class MachineLearningWorkspaceConnectionPatch - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public MachineLearningWorkspaceConnectionPatch() - { - } - - /// Initializes a new instance of . - /// - /// The properties that the machine learning workspace connection will be updated with. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , and . - /// - /// Keeps track of any properties unknown to the library. - internal MachineLearningWorkspaceConnectionPatch(MachineLearningWorkspaceConnectionProperties properties, IDictionary serializedAdditionalRawData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// - /// The properties that the machine learning workspace connection will be updated with. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , and . - /// - public MachineLearningWorkspaceConnectionProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.Serialization.cs index 80daf5ac889a9..ac6524c817d86 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.Serialization.cs @@ -38,11 +38,6 @@ void IJsonModel.Write(Utf8JsonWrit writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -58,6 +53,11 @@ void IJsonModel.Write(Utf8JsonWrit writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -69,16 +69,6 @@ void IJsonModel.Write(Utf8JsonWrit } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -89,15 +79,15 @@ void IJsonModel.Write(Utf8JsonWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.cs index 34c3f544b06a6..fe363c800b3b1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.cs @@ -60,32 +60,28 @@ protected MachineLearningWorkspaceConnectionProperties() /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. - internal MachineLearningWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData) + internal MachineLearningWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData) { AuthType = authType; Category = category; CreatedByWorkspaceArmId = createdByWorkspaceArmId; - Error = error; ExpiryOn = expiryOn; Group = group; IsSharedToAll = isSharedToAll; + Target = target; Metadata = metadata; - PeRequirement = peRequirement; - PeStatus = peStatus; SharedUserList = sharedUserList; - Target = target; - UseWorkspaceManagedIdentity = useWorkspaceManagedIdentity; + Value = value; + ValueFormat = valueFormat; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -95,25 +91,17 @@ internal MachineLearningWorkspaceConnectionProperties(MachineLearningConnectionA public MachineLearningConnectionCategory? Category { get; set; } /// Gets the created by workspace arm id. public ResourceIdentifier CreatedByWorkspaceArmId { get; } - /// Gets or sets the error. - public string Error { get; set; } /// Gets or sets the expiry on. public DateTimeOffset? ExpiryOn { get; set; } /// Group based on connection category. public ConnectionGroup? Group { get; } /// Gets or sets the is shared to all. public bool? IsSharedToAll { get; set; } + /// Gets or sets the target. + public string Target { get; set; } /// Store user metadata for this connection. public IDictionary Metadata { get; } - /// Gets or sets the pe requirement. - public ManagedPERequirement? PeRequirement { get; set; } - /// Gets or sets the pe status. - public ManagedPEStatus? PeStatus { get; set; } /// Gets the shared user list. public IList SharedUserList { get; } - /// Gets or sets the target. - public string Target { get; set; } - /// Gets or sets the use workspace managed identity. - public bool? UseWorkspaceManagedIdentity { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.Serialization.cs index 23391ec0bf2ac..935e6ec4f9e4c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.Serialization.cs @@ -26,6 +26,11 @@ void IJsonModel.Write(Utf8Js } writer.WriteStartObject(); + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"u8); + writer.WriteStringValue(Username); + } if (Optional.IsDefined(Password)) { writer.WritePropertyName("password"u8); @@ -36,11 +41,6 @@ void IJsonModel.Write(Utf8Js writer.WritePropertyName("securityToken"u8); writer.WriteStringValue(SecurityToken); } - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"u8); - writer.WriteStringValue(Username); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,13 +79,18 @@ internal static MachineLearningWorkspaceConnectionUsernamePassword DeserializeMa { return null; } + string username = default; string password = default; string securityToken = default; - string username = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("username"u8)) + { + username = property.Value.GetString(); + continue; + } if (property.NameEquals("password"u8)) { password = property.Value.GetString(); @@ -96,18 +101,13 @@ internal static MachineLearningWorkspaceConnectionUsernamePassword DeserializeMa securityToken = property.Value.GetString(); continue; } - if (property.NameEquals("username"u8)) - { - username = property.Value.GetString(); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningWorkspaceConnectionUsernamePassword(password, securityToken, username, serializedAdditionalRawData); + return new MachineLearningWorkspaceConnectionUsernamePassword(username, password, securityToken, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.cs index 0c3b16ed57d00..880be737c088b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.cs @@ -51,23 +51,23 @@ public MachineLearningWorkspaceConnectionUsernamePassword() } /// Initializes a new instance of . + /// /// /// Optional, required by connections like SalesForce for extra security in addition to UsernamePassword. - /// /// Keeps track of any properties unknown to the library. - internal MachineLearningWorkspaceConnectionUsernamePassword(string password, string securityToken, string username, IDictionary serializedAdditionalRawData) + internal MachineLearningWorkspaceConnectionUsernamePassword(string username, string password, string securityToken, IDictionary serializedAdditionalRawData) { + Username = username; Password = password; SecurityToken = securityToken; - Username = username; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Gets or sets the username. + public string Username { get; set; } /// Gets or sets the password. public string Password { get; set; } /// Optional, required by connections like SalesForce for extra security in addition to UsernamePassword. public string SecurityToken { get; set; } - /// Gets or sets the username. - public string Username { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.cs index df17df13b74f6..466c1491fcbc5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.cs @@ -51,7 +51,7 @@ public MachineLearningWorkspaceDiagnoseContent() } /// Initializes a new instance of . - /// + /// Value of Parameters. /// Keeps track of any properties unknown to the library. internal MachineLearningWorkspaceDiagnoseContent(MachineLearningWorkspaceDiagnoseProperties value, IDictionary serializedAdditionalRawData) { @@ -59,7 +59,7 @@ internal MachineLearningWorkspaceDiagnoseContent(MachineLearningWorkspaceDiagnos _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the value. + /// Value of Parameters. public MachineLearningWorkspaceDiagnoseProperties Value { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.Serialization.cs index 9defbeeafb8ab..cbc312fd6f037 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.Serialization.cs @@ -26,34 +26,11 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteStartObject(); - if (Optional.IsCollectionDefined(ApplicationInsights)) - { - writer.WritePropertyName("applicationInsights"u8); - writer.WriteStartObject(); - foreach (var item in ApplicationInsights) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(ContainerRegistry)) + if (Optional.IsCollectionDefined(Udr)) { - writer.WritePropertyName("containerRegistry"u8); + writer.WritePropertyName("udr"u8); writer.WriteStartObject(); - foreach (var item in ContainerRegistry) + foreach (var item in Udr) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -72,11 +49,11 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(DnsResolution)) + if (Optional.IsCollectionDefined(Nsg)) { - writer.WritePropertyName("dnsResolution"u8); + writer.WritePropertyName("nsg"u8); writer.WriteStartObject(); - foreach (var item in DnsResolution) + foreach (var item in Nsg) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -95,11 +72,11 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(KeyVault)) + if (Optional.IsCollectionDefined(ResourceLock)) { - writer.WritePropertyName("keyVault"u8); + writer.WritePropertyName("resourceLock"u8); writer.WriteStartObject(); - foreach (var item in KeyVault) + foreach (var item in ResourceLock) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -118,11 +95,11 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(Nsg)) + if (Optional.IsCollectionDefined(DnsResolution)) { - writer.WritePropertyName("nsg"u8); + writer.WritePropertyName("dnsResolution"u8); writer.WriteStartObject(); - foreach (var item in Nsg) + foreach (var item in DnsResolution) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -141,11 +118,11 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(Others)) + if (Optional.IsCollectionDefined(StorageAccount)) { - writer.WritePropertyName("others"u8); + writer.WritePropertyName("storageAccount"u8); writer.WriteStartObject(); - foreach (var item in Others) + foreach (var item in StorageAccount) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -164,11 +141,11 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(RequiredResourceProviders)) + if (Optional.IsCollectionDefined(KeyVault)) { - writer.WritePropertyName("requiredResourceProviders"u8); + writer.WritePropertyName("keyVault"u8); writer.WriteStartObject(); - foreach (var item in RequiredResourceProviders) + foreach (var item in KeyVault) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -187,11 +164,11 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(ResourceLock)) + if (Optional.IsCollectionDefined(ContainerRegistry)) { - writer.WritePropertyName("resourceLock"u8); + writer.WritePropertyName("containerRegistry"u8); writer.WriteStartObject(); - foreach (var item in ResourceLock) + foreach (var item in ContainerRegistry) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -210,11 +187,11 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(StorageAccount)) + if (Optional.IsCollectionDefined(ApplicationInsights)) { - writer.WritePropertyName("storageAccount"u8); + writer.WritePropertyName("applicationInsights"u8); writer.WriteStartObject(); - foreach (var item in StorageAccount) + foreach (var item in ApplicationInsights) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -233,11 +210,11 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteEndObject(); } - if (Optional.IsCollectionDefined(Udr)) + if (Optional.IsCollectionDefined(Others)) { - writer.WritePropertyName("udr"u8); + writer.WritePropertyName("others"u8); writer.WriteStartObject(); - foreach (var item in Udr) + foreach (var item in Others) { writer.WritePropertyName(item.Key); if (item.Value == null) @@ -294,42 +271,20 @@ internal static MachineLearningWorkspaceDiagnoseProperties DeserializeMachineLea { return null; } - IDictionary applicationInsights = default; - IDictionary containerRegistry = default; - IDictionary dnsResolution = default; - IDictionary keyVault = default; + IDictionary udr = default; IDictionary nsg = default; - IDictionary others = default; - IDictionary requiredResourceProviders = default; IDictionary resourceLock = default; + IDictionary dnsResolution = default; IDictionary storageAccount = default; - IDictionary udr = default; + IDictionary keyVault = default; + IDictionary containerRegistry = default; + IDictionary applicationInsights = default; + IDictionary others = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("applicationInsights"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - dictionary.Add(property0.Name, null); - } - else - { - dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); - } - } - applicationInsights = dictionary; - continue; - } - if (property.NameEquals("containerRegistry"u8)) + if (property.NameEquals("udr"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -347,10 +302,10 @@ internal static MachineLearningWorkspaceDiagnoseProperties DeserializeMachineLea dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); } } - containerRegistry = dictionary; + udr = dictionary; continue; } - if (property.NameEquals("dnsResolution"u8)) + if (property.NameEquals("nsg"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -368,10 +323,10 @@ internal static MachineLearningWorkspaceDiagnoseProperties DeserializeMachineLea dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); } } - dnsResolution = dictionary; + nsg = dictionary; continue; } - if (property.NameEquals("keyVault"u8)) + if (property.NameEquals("resourceLock"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -389,10 +344,10 @@ internal static MachineLearningWorkspaceDiagnoseProperties DeserializeMachineLea dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); } } - keyVault = dictionary; + resourceLock = dictionary; continue; } - if (property.NameEquals("nsg"u8)) + if (property.NameEquals("dnsResolution"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -410,10 +365,10 @@ internal static MachineLearningWorkspaceDiagnoseProperties DeserializeMachineLea dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); } } - nsg = dictionary; + dnsResolution = dictionary; continue; } - if (property.NameEquals("others"u8)) + if (property.NameEquals("storageAccount"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -431,10 +386,10 @@ internal static MachineLearningWorkspaceDiagnoseProperties DeserializeMachineLea dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); } } - others = dictionary; + storageAccount = dictionary; continue; } - if (property.NameEquals("requiredResourceProviders"u8)) + if (property.NameEquals("keyVault"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -452,10 +407,10 @@ internal static MachineLearningWorkspaceDiagnoseProperties DeserializeMachineLea dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); } } - requiredResourceProviders = dictionary; + keyVault = dictionary; continue; } - if (property.NameEquals("resourceLock"u8)) + if (property.NameEquals("containerRegistry"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -473,10 +428,10 @@ internal static MachineLearningWorkspaceDiagnoseProperties DeserializeMachineLea dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); } } - resourceLock = dictionary; + containerRegistry = dictionary; continue; } - if (property.NameEquals("storageAccount"u8)) + if (property.NameEquals("applicationInsights"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -494,10 +449,10 @@ internal static MachineLearningWorkspaceDiagnoseProperties DeserializeMachineLea dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); } } - storageAccount = dictionary; + applicationInsights = dictionary; continue; } - if (property.NameEquals("udr"u8)) + if (property.NameEquals("others"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { @@ -515,7 +470,7 @@ internal static MachineLearningWorkspaceDiagnoseProperties DeserializeMachineLea dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); } } - udr = dictionary; + others = dictionary; continue; } if (options.Format != "W") @@ -525,16 +480,15 @@ internal static MachineLearningWorkspaceDiagnoseProperties DeserializeMachineLea } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningWorkspaceDiagnoseProperties( - applicationInsights ?? new ChangeTrackingDictionary(), - containerRegistry ?? new ChangeTrackingDictionary(), - dnsResolution ?? new ChangeTrackingDictionary(), - keyVault ?? new ChangeTrackingDictionary(), + udr ?? new ChangeTrackingDictionary(), nsg ?? new ChangeTrackingDictionary(), - others ?? new ChangeTrackingDictionary(), - requiredResourceProviders ?? new ChangeTrackingDictionary(), resourceLock ?? new ChangeTrackingDictionary(), + dnsResolution ?? new ChangeTrackingDictionary(), storageAccount ?? new ChangeTrackingDictionary(), - udr ?? new ChangeTrackingDictionary(), + keyVault ?? new ChangeTrackingDictionary(), + containerRegistry ?? new ChangeTrackingDictionary(), + applicationInsights ?? new ChangeTrackingDictionary(), + others ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.cs index 464e4d55b3a06..68158d5bab6e3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.cs @@ -48,78 +48,44 @@ public partial class MachineLearningWorkspaceDiagnoseProperties /// Initializes a new instance of . public MachineLearningWorkspaceDiagnoseProperties() { - ApplicationInsights = new ChangeTrackingDictionary(); - ContainerRegistry = new ChangeTrackingDictionary(); - DnsResolution = new ChangeTrackingDictionary(); - KeyVault = new ChangeTrackingDictionary(); + Udr = new ChangeTrackingDictionary(); Nsg = new ChangeTrackingDictionary(); - Others = new ChangeTrackingDictionary(); - RequiredResourceProviders = new ChangeTrackingDictionary(); ResourceLock = new ChangeTrackingDictionary(); + DnsResolution = new ChangeTrackingDictionary(); StorageAccount = new ChangeTrackingDictionary(); - Udr = new ChangeTrackingDictionary(); + KeyVault = new ChangeTrackingDictionary(); + ContainerRegistry = new ChangeTrackingDictionary(); + ApplicationInsights = new ChangeTrackingDictionary(); + Others = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// Setting for diagnosing dependent application insights. - /// Setting for diagnosing dependent container registry. - /// Setting for diagnosing dns resolution. - /// Setting for diagnosing dependent key vault. + /// Setting for diagnosing user defined routing. /// Setting for diagnosing network security group. - /// Setting for diagnosing unclassified category of problems. - /// Setting for diagnosing the presence of required resource providers in the workspace. /// Setting for diagnosing resource lock. + /// Setting for diagnosing dns resolution. /// Setting for diagnosing dependent storage account. - /// Setting for diagnosing user defined routing. + /// Setting for diagnosing dependent key vault. + /// Setting for diagnosing dependent container registry. + /// Setting for diagnosing dependent application insights. + /// Setting for diagnosing unclassified category of problems. /// Keeps track of any properties unknown to the library. - internal MachineLearningWorkspaceDiagnoseProperties(IDictionary applicationInsights, IDictionary containerRegistry, IDictionary dnsResolution, IDictionary keyVault, IDictionary nsg, IDictionary others, IDictionary requiredResourceProviders, IDictionary resourceLock, IDictionary storageAccount, IDictionary udr, IDictionary serializedAdditionalRawData) + internal MachineLearningWorkspaceDiagnoseProperties(IDictionary udr, IDictionary nsg, IDictionary resourceLock, IDictionary dnsResolution, IDictionary storageAccount, IDictionary keyVault, IDictionary containerRegistry, IDictionary applicationInsights, IDictionary others, IDictionary serializedAdditionalRawData) { - ApplicationInsights = applicationInsights; - ContainerRegistry = containerRegistry; - DnsResolution = dnsResolution; - KeyVault = keyVault; + Udr = udr; Nsg = nsg; - Others = others; - RequiredResourceProviders = requiredResourceProviders; ResourceLock = resourceLock; + DnsResolution = dnsResolution; StorageAccount = storageAccount; - Udr = udr; + KeyVault = keyVault; + ContainerRegistry = containerRegistry; + ApplicationInsights = applicationInsights; + Others = others; _serializedAdditionalRawData = serializedAdditionalRawData; } /// - /// Setting for diagnosing dependent application insights - /// - /// 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" }. - /// - /// - /// - /// - public IDictionary ApplicationInsights { get; } - /// - /// Setting for diagnosing dependent container registry + /// Setting for diagnosing user defined routing /// /// To assign an object to the value of this property use . /// @@ -148,9 +114,9 @@ internal MachineLearningWorkspaceDiagnoseProperties(IDictionary /// /// - public IDictionary ContainerRegistry { get; } + public IDictionary Udr { get; } /// - /// Setting for diagnosing dns resolution + /// Setting for diagnosing network security group /// /// To assign an object to the value of this property use . /// @@ -179,9 +145,9 @@ internal MachineLearningWorkspaceDiagnoseProperties(IDictionary /// /// - public IDictionary DnsResolution { get; } + public IDictionary Nsg { get; } /// - /// Setting for diagnosing dependent key vault + /// Setting for diagnosing resource lock /// /// To assign an object to the value of this property use . /// @@ -210,9 +176,9 @@ internal MachineLearningWorkspaceDiagnoseProperties(IDictionary /// /// - public IDictionary KeyVault { get; } + public IDictionary ResourceLock { get; } /// - /// Setting for diagnosing network security group + /// Setting for diagnosing dns resolution /// /// To assign an object to the value of this property use . /// @@ -241,9 +207,9 @@ internal MachineLearningWorkspaceDiagnoseProperties(IDictionary /// /// - public IDictionary Nsg { get; } + public IDictionary DnsResolution { get; } /// - /// Setting for diagnosing unclassified category of problems + /// Setting for diagnosing dependent storage account /// /// To assign an object to the value of this property use . /// @@ -272,9 +238,9 @@ internal MachineLearningWorkspaceDiagnoseProperties(IDictionary /// /// - public IDictionary Others { get; } + public IDictionary StorageAccount { get; } /// - /// Setting for diagnosing the presence of required resource providers in the workspace. + /// Setting for diagnosing dependent key vault /// /// To assign an object to the value of this property use . /// @@ -303,9 +269,9 @@ internal MachineLearningWorkspaceDiagnoseProperties(IDictionary /// /// - public IDictionary RequiredResourceProviders { get; } + public IDictionary KeyVault { get; } /// - /// Setting for diagnosing resource lock + /// Setting for diagnosing dependent container registry /// /// To assign an object to the value of this property use . /// @@ -334,9 +300,9 @@ internal MachineLearningWorkspaceDiagnoseProperties(IDictionary /// /// - public IDictionary ResourceLock { get; } + public IDictionary ContainerRegistry { get; } /// - /// Setting for diagnosing dependent storage account + /// Setting for diagnosing dependent application insights /// /// To assign an object to the value of this property use . /// @@ -365,9 +331,9 @@ internal MachineLearningWorkspaceDiagnoseProperties(IDictionary /// /// - public IDictionary StorageAccount { get; } + public IDictionary ApplicationInsights { get; } /// - /// Setting for diagnosing user defined routing + /// Setting for diagnosing unclassified category of problems /// /// To assign an object to the value of this property use . /// @@ -396,6 +362,6 @@ internal MachineLearningWorkspaceDiagnoseProperties(IDictionary /// /// - public IDictionary Udr { get; } + public IDictionary Others { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.Serialization.cs index bf0f6d06ed4d5..7f915e51ab308 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.Serialization.cs @@ -26,31 +26,31 @@ void IJsonModel.Write(Utf8JsonWriter writ } writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(UserStorageKey)) + { + writer.WritePropertyName("userStorageKey"u8); + writer.WriteStringValue(UserStorageKey); + } + if (options.Format != "W" && Optional.IsDefined(UserStorageResourceId)) + { + writer.WritePropertyName("userStorageResourceId"u8); + writer.WriteStringValue(UserStorageResourceId); + } if (options.Format != "W" && Optional.IsDefined(AppInsightsInstrumentationKey)) { writer.WritePropertyName("appInsightsInstrumentationKey"u8); writer.WriteStringValue(AppInsightsInstrumentationKey); } - if (Optional.IsDefined(ContainerRegistryCredentials)) + if (options.Format != "W" && Optional.IsDefined(ContainerRegistryCredentials)) { writer.WritePropertyName("containerRegistryCredentials"u8); writer.WriteObjectValue(ContainerRegistryCredentials, options); } - if (Optional.IsDefined(NotebookAccessKeys)) + if (options.Format != "W" && Optional.IsDefined(NotebookAccessKeys)) { writer.WritePropertyName("notebookAccessKeys"u8); writer.WriteObjectValue(NotebookAccessKeys, options); } - if (options.Format != "W" && Optional.IsDefined(UserStorageResourceId)) - { - writer.WritePropertyName("userStorageArmId"u8); - writer.WriteStringValue(UserStorageResourceId); - } - if (options.Format != "W" && Optional.IsDefined(UserStorageKey)) - { - writer.WritePropertyName("userStorageKey"u8); - writer.WriteStringValue(UserStorageKey); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -89,15 +89,25 @@ internal static MachineLearningWorkspaceGetKeysResult DeserializeMachineLearning { return null; } + string userStorageKey = default; + string userStorageResourceId = default; string appInsightsInstrumentationKey = default; MachineLearningContainerRegistryCredentials containerRegistryCredentials = default; MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys = default; - string userStorageArmId = default; - string userStorageKey = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("userStorageKey"u8)) + { + userStorageKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("userStorageResourceId"u8)) + { + userStorageResourceId = property.Value.GetString(); + continue; + } if (property.NameEquals("appInsightsInstrumentationKey"u8)) { appInsightsInstrumentationKey = property.Value.GetString(); @@ -121,16 +131,6 @@ internal static MachineLearningWorkspaceGetKeysResult DeserializeMachineLearning notebookAccessKeys = MachineLearningWorkspaceGetNotebookKeysResult.DeserializeMachineLearningWorkspaceGetNotebookKeysResult(property.Value, options); continue; } - if (property.NameEquals("userStorageArmId"u8)) - { - userStorageArmId = property.Value.GetString(); - continue; - } - if (property.NameEquals("userStorageKey"u8)) - { - userStorageKey = property.Value.GetString(); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -138,11 +138,11 @@ internal static MachineLearningWorkspaceGetKeysResult DeserializeMachineLearning } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningWorkspaceGetKeysResult( + userStorageKey, + userStorageResourceId, appInsightsInstrumentationKey, containerRegistryCredentials, notebookAccessKeys, - userStorageArmId, - userStorageKey, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.cs index f6cb4b754f1e2..311565f780390 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.cs @@ -51,31 +51,31 @@ internal MachineLearningWorkspaceGetKeysResult() } /// Initializes a new instance of . - /// The access key of the workspace app insights. + /// + /// + /// /// /// - /// The arm Id key of the workspace storage. - /// The access key of the workspace storage. /// Keeps track of any properties unknown to the library. - internal MachineLearningWorkspaceGetKeysResult(string appInsightsInstrumentationKey, MachineLearningContainerRegistryCredentials containerRegistryCredentials, MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys, string userStorageResourceId, string userStorageKey, IDictionary serializedAdditionalRawData) + internal MachineLearningWorkspaceGetKeysResult(string userStorageKey, string userStorageResourceId, string appInsightsInstrumentationKey, MachineLearningContainerRegistryCredentials containerRegistryCredentials, MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys, IDictionary serializedAdditionalRawData) { + UserStorageKey = userStorageKey; + UserStorageResourceId = userStorageResourceId; AppInsightsInstrumentationKey = appInsightsInstrumentationKey; ContainerRegistryCredentials = containerRegistryCredentials; NotebookAccessKeys = notebookAccessKeys; - UserStorageResourceId = userStorageResourceId; - UserStorageKey = userStorageKey; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The access key of the workspace app insights. + /// Gets the user storage key. + public string UserStorageKey { get; } + /// Gets the user storage resource id. + public string UserStorageResourceId { get; } + /// Gets the app insights instrumentation key. public string AppInsightsInstrumentationKey { get; } /// Gets the container registry credentials. public MachineLearningContainerRegistryCredentials ContainerRegistryCredentials { get; } /// Gets the notebook access keys. public MachineLearningWorkspaceGetNotebookKeysResult NotebookAccessKeys { get; } - /// The arm Id key of the workspace storage. - public string UserStorageResourceId { get; } - /// The access key of the workspace storage. - public string UserStorageKey { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.cs index 90e1de9c48833..4db3d8f4f1286 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.cs @@ -51,8 +51,8 @@ internal MachineLearningWorkspaceGetNotebookKeysResult() } /// Initializes a new instance of . - /// The primary access key of the Notebook. - /// The secondary access key of the Notebook. + /// + /// /// Keeps track of any properties unknown to the library. internal MachineLearningWorkspaceGetNotebookKeysResult(string primaryAccessKey, string secondaryAccessKey, IDictionary serializedAdditionalRawData) { @@ -61,9 +61,9 @@ internal MachineLearningWorkspaceGetNotebookKeysResult(string primaryAccessKey, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The primary access key of the Notebook. + /// Gets the primary access key. public string PrimaryAccessKey { get; } - /// The secondary access key of the Notebook. + /// Gets the secondary access key. public string SecondaryAccessKey { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.cs index 112fbf3a37edb..409055f46d5a9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.cs @@ -51,7 +51,7 @@ internal MachineLearningWorkspaceGetStorageAccountKeysResult() } /// Initializes a new instance of . - /// The access key of the storage. + /// /// Keeps track of any properties unknown to the library. internal MachineLearningWorkspaceGetStorageAccountKeysResult(string userStorageKey, IDictionary serializedAdditionalRawData) { @@ -59,7 +59,7 @@ internal MachineLearningWorkspaceGetStorageAccountKeysResult(string userStorageK _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The access key of the storage. + /// Gets the user storage key. public string UserStorageKey { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.Serialization.cs index bd0c3148744de..fe694e175a317 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.Serialization.cs @@ -26,31 +26,36 @@ void IJsonModel.Write(Utf8Jso } writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(AccessToken)) - { - writer.WritePropertyName("accessToken"u8); - writer.WriteStringValue(AccessToken); - } - if (options.Format != "W" && Optional.IsDefined(ExpiresIn)) + if (options.Format != "W" && Optional.IsDefined(NotebookResourceId)) { - writer.WritePropertyName("expiresIn"u8); - writer.WriteNumberValue(ExpiresIn.Value); + writer.WritePropertyName("notebookResourceId"u8); + writer.WriteStringValue(NotebookResourceId); } if (options.Format != "W" && Optional.IsDefined(HostName)) { writer.WritePropertyName("hostName"u8); writer.WriteStringValue(HostName); } - if (options.Format != "W" && Optional.IsDefined(NotebookResourceId)) - { - writer.WritePropertyName("notebookResourceId"u8); - writer.WriteStringValue(NotebookResourceId); - } if (options.Format != "W" && Optional.IsDefined(PublicDns)) { writer.WritePropertyName("publicDns"u8); writer.WriteStringValue(PublicDns); } + if (options.Format != "W" && Optional.IsDefined(AccessToken)) + { + writer.WritePropertyName("accessToken"u8); + writer.WriteStringValue(AccessToken); + } + if (options.Format != "W" && Optional.IsDefined(TokenType)) + { + writer.WritePropertyName("tokenType"u8); + writer.WriteStringValue(TokenType); + } + if (options.Format != "W" && Optional.IsDefined(ExpiresIn)) + { + writer.WritePropertyName("expiresIn"u8); + writer.WriteNumberValue(ExpiresIn.Value); + } if (options.Format != "W" && Optional.IsDefined(RefreshToken)) { writer.WritePropertyName("refreshToken"u8); @@ -61,11 +66,6 @@ void IJsonModel.Write(Utf8Jso writer.WritePropertyName("scope"u8); writer.WriteStringValue(Scope); } - if (options.Format != "W" && Optional.IsDefined(TokenType)) - { - writer.WritePropertyName("tokenType"u8); - writer.WriteStringValue(TokenType); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -104,45 +104,50 @@ internal static MachineLearningWorkspaceNotebookAccessTokenResult DeserializeMac { return null; } - string accessToken = default; - int? expiresIn = default; - string hostName = default; string notebookResourceId = default; + string hostName = default; string publicDns = default; + string accessToken = default; + string tokenType = default; + int? expiresIn = default; string refreshToken = default; string scope = default; - string tokenType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("accessToken"u8)) + if (property.NameEquals("notebookResourceId"u8)) { - accessToken = property.Value.GetString(); + notebookResourceId = property.Value.GetString(); continue; } - if (property.NameEquals("expiresIn"u8)) + if (property.NameEquals("hostName"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - expiresIn = property.Value.GetInt32(); + hostName = property.Value.GetString(); continue; } - if (property.NameEquals("hostName"u8)) + if (property.NameEquals("publicDns"u8)) { - hostName = property.Value.GetString(); + publicDns = property.Value.GetString(); continue; } - if (property.NameEquals("notebookResourceId"u8)) + if (property.NameEquals("accessToken"u8)) { - notebookResourceId = property.Value.GetString(); + accessToken = property.Value.GetString(); continue; } - if (property.NameEquals("publicDns"u8)) + if (property.NameEquals("tokenType"u8)) { - publicDns = property.Value.GetString(); + tokenType = property.Value.GetString(); + continue; + } + if (property.NameEquals("expiresIn"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiresIn = property.Value.GetInt32(); continue; } if (property.NameEquals("refreshToken"u8)) @@ -155,11 +160,6 @@ internal static MachineLearningWorkspaceNotebookAccessTokenResult DeserializeMac scope = property.Value.GetString(); continue; } - if (property.NameEquals("tokenType"u8)) - { - tokenType = property.Value.GetString(); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -167,14 +167,14 @@ internal static MachineLearningWorkspaceNotebookAccessTokenResult DeserializeMac } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningWorkspaceNotebookAccessTokenResult( - accessToken, - expiresIn, - hostName, notebookResourceId, + hostName, publicDns, + accessToken, + tokenType, + expiresIn, refreshToken, scope, - tokenType, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.cs index 3cbf7b31be0e1..b8159f8682a2c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.cs @@ -51,43 +51,43 @@ internal MachineLearningWorkspaceNotebookAccessTokenResult() } /// Initializes a new instance of . - /// - /// - /// /// + /// /// + /// + /// + /// /// /// - /// /// Keeps track of any properties unknown to the library. - internal MachineLearningWorkspaceNotebookAccessTokenResult(string accessToken, int? expiresIn, string hostName, string notebookResourceId, string publicDns, string refreshToken, string scope, string tokenType, IDictionary serializedAdditionalRawData) + internal MachineLearningWorkspaceNotebookAccessTokenResult(string notebookResourceId, string hostName, string publicDns, string accessToken, string tokenType, int? expiresIn, string refreshToken, string scope, IDictionary serializedAdditionalRawData) { - AccessToken = accessToken; - ExpiresIn = expiresIn; - HostName = hostName; NotebookResourceId = notebookResourceId; + HostName = hostName; PublicDns = publicDns; + AccessToken = accessToken; + TokenType = tokenType; + ExpiresIn = expiresIn; RefreshToken = refreshToken; Scope = scope; - TokenType = tokenType; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the access token. - public string AccessToken { get; } - /// Gets the expires in. - public int? ExpiresIn { get; } - /// Gets the host name. - public string HostName { get; } /// Gets the notebook resource id. public string NotebookResourceId { get; } + /// Gets the host name. + public string HostName { get; } /// Gets the public dns. public string PublicDns { get; } + /// Gets the access token. + public string AccessToken { get; } + /// Gets the token type. + public string TokenType { get; } + /// Gets the expires in. + public int? ExpiresIn { get; } /// Gets the refresh token. public string RefreshToken { get; } /// Gets the scope. public string Scope { get; } - /// Gets the token type. - public string TokenType { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.Serialization.cs index bad217ca2fa1f..8d1a4c6b9fc45 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.Serialization.cs @@ -27,17 +27,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku, options); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -49,48 +38,24 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndObject(); } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(AllowRoleAssignmentOnRG)) - { - writer.WritePropertyName("allowRoleAssignmentOnRG"u8); - writer.WriteBooleanValue(AllowRoleAssignmentOnRG.Value); - } - if (Optional.IsDefined(ApplicationInsights)) + if (Optional.IsDefined(Sku)) { - writer.WritePropertyName("applicationInsights"u8); - writer.WriteStringValue(ApplicationInsights); + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); } - if (Optional.IsDefined(ContainerRegistry)) + if (Optional.IsDefined(Identity)) { - writer.WritePropertyName("containerRegistry"u8); - writer.WriteStringValue(ContainerRegistry); + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); if (Optional.IsDefined(Description)) { writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } - if (Optional.IsDefined(EnableDataIsolation)) - { - writer.WritePropertyName("enableDataIsolation"u8); - writer.WriteBooleanValue(EnableDataIsolation.Value); - } - if (Optional.IsDefined(EnableSoftwareBillOfMaterials)) - { - writer.WritePropertyName("enableSoftwareBillOfMaterials"u8); - writer.WriteBooleanValue(EnableSoftwareBillOfMaterials.Value); - } - if (Optional.IsDefined(Encryption)) - { - writer.WritePropertyName("encryption"u8); - writer.WriteObjectValue(Encryption, options); - } - if (Optional.IsDefined(FeatureStoreSettings)) - { - writer.WritePropertyName("featureStoreSettings"u8); - writer.WriteObjectValue(FeatureStoreSettings, options); - } if (Optional.IsDefined(FriendlyName)) { writer.WritePropertyName("friendlyName"u8); @@ -101,51 +66,61 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode writer.WritePropertyName("imageBuildCompute"u8); writer.WriteStringValue(ImageBuildCompute); } - if (Optional.IsCollectionDefined(IPAllowlist)) - { - writer.WritePropertyName("ipAllowlist"u8); - writer.WriteStartArray(); - foreach (var item in IPAllowlist) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ManagedNetwork)) + if (Optional.IsDefined(ServiceManagedResourcesSettings)) { - writer.WritePropertyName("managedNetwork"u8); - writer.WriteObjectValue(ManagedNetwork, options); + writer.WritePropertyName("serviceManagedResourcesSettings"u8); + writer.WriteObjectValue(ServiceManagedResourcesSettings, options); } if (Optional.IsDefined(PrimaryUserAssignedIdentity)) { writer.WritePropertyName("primaryUserAssignedIdentity"u8); writer.WriteStringValue(PrimaryUserAssignedIdentity); } + if (Optional.IsDefined(ServerlessComputeSettings)) + { + writer.WritePropertyName("serverlessComputeSettings"u8); + writer.WriteObjectValue(ServerlessComputeSettings, options); + } if (Optional.IsDefined(PublicNetworkAccessType)) { writer.WritePropertyName("publicNetworkAccess"u8); writer.WriteStringValue(PublicNetworkAccessType.Value.ToString()); } - if (Optional.IsDefined(ServerlessComputeSettings)) + if (Optional.IsDefined(ApplicationInsights)) { - writer.WritePropertyName("serverlessComputeSettings"u8); - writer.WriteObjectValue(ServerlessComputeSettings, options); + writer.WritePropertyName("applicationInsights"u8); + writer.WriteStringValue(ApplicationInsights); } - if (Optional.IsDefined(ServiceManagedResourcesSettings)) + if (Optional.IsDefined(ContainerRegistry)) { - writer.WritePropertyName("serviceManagedResourcesSettings"u8); - writer.WriteObjectValue(ServiceManagedResourcesSettings, options); + writer.WritePropertyName("containerRegistry"u8); + writer.WriteStringValue(ContainerRegistry); + } + if (Optional.IsDefined(FeatureStoreSettings)) + { + writer.WritePropertyName("featureStoreSettings"u8); + writer.WriteObjectValue(FeatureStoreSettings, options); + } + if (Optional.IsDefined(ManagedNetwork)) + { + writer.WritePropertyName("managedNetwork"u8); + writer.WriteObjectValue(ManagedNetwork, options); } - if (Optional.IsDefined(SoftDeleteRetentionInDays)) + if (Optional.IsDefined(EnableDataIsolation)) { - writer.WritePropertyName("softDeleteRetentionInDays"u8); - writer.WriteNumberValue(SoftDeleteRetentionInDays.Value); + writer.WritePropertyName("enableDataIsolation"u8); + writer.WriteBooleanValue(EnableDataIsolation.Value); } if (Optional.IsDefined(V1LegacyMode)) { writer.WritePropertyName("v1LegacyMode"u8); writer.WriteBooleanValue(V1LegacyMode.Value); } + if (Optional.IsDefined(Encryption)) + { + writer.WritePropertyName("encryption"u8); + writer.WriteObjectValue(Encryption, options); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -185,39 +160,39 @@ internal static MachineLearningWorkspacePatch DeserializeMachineLearningWorkspac { return null; } - ManagedServiceIdentity identity = default; - MachineLearningSku sku = default; IDictionary tags = default; - bool? allowRoleAssignmentOnRG = default; - string applicationInsights = default; - string containerRegistry = default; + MachineLearningSku sku = default; + ManagedServiceIdentity identity = default; string description = default; - bool? enableDataIsolation = default; - bool? enableSoftwareBillOfMaterials = default; - EncryptionUpdateProperties encryption = default; - FeatureStoreSettings featureStoreSettings = default; string friendlyName = default; string imageBuildCompute = default; - IList ipAllowlist = default; - ManagedNetworkSettings managedNetwork = default; + ServiceManagedResourcesSettings serviceManagedResourcesSettings = default; string primaryUserAssignedIdentity = default; - MachineLearningPublicNetworkAccessType? publicNetworkAccess = default; ServerlessComputeSettings serverlessComputeSettings = default; - ServiceManagedResourcesSettings serviceManagedResourcesSettings = default; - int? softDeleteRetentionInDays = default; + PublicNetworkAccess? publicNetworkAccess = default; + string applicationInsights = default; + string containerRegistry = default; + FeatureStoreSettings featureStoreSettings = default; + ManagedNetworkSettings managedNetwork = default; + bool? enableDataIsolation = default; bool? v1LegacyMode = default; + EncryptionUpdateProperties encryption = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; continue; } if (property.NameEquals("sku"u8)) @@ -229,18 +204,14 @@ internal static MachineLearningWorkspacePatch DeserializeMachineLearningWorkspac sku = MachineLearningSku.DeserializeMachineLearningSku(property.Value, options); continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); continue; } if (property.NameEquals("properties"u8)) @@ -252,88 +223,70 @@ internal static MachineLearningWorkspacePatch DeserializeMachineLearningWorkspac } foreach (var property0 in property.Value.EnumerateObject()) { - if (property0.NameEquals("allowRoleAssignmentOnRG"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowRoleAssignmentOnRG = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("applicationInsights"u8)) + if (property0.NameEquals("description"u8)) { - applicationInsights = property0.Value.GetString(); + description = property0.Value.GetString(); continue; } - if (property0.NameEquals("containerRegistry"u8)) + if (property0.NameEquals("friendlyName"u8)) { - containerRegistry = property0.Value.GetString(); + friendlyName = property0.Value.GetString(); continue; } - if (property0.NameEquals("description"u8)) + if (property0.NameEquals("imageBuildCompute"u8)) { - description = property0.Value.GetString(); + imageBuildCompute = property0.Value.GetString(); continue; } - if (property0.NameEquals("enableDataIsolation"u8)) + if (property0.NameEquals("serviceManagedResourcesSettings"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - enableDataIsolation = property0.Value.GetBoolean(); + serviceManagedResourcesSettings = ServiceManagedResourcesSettings.DeserializeServiceManagedResourcesSettings(property0.Value, options); continue; } - if (property0.NameEquals("enableSoftwareBillOfMaterials"u8)) + if (property0.NameEquals("primaryUserAssignedIdentity"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableSoftwareBillOfMaterials = property0.Value.GetBoolean(); + primaryUserAssignedIdentity = property0.Value.GetString(); continue; } - if (property0.NameEquals("encryption"u8)) + if (property0.NameEquals("serverlessComputeSettings"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - encryption = EncryptionUpdateProperties.DeserializeEncryptionUpdateProperties(property0.Value, options); + serverlessComputeSettings = ServerlessComputeSettings.DeserializeServerlessComputeSettings(property0.Value, options); continue; } - if (property0.NameEquals("featureStoreSettings"u8)) + if (property0.NameEquals("publicNetworkAccess"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - featureStoreSettings = FeatureStoreSettings.DeserializeFeatureStoreSettings(property0.Value, options); + publicNetworkAccess = new PublicNetworkAccess(property0.Value.GetString()); continue; } - if (property0.NameEquals("friendlyName"u8)) + if (property0.NameEquals("applicationInsights"u8)) { - friendlyName = property0.Value.GetString(); + applicationInsights = property0.Value.GetString(); continue; } - if (property0.NameEquals("imageBuildCompute"u8)) + if (property0.NameEquals("containerRegistry"u8)) { - imageBuildCompute = property0.Value.GetString(); + containerRegistry = property0.Value.GetString(); continue; } - if (property0.NameEquals("ipAllowlist"u8)) + if (property0.NameEquals("featureStoreSettings"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - ipAllowlist = array; + featureStoreSettings = FeatureStoreSettings.DeserializeFeatureStoreSettings(property0.Value, options); continue; } if (property0.NameEquals("managedNetwork"u8)) @@ -345,54 +298,31 @@ internal static MachineLearningWorkspacePatch DeserializeMachineLearningWorkspac managedNetwork = ManagedNetworkSettings.DeserializeManagedNetworkSettings(property0.Value, options); continue; } - if (property0.NameEquals("primaryUserAssignedIdentity"u8)) - { - primaryUserAssignedIdentity = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("publicNetworkAccess"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publicNetworkAccess = new MachineLearningPublicNetworkAccessType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("serverlessComputeSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serverlessComputeSettings = ServerlessComputeSettings.DeserializeServerlessComputeSettings(property0.Value, options); - continue; - } - if (property0.NameEquals("serviceManagedResourcesSettings"u8)) + if (property0.NameEquals("enableDataIsolation"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - serviceManagedResourcesSettings = ServiceManagedResourcesSettings.DeserializeServiceManagedResourcesSettings(property0.Value, options); + enableDataIsolation = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("softDeleteRetentionInDays"u8)) + if (property0.NameEquals("v1LegacyMode"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - softDeleteRetentionInDays = property0.Value.GetInt32(); + v1LegacyMode = property0.Value.GetBoolean(); continue; } - if (property0.NameEquals("v1LegacyMode"u8)) + if (property0.NameEquals("encryption"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - v1LegacyMode = property0.Value.GetBoolean(); + encryption = EncryptionUpdateProperties.DeserializeEncryptionUpdateProperties(property0.Value, options); continue; } } @@ -405,27 +335,23 @@ internal static MachineLearningWorkspacePatch DeserializeMachineLearningWorkspac } serializedAdditionalRawData = rawDataDictionary; return new MachineLearningWorkspacePatch( - identity, - sku, tags ?? new ChangeTrackingDictionary(), - allowRoleAssignmentOnRG, - applicationInsights, - containerRegistry, + sku, + identity, description, - enableDataIsolation, - enableSoftwareBillOfMaterials, - encryption, - featureStoreSettings, friendlyName, imageBuildCompute, - ipAllowlist ?? new ChangeTrackingList(), - managedNetwork, + serviceManagedResourcesSettings, primaryUserAssignedIdentity, - publicNetworkAccess, serverlessComputeSettings, - serviceManagedResourcesSettings, - softDeleteRetentionInDays, + publicNetworkAccess, + applicationInsights, + containerRegistry, + featureStoreSettings, + managedNetwork, + enableDataIsolation, v1LegacyMode, + encryption, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.cs index 98a25d81437c4..4bf0f677cb400 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.cs @@ -50,104 +50,64 @@ public partial class MachineLearningWorkspacePatch public MachineLearningWorkspacePatch() { Tags = new ChangeTrackingDictionary(); - IPAllowlist = new ChangeTrackingList(); } /// Initializes a new instance of . - /// Managed service identity (system assigned and/or user assigned identities). - /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. /// The resource tags for the machine learning workspace. - /// - /// ARM id of the application insights associated with this workspace. - /// ARM id of the container registry associated with this workspace. + /// The sku of the workspace. + /// The identity of the resource. /// The description of this workspace. - /// - /// Flag to tell if SoftwareBillOfMaterials should be enabled for this workspace. - /// - /// Settings for feature store type workspace. - /// The friendly name for this workspace. This name in mutable. + /// The friendly name for this workspace. /// The compute name for image build. - /// The list of IPv4 addresses that are allowed to access the workspace. - /// Managed Network settings for a machine learning workspace. + /// The service managed resource settings. /// The user assigned identity resource id that represents the workspace identity. + /// Settings for serverless compute created in the workspace. /// Whether requests from Public Network are allowed. - /// Settings for serverless compute in a workspace. - /// The service managed resource settings. - /// Retention time in days after workspace get soft deleted. + /// ARM id of the application insights associated with this workspace. + /// ARM id of the container registry associated with this workspace. + /// Settings for feature store type workspace. + /// Managed Network settings for a machine learning workspace. + /// /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + /// /// Keeps track of any properties unknown to the library. - internal MachineLearningWorkspacePatch(ManagedServiceIdentity identity, MachineLearningSku sku, IDictionary tags, bool? allowRoleAssignmentOnRG, string applicationInsights, string containerRegistry, string description, bool? enableDataIsolation, bool? enableSoftwareBillOfMaterials, EncryptionUpdateProperties encryption, FeatureStoreSettings featureStoreSettings, string friendlyName, string imageBuildCompute, IList ipAllowlist, ManagedNetworkSettings managedNetwork, string primaryUserAssignedIdentity, MachineLearningPublicNetworkAccessType? publicNetworkAccessType, ServerlessComputeSettings serverlessComputeSettings, ServiceManagedResourcesSettings serviceManagedResourcesSettings, int? softDeleteRetentionInDays, bool? v1LegacyMode, IDictionary serializedAdditionalRawData) + internal MachineLearningWorkspacePatch(IDictionary tags, MachineLearningSku sku, ManagedServiceIdentity identity, string description, string friendlyName, string imageBuildCompute, ServiceManagedResourcesSettings serviceManagedResourcesSettings, string primaryUserAssignedIdentity, ServerlessComputeSettings serverlessComputeSettings, PublicNetworkAccess? publicNetworkAccessType, string applicationInsights, string containerRegistry, FeatureStoreSettings featureStoreSettings, ManagedNetworkSettings managedNetwork, bool? enableDataIsolation, bool? v1LegacyMode, EncryptionUpdateProperties encryption, IDictionary serializedAdditionalRawData) { - Identity = identity; - Sku = sku; Tags = tags; - AllowRoleAssignmentOnRG = allowRoleAssignmentOnRG; - ApplicationInsights = applicationInsights; - ContainerRegistry = containerRegistry; + Sku = sku; + Identity = identity; Description = description; - EnableDataIsolation = enableDataIsolation; - EnableSoftwareBillOfMaterials = enableSoftwareBillOfMaterials; - Encryption = encryption; - FeatureStoreSettings = featureStoreSettings; FriendlyName = friendlyName; ImageBuildCompute = imageBuildCompute; - IPAllowlist = ipAllowlist; - ManagedNetwork = managedNetwork; + ServiceManagedResourcesSettings = serviceManagedResourcesSettings; PrimaryUserAssignedIdentity = primaryUserAssignedIdentity; - PublicNetworkAccessType = publicNetworkAccessType; ServerlessComputeSettings = serverlessComputeSettings; - ServiceManagedResourcesSettings = serviceManagedResourcesSettings; - SoftDeleteRetentionInDays = softDeleteRetentionInDays; + PublicNetworkAccessType = publicNetworkAccessType; + ApplicationInsights = applicationInsights; + ContainerRegistry = containerRegistry; + FeatureStoreSettings = featureStoreSettings; + ManagedNetwork = managedNetwork; + EnableDataIsolation = enableDataIsolation; V1LegacyMode = v1LegacyMode; + Encryption = encryption; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Managed service identity (system assigned and/or user assigned identities). - public ManagedServiceIdentity Identity { get; set; } - /// Optional. This field is required to be implemented by the RP because AML is supporting more than one tier. - public MachineLearningSku Sku { get; set; } /// The resource tags for the machine learning workspace. public IDictionary Tags { get; } - /// Gets or sets the allow role assignment on rg. - public bool? AllowRoleAssignmentOnRG { get; set; } - /// ARM id of the application insights associated with this workspace. - public string ApplicationInsights { get; set; } - /// ARM id of the container registry associated with this workspace. - public string ContainerRegistry { get; set; } + /// The sku of the workspace. + public MachineLearningSku Sku { get; set; } + /// The identity of the resource. + public ManagedServiceIdentity Identity { get; set; } /// The description of this workspace. public string Description { get; set; } - /// Gets or sets the enable data isolation. - public bool? EnableDataIsolation { get; set; } - /// Flag to tell if SoftwareBillOfMaterials should be enabled for this workspace. - public bool? EnableSoftwareBillOfMaterials { get; set; } - /// Gets or sets the encryption. - internal EncryptionUpdateProperties Encryption { get; set; } - /// Gets or sets the key identifier. - public string KeyIdentifier - { - get => Encryption is null ? default : Encryption.KeyIdentifier; - set => Encryption = new EncryptionUpdateProperties(value); - } - - /// Settings for feature store type workspace. - public FeatureStoreSettings FeatureStoreSettings { get; set; } - /// The friendly name for this workspace. This name in mutable. + /// The friendly name for this workspace. public string FriendlyName { get; set; } /// The compute name for image build. public string ImageBuildCompute { get; set; } - /// The list of IPv4 addresses that are allowed to access the workspace. - public IList IPAllowlist { get; } - /// Managed Network settings for a machine learning workspace. - public ManagedNetworkSettings ManagedNetwork { get; set; } - /// The user assigned identity resource id that represents the workspace identity. - public string PrimaryUserAssignedIdentity { get; set; } - /// Whether requests from Public Network are allowed. - public MachineLearningPublicNetworkAccessType? PublicNetworkAccessType { get; set; } - /// Settings for serverless compute in a workspace. - public ServerlessComputeSettings ServerlessComputeSettings { get; set; } /// The service managed resource settings. internal ServiceManagedResourcesSettings ServiceManagedResourcesSettings { get; set; } - /// Gets or sets the cosmos db collections throughput. + /// The throughput of the collections in cosmosdb database. public int? CosmosDbCollectionsThroughput { get => ServiceManagedResourcesSettings is null ? default : ServiceManagedResourcesSettings.CosmosDbCollectionsThroughput; @@ -159,9 +119,31 @@ public int? CosmosDbCollectionsThroughput } } - /// Retention time in days after workspace get soft deleted. - public int? SoftDeleteRetentionInDays { get; set; } + /// The user assigned identity resource id that represents the workspace identity. + public string PrimaryUserAssignedIdentity { get; set; } + /// Settings for serverless compute created in the workspace. + public ServerlessComputeSettings ServerlessComputeSettings { get; set; } + /// Whether requests from Public Network are allowed. + public PublicNetworkAccess? PublicNetworkAccessType { get; set; } + /// ARM id of the application insights associated with this workspace. + public string ApplicationInsights { get; set; } + /// ARM id of the container registry associated with this workspace. + public string ContainerRegistry { get; set; } + /// Settings for feature store type workspace. + public FeatureStoreSettings FeatureStoreSettings { get; set; } + /// Managed Network settings for a machine learning workspace. + public ManagedNetworkSettings ManagedNetwork { get; set; } + /// Gets or sets the enable data isolation. + public bool? EnableDataIsolation { get; set; } /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. public bool? V1LegacyMode { get; set; } + /// Gets or sets the encryption. + internal EncryptionUpdateProperties Encryption { get; set; } + /// Gets or sets the key identifier. + public string KeyIdentifier + { + get => Encryption is null ? default : Encryption.KeyIdentifier; + set => Encryption = new EncryptionUpdateProperties(value); + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityCredential.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityCredential.Serialization.cs index 98e898af65f2d..f24b7039c644d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityCredential.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityCredential.Serialization.cs @@ -38,6 +38,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNull("managedIdentityType"); } } + if (Optional.IsDefined(UserManagedIdentityResourceId)) + { + if (UserManagedIdentityResourceId != null) + { + writer.WritePropertyName("userManagedIdentityResourceId"u8); + writer.WriteStringValue(UserManagedIdentityResourceId); + } + else + { + writer.WriteNull("userManagedIdentityResourceId"); + } + } if (Optional.IsDefined(UserManagedIdentityClientId)) { if (UserManagedIdentityClientId != null) @@ -62,18 +74,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WriteNull("userManagedIdentityPrincipalId"); } } - if (Optional.IsDefined(UserManagedIdentityResourceId)) - { - if (UserManagedIdentityResourceId != null) - { - writer.WritePropertyName("userManagedIdentityResourceId"u8); - writer.WriteStringValue(UserManagedIdentityResourceId); - } - else - { - writer.WriteNull("userManagedIdentityResourceId"); - } - } if (Optional.IsDefined(UserManagedIdentityTenantId)) { if (UserManagedIdentityTenantId != null) @@ -127,9 +127,9 @@ internal static ManagedIdentityCredential DeserializeManagedIdentityCredential(J return null; } string managedIdentityType = default; + string userManagedIdentityResourceId = default; string userManagedIdentityClientId = default; string userManagedIdentityPrincipalId = default; - string userManagedIdentityResourceId = default; string userManagedIdentityTenantId = default; DataReferenceCredentialType credentialType = default; IDictionary serializedAdditionalRawData = default; @@ -146,34 +146,34 @@ internal static ManagedIdentityCredential DeserializeManagedIdentityCredential(J managedIdentityType = property.Value.GetString(); continue; } - if (property.NameEquals("userManagedIdentityClientId"u8)) + if (property.NameEquals("userManagedIdentityResourceId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - userManagedIdentityClientId = null; + userManagedIdentityResourceId = null; continue; } - userManagedIdentityClientId = property.Value.GetString(); + userManagedIdentityResourceId = property.Value.GetString(); continue; } - if (property.NameEquals("userManagedIdentityPrincipalId"u8)) + if (property.NameEquals("userManagedIdentityClientId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - userManagedIdentityPrincipalId = null; + userManagedIdentityClientId = null; continue; } - userManagedIdentityPrincipalId = property.Value.GetString(); + userManagedIdentityClientId = property.Value.GetString(); continue; } - if (property.NameEquals("userManagedIdentityResourceId"u8)) + if (property.NameEquals("userManagedIdentityPrincipalId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - userManagedIdentityResourceId = null; + userManagedIdentityPrincipalId = null; continue; } - userManagedIdentityResourceId = property.Value.GetString(); + userManagedIdentityPrincipalId = property.Value.GetString(); continue; } if (property.NameEquals("userManagedIdentityTenantId"u8)) @@ -201,9 +201,9 @@ internal static ManagedIdentityCredential DeserializeManagedIdentityCredential(J credentialType, serializedAdditionalRawData, managedIdentityType, + userManagedIdentityResourceId, userManagedIdentityClientId, userManagedIdentityPrincipalId, - userManagedIdentityResourceId, userManagedIdentityTenantId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityCredential.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityCredential.cs index 555a30e411cc1..39807455c7417 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityCredential.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityCredential.cs @@ -23,28 +23,28 @@ internal ManagedIdentityCredential() /// [Required] Credential type used to authentication with storage. /// Keeps track of any properties unknown to the library. /// ManagedIdentityCredential identity type. + /// Full arm scope for the Id. For ManagedIdentityType = SystemManaged, this field is null. /// ClientId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. /// PrincipalId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. - /// Full arm scope for the Id. For ManagedIdentityType = SystemManaged, this field is null. /// TenantId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. - internal ManagedIdentityCredential(DataReferenceCredentialType credentialType, IDictionary serializedAdditionalRawData, string managedIdentityType, string userManagedIdentityClientId, string userManagedIdentityPrincipalId, string userManagedIdentityResourceId, string userManagedIdentityTenantId) : base(credentialType, serializedAdditionalRawData) + internal ManagedIdentityCredential(DataReferenceCredentialType credentialType, IDictionary serializedAdditionalRawData, string managedIdentityType, string userManagedIdentityResourceId, string userManagedIdentityClientId, string userManagedIdentityPrincipalId, string userManagedIdentityTenantId) : base(credentialType, serializedAdditionalRawData) { ManagedIdentityType = managedIdentityType; + UserManagedIdentityResourceId = userManagedIdentityResourceId; UserManagedIdentityClientId = userManagedIdentityClientId; UserManagedIdentityPrincipalId = userManagedIdentityPrincipalId; - UserManagedIdentityResourceId = userManagedIdentityResourceId; UserManagedIdentityTenantId = userManagedIdentityTenantId; CredentialType = credentialType; } /// ManagedIdentityCredential identity type. public string ManagedIdentityType { get; } + /// Full arm scope for the Id. For ManagedIdentityType = SystemManaged, this field is null. + public string UserManagedIdentityResourceId { get; } /// ClientId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. public string UserManagedIdentityClientId { get; } /// PrincipalId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. public string UserManagedIdentityPrincipalId { get; } - /// Full arm scope for the Id. For ManagedIdentityType = SystemManaged, this field is null. - public string UserManagedIdentityResourceId { get; } /// TenantId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. public string UserManagedIdentityTenantId { get; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.Serialization.cs index 2c63996e8dfdd..5f6dbcba59008 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.Serialization.cs @@ -59,16 +59,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("status"u8); writer.WriteObjectValue(Status, options); } - if (options.Format != "W" && Optional.IsCollectionDefined(ChangeableIsolationModes)) - { - writer.WritePropertyName("changeableIsolationModes"u8); - writer.WriteStartArray(); - foreach (var item in ChangeableIsolationModes) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -111,7 +101,6 @@ internal static ManagedNetworkSettings DeserializeManagedNetworkSettings(JsonEle string networkId = default; IDictionary outboundRules = default; ManagedNetworkProvisionStatus status = default; - IReadOnlyList changeableIsolationModes = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -154,33 +143,13 @@ internal static ManagedNetworkSettings DeserializeManagedNetworkSettings(JsonEle status = ManagedNetworkProvisionStatus.DeserializeManagedNetworkProvisionStatus(property.Value, options); continue; } - if (property.NameEquals("changeableIsolationModes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new IsolationMode(item.GetString())); - } - changeableIsolationModes = array; - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedNetworkSettings( - isolationMode, - networkId, - outboundRules ?? new ChangeTrackingDictionary(), - status, - changeableIsolationModes ?? new ChangeTrackingList(), - serializedAdditionalRawData); + return new ManagedNetworkSettings(isolationMode, networkId, outboundRules ?? new ChangeTrackingDictionary(), status, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.cs index 6a50509cb982e..57c04e669be17 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedNetworkSettings.cs @@ -49,7 +49,6 @@ public partial class ManagedNetworkSettings public ManagedNetworkSettings() { OutboundRules = new ChangeTrackingDictionary(); - ChangeableIsolationModes = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -61,15 +60,13 @@ public ManagedNetworkSettings() /// The available derived classes include , and . /// /// Status of the Provisioning for the managed network of a machine learning workspace. - /// /// Keeps track of any properties unknown to the library. - internal ManagedNetworkSettings(IsolationMode? isolationMode, string networkId, IDictionary outboundRules, ManagedNetworkProvisionStatus status, IReadOnlyList changeableIsolationModes, IDictionary serializedAdditionalRawData) + internal ManagedNetworkSettings(IsolationMode? isolationMode, string networkId, IDictionary outboundRules, ManagedNetworkProvisionStatus status, IDictionary serializedAdditionalRawData) { IsolationMode = isolationMode; NetworkId = networkId; OutboundRules = outboundRules; Status = status; - ChangeableIsolationModes = changeableIsolationModes; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -85,7 +82,5 @@ internal ManagedNetworkSettings(IsolationMode? isolationMode, string networkId, public IDictionary OutboundRules { get; set; } /// Status of the Provisioning for the managed network of a machine learning workspace. public ManagedNetworkProvisionStatus Status { get; set; } - /// Gets the changeable isolation modes. - public IReadOnlyList ChangeableIsolationModes { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineEndpointDeploymentResourceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineEndpointDeploymentResourceProperties.Serialization.cs deleted file mode 100644 index 0618aa7bc1e41..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineEndpointDeploymentResourceProperties.Serialization.cs +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ManagedOnlineEndpointDeploymentResourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ManagedOnlineEndpointDeploymentResourceProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(EndpointComputeType)) - { - writer.WritePropertyName("endpointComputeType"u8); - writer.WriteStringValue(EndpointComputeType.Value.ToString()); - } - if (Optional.IsDefined(Model)) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - } - if (Optional.IsDefined(FailureReason)) - { - writer.WritePropertyName("failureReason"u8); - writer.WriteStringValue(FailureReason); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(EndpointDeploymentResourcePropertiesType); - 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 - } - } - writer.WriteEndObject(); - } - - ManagedOnlineEndpointDeploymentResourceProperties 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(ManagedOnlineEndpointDeploymentResourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeManagedOnlineEndpointDeploymentResourceProperties(document.RootElement, options); - } - - internal static ManagedOnlineEndpointDeploymentResourceProperties DeserializeManagedOnlineEndpointDeploymentResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MachineLearningEndpointComputeType? endpointComputeType = default; - string model = default; - string failureReason = default; - DefaultResourceProvisioningState? provisioningState = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("endpointComputeType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpointComputeType = new MachineLearningEndpointComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("model"u8)) - { - model = property.Value.GetString(); - continue; - } - if (property.NameEquals("failureReason"u8)) - { - failureReason = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new DefaultResourceProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ManagedOnlineEndpointDeploymentResourceProperties( - failureReason, - provisioningState, - type, - serializedAdditionalRawData, - endpointComputeType, - model); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ManagedOnlineEndpointDeploymentResourceProperties)} does not support writing '{options.Format}' format."); - } - } - - ManagedOnlineEndpointDeploymentResourceProperties 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 DeserializeManagedOnlineEndpointDeploymentResourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ManagedOnlineEndpointDeploymentResourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineEndpointDeploymentResourceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineEndpointDeploymentResourceProperties.cs deleted file mode 100644 index 44f2699f74f92..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineEndpointDeploymentResourceProperties.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ManagedOnlineEndpointDeploymentResourceProperties. - public partial class ManagedOnlineEndpointDeploymentResourceProperties : EndpointDeploymentResourceProperties - { - /// Initializes a new instance of . - public ManagedOnlineEndpointDeploymentResourceProperties() - { - EndpointDeploymentResourcePropertiesType = "managedOnlineEndpoint"; - } - - /// Initializes a new instance of . - /// The failure reason if the creation failed. - /// Read-only provision state status property. - /// Kind of the deployment. - /// Keeps track of any properties unknown to the library. - /// Enum to determine endpoint compute type. - /// - internal ManagedOnlineEndpointDeploymentResourceProperties(string failureReason, DefaultResourceProvisioningState? provisioningState, string endpointDeploymentResourcePropertiesType, IDictionary serializedAdditionalRawData, MachineLearningEndpointComputeType? endpointComputeType, string model) : base(failureReason, provisioningState, endpointDeploymentResourcePropertiesType, serializedAdditionalRawData) - { - EndpointComputeType = endpointComputeType; - Model = model; - EndpointDeploymentResourcePropertiesType = endpointDeploymentResourcePropertiesType ?? "managedOnlineEndpoint"; - } - - /// Enum to determine endpoint compute type. - public MachineLearningEndpointComputeType? EndpointComputeType { get; set; } - /// Gets or sets the model. - public string Model { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineEndpointResourceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineEndpointResourceProperties.Serialization.cs deleted file mode 100644 index 630b2660c608f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineEndpointResourceProperties.Serialization.cs +++ /dev/null @@ -1,361 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ManagedOnlineEndpointResourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ManagedOnlineEndpointResourceProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(AuthMode)) - { - writer.WritePropertyName("authMode"u8); - writer.WriteStringValue(AuthMode.Value.ToString()); - } - if (Optional.IsDefined(Compute)) - { - writer.WritePropertyName("compute"u8); - writer.WriteStringValue(Compute); - } - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (Optional.IsCollectionDefined(MirrorTraffic)) - { - writer.WritePropertyName("mirrorTraffic"u8); - writer.WriteStartObject(); - foreach (var item in MirrorTraffic) - { - writer.WritePropertyName(item.Key); - writer.WriteNumberValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(ScoringUri)) - { - writer.WritePropertyName("scoringUri"u8); - writer.WriteStringValue(ScoringUri.AbsoluteUri); - } - if (Optional.IsCollectionDefined(Traffic)) - { - writer.WritePropertyName("traffic"u8); - writer.WriteStartObject(); - foreach (var item in Traffic) - { - writer.WritePropertyName(item.Key); - writer.WriteNumberValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(AssociatedResourceId)) - { - writer.WritePropertyName("associatedResourceId"u8); - writer.WriteStringValue(AssociatedResourceId); - } - if (Optional.IsCollectionDefined(Deployments)) - { - writer.WritePropertyName("deployments"u8); - writer.WriteStartArray(); - foreach (var item in Deployments) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (Optional.IsDefined(EndpointUri)) - { - writer.WritePropertyName("endpointUri"u8); - writer.WriteStringValue(EndpointUri.AbsoluteUri); - } - if (Optional.IsDefined(FailureReason)) - { - writer.WritePropertyName("failureReason"u8); - writer.WriteStringValue(FailureReason); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(ShouldCreateAiServicesEndpoint)) - { - writer.WritePropertyName("shouldCreateAiServicesEndpoint"u8); - writer.WriteBooleanValue(ShouldCreateAiServicesEndpoint.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 - } - } - writer.WriteEndObject(); - } - - ManagedOnlineEndpointResourceProperties 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(ManagedOnlineEndpointResourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeManagedOnlineEndpointResourceProperties(document.RootElement, options); - } - - internal static ManagedOnlineEndpointResourceProperties DeserializeManagedOnlineEndpointResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MachineLearningEndpointAuthMode? authMode = default; - string compute = default; - string description = default; - IDictionary mirrorTraffic = default; - Uri scoringUri = default; - IDictionary traffic = default; - ResourceIdentifier associatedResourceId = default; - IList deployments = default; - EndpointType endpointType = default; - Uri endpointUri = default; - string failureReason = default; - AzureLocation? location = default; - string name = default; - DefaultResourceProvisioningState? provisioningState = default; - bool? shouldCreateAiServicesEndpoint = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authMode = new MachineLearningEndpointAuthMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("compute"u8)) - { - compute = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("mirrorTraffic"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetInt32()); - } - mirrorTraffic = dictionary; - continue; - } - if (property.NameEquals("scoringUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scoringUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("traffic"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetInt32()); - } - traffic = dictionary; - continue; - } - if (property.NameEquals("associatedResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - associatedResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("deployments"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(item, options)); - } - deployments = array; - continue; - } - if (property.NameEquals("endpointType"u8)) - { - endpointType = new EndpointType(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpointUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpointUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("failureReason"u8)) - { - failureReason = property.Value.GetString(); - continue; - } - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new DefaultResourceProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("shouldCreateAiServicesEndpoint"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - shouldCreateAiServicesEndpoint = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ManagedOnlineEndpointResourceProperties( - associatedResourceId, - deployments ?? new ChangeTrackingList(), - endpointType, - endpointUri, - failureReason, - location, - name, - provisioningState, - shouldCreateAiServicesEndpoint, - serializedAdditionalRawData, - authMode, - compute, - description, - mirrorTraffic ?? new ChangeTrackingDictionary(), - scoringUri, - traffic ?? new ChangeTrackingDictionary()); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ManagedOnlineEndpointResourceProperties)} does not support writing '{options.Format}' format."); - } - } - - ManagedOnlineEndpointResourceProperties 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 DeserializeManagedOnlineEndpointResourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ManagedOnlineEndpointResourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineEndpointResourceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineEndpointResourceProperties.cs deleted file mode 100644 index c88617aa3005a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineEndpointResourceProperties.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ManagedOnlineEndpointResourceProperties. - public partial class ManagedOnlineEndpointResourceProperties : EndpointResourceProperties - { - /// Initializes a new instance of . - public ManagedOnlineEndpointResourceProperties() - { - MirrorTraffic = new ChangeTrackingDictionary(); - Traffic = new ChangeTrackingDictionary(); - EndpointType = EndpointType.ManagedOnlineEndpoint; - } - - /// Initializes a new instance of . - /// Byo resource id for creating the built-in model service endpoints. - /// Deployments info. - /// Type of the endpoint. - /// Uri of the endpoint. - /// The failure reason if the creation failed. - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace - /// - /// Name of the endpoint. - /// Read-only provision state status property. - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - /// Keeps track of any properties unknown to the library. - /// Enum to determine endpoint authentication mode. - /// - /// - /// Dictionary of <integer>. - /// - /// Dictionary of <integer>. - internal ManagedOnlineEndpointResourceProperties(ResourceIdentifier associatedResourceId, IList deployments, EndpointType endpointType, Uri endpointUri, string failureReason, AzureLocation? location, string name, DefaultResourceProvisioningState? provisioningState, bool? shouldCreateAiServicesEndpoint, IDictionary serializedAdditionalRawData, MachineLearningEndpointAuthMode? authMode, string compute, string description, IDictionary mirrorTraffic, Uri scoringUri, IDictionary traffic) : base(associatedResourceId, deployments, endpointType, endpointUri, failureReason, location, name, provisioningState, shouldCreateAiServicesEndpoint, serializedAdditionalRawData) - { - AuthMode = authMode; - Compute = compute; - Description = description; - MirrorTraffic = mirrorTraffic; - ScoringUri = scoringUri; - Traffic = traffic; - EndpointType = endpointType; - } - - /// Enum to determine endpoint authentication mode. - public MachineLearningEndpointAuthMode? AuthMode { get; set; } - /// Gets or sets the compute. - public string Compute { get; set; } - /// Gets or sets the description. - public string Description { get; set; } - /// Dictionary of <integer>. - public IDictionary MirrorTraffic { get; } - /// Gets or sets the scoring uri. - public Uri ScoringUri { get; set; } - /// Dictionary of <integer>. - public IDictionary Traffic { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedPERequirement.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedPERequirement.cs deleted file mode 100644 index bef855e02febb..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedPERequirement.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ManagedPERequirement. - public readonly partial struct ManagedPERequirement : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ManagedPERequirement(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string RequiredValue = "Required"; - private const string NotRequiredValue = "NotRequired"; - private const string NotApplicableValue = "NotApplicable"; - - /// Required. - public static ManagedPERequirement Required { get; } = new ManagedPERequirement(RequiredValue); - /// NotRequired. - public static ManagedPERequirement NotRequired { get; } = new ManagedPERequirement(NotRequiredValue); - /// NotApplicable. - public static ManagedPERequirement NotApplicable { get; } = new ManagedPERequirement(NotApplicableValue); - /// Determines if two values are the same. - public static bool operator ==(ManagedPERequirement left, ManagedPERequirement right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ManagedPERequirement left, ManagedPERequirement right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ManagedPERequirement(string value) => new ManagedPERequirement(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ManagedPERequirement other && Equals(other); - /// - public bool Equals(ManagedPERequirement 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedPEStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedPEStatus.cs deleted file mode 100644 index 0f093ab17e784..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedPEStatus.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ManagedPEStatus. - public readonly partial struct ManagedPEStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ManagedPEStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InactiveValue = "Inactive"; - private const string ActiveValue = "Active"; - private const string NotApplicableValue = "NotApplicable"; - - /// Inactive. - public static ManagedPEStatus Inactive { get; } = new ManagedPEStatus(InactiveValue); - /// Active. - public static ManagedPEStatus Active { get; } = new ManagedPEStatus(ActiveValue); - /// NotApplicable. - public static ManagedPEStatus NotApplicable { get; } = new ManagedPEStatus(NotApplicableValue); - /// Determines if two values are the same. - public static bool operator ==(ManagedPEStatus left, ManagedPEStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ManagedPEStatus left, ManagedPEStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ManagedPEStatus(string value) => new ManagedPEStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ManagedPEStatus other && Equals(other); - /// - public bool Equals(ManagedPEStatus 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedResourceGroupAssignedIdentities.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedResourceGroupAssignedIdentities.Serialization.cs deleted file mode 100644 index dca7b304c2e6d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedResourceGroupAssignedIdentities.Serialization.cs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ManagedResourceGroupAssignedIdentities : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ManagedResourceGroupAssignedIdentities)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(PrincipalId)) - { - writer.WritePropertyName("principalId"u8); - writer.WriteStringValue(PrincipalId.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 - } - } - writer.WriteEndObject(); - } - - ManagedResourceGroupAssignedIdentities 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(ManagedResourceGroupAssignedIdentities)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeManagedResourceGroupAssignedIdentities(document.RootElement, options); - } - - internal static ManagedResourceGroupAssignedIdentities DeserializeManagedResourceGroupAssignedIdentities(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Guid? principalId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("principalId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - principalId = property.Value.GetGuid(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ManagedResourceGroupAssignedIdentities(principalId, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ManagedResourceGroupAssignedIdentities)} does not support writing '{options.Format}' format."); - } - } - - ManagedResourceGroupAssignedIdentities 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 DeserializeManagedResourceGroupAssignedIdentities(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ManagedResourceGroupAssignedIdentities)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedResourceGroupAssignedIdentities.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedResourceGroupAssignedIdentities.cs deleted file mode 100644 index 1fd6356f43f09..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedResourceGroupAssignedIdentities.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Details for managed resource group assigned identities. - public partial class ManagedResourceGroupAssignedIdentities - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public ManagedResourceGroupAssignedIdentities() - { - } - - /// Initializes a new instance of . - /// Identity principal Id. - /// Keeps track of any properties unknown to the library. - internal ManagedResourceGroupAssignedIdentities(Guid? principalId, IDictionary serializedAdditionalRawData) - { - PrincipalId = principalId; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Identity principal Id. - public Guid? PrincipalId { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedResourceGroupSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedResourceGroupSettings.Serialization.cs deleted file mode 100644 index e5329dc0a8988..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedResourceGroupSettings.Serialization.cs +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class ManagedResourceGroupSettings : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ManagedResourceGroupSettings)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(AssignedIdentities)) - { - if (AssignedIdentities != null) - { - writer.WritePropertyName("assignedIdentities"u8); - writer.WriteStartArray(); - foreach (var item in AssignedIdentities) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("assignedIdentities"); - } - } - 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 - } - } - writer.WriteEndObject(); - } - - ManagedResourceGroupSettings 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(ManagedResourceGroupSettings)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeManagedResourceGroupSettings(document.RootElement, options); - } - - internal static ManagedResourceGroupSettings DeserializeManagedResourceGroupSettings(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList assignedIdentities = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("assignedIdentities"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - assignedIdentities = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ManagedResourceGroupAssignedIdentities.DeserializeManagedResourceGroupAssignedIdentities(item, options)); - } - assignedIdentities = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ManagedResourceGroupSettings(assignedIdentities ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ManagedResourceGroupSettings)} does not support writing '{options.Format}' format."); - } - } - - ManagedResourceGroupSettings 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 DeserializeManagedResourceGroupSettings(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ManagedResourceGroupSettings)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedResourceGroupSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedResourceGroupSettings.cs deleted file mode 100644 index 1bc7eb5ea3c0c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedResourceGroupSettings.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Managed resource group settings. - internal partial class ManagedResourceGroupSettings - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public ManagedResourceGroupSettings() - { - AssignedIdentities = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// List of assigned identities for the managed resource group. - /// Keeps track of any properties unknown to the library. - internal ManagedResourceGroupSettings(IList assignedIdentities, IDictionary serializedAdditionalRawData) - { - AssignedIdentities = assignedIdentities; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// List of assigned identities for the managed resource group. - public IList AssignedIdentities { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplacePlan.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplacePlan.Serialization.cs index d671d47cef500..859fac4a794fa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplacePlan.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplacePlan.Serialization.cs @@ -26,6 +26,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(PublisherId)) + { + if (PublisherId != null) + { + writer.WritePropertyName("publisherId"u8); + writer.WriteStringValue(PublisherId); + } + else + { + writer.WriteNull("publisherId"); + } + } if (options.Format != "W" && Optional.IsDefined(OfferId)) { if (OfferId != null) @@ -50,18 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteNull("planId"); } } - if (options.Format != "W" && Optional.IsDefined(PublisherId)) - { - if (PublisherId != null) - { - writer.WritePropertyName("publisherId"u8); - writer.WriteStringValue(PublisherId); - } - else - { - writer.WriteNull("publisherId"); - } - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -100,41 +100,41 @@ internal static MarketplacePlan DeserializeMarketplacePlan(JsonElement element, { return null; } + string publisherId = default; string offerId = default; string planId = default; - string publisherId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("offerId"u8)) + if (property.NameEquals("publisherId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - offerId = null; + publisherId = null; continue; } - offerId = property.Value.GetString(); + publisherId = property.Value.GetString(); continue; } - if (property.NameEquals("planId"u8)) + if (property.NameEquals("offerId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - planId = null; + offerId = null; continue; } - planId = property.Value.GetString(); + offerId = property.Value.GetString(); continue; } - if (property.NameEquals("publisherId"u8)) + if (property.NameEquals("planId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - publisherId = null; + planId = null; continue; } - publisherId = property.Value.GetString(); + planId = property.Value.GetString(); continue; } if (options.Format != "W") @@ -143,7 +143,7 @@ internal static MarketplacePlan DeserializeMarketplacePlan(JsonElement element, } } serializedAdditionalRawData = rawDataDictionary; - return new MarketplacePlan(offerId, planId, publisherId, serializedAdditionalRawData); + return new MarketplacePlan(publisherId, offerId, planId, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplacePlan.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplacePlan.cs index 803ecbcd277f4..7774ec4380b28 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplacePlan.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplacePlan.cs @@ -51,23 +51,23 @@ internal MarketplacePlan() } /// Initializes a new instance of . + /// The identifying name of the Publisher of the Marketplace Plan. /// The identifying name of the Offer of the Marketplace Plan. /// The identifying name of the Plan of the Marketplace Plan. - /// The identifying name of the Publisher of the Marketplace Plan. /// Keeps track of any properties unknown to the library. - internal MarketplacePlan(string offerId, string planId, string publisherId, IDictionary serializedAdditionalRawData) + internal MarketplacePlan(string publisherId, string offerId, string planId, IDictionary serializedAdditionalRawData) { + PublisherId = publisherId; OfferId = offerId; PlanId = planId; - PublisherId = publisherId; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The identifying name of the Publisher of the Marketplace Plan. + public string PublisherId { get; } /// The identifying name of the Offer of the Marketplace Plan. public string OfferId { get; } /// The identifying name of the Plan of the Marketplace Plan. public string PlanId { get; } - /// The identifying name of the Publisher of the Marketplace Plan. - public string PublisherId { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionProperties.Serialization.cs index 605767c0f678c..6c6079180f69e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionProperties.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); if (options.Format != "W" && Optional.IsDefined(MarketplacePlan)) { if (MarketplacePlan != null) @@ -43,8 +45,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("marketplaceSubscriptionStatus"u8); writer.WriteStringValue(MarketplaceSubscriptionStatus.Value.ToString()); } - writer.WritePropertyName("modelId"u8); - writer.WriteStringValue(ModelId); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -88,14 +88,19 @@ internal static MarketplaceSubscriptionProperties DeserializeMarketplaceSubscrip { return null; } + string modelId = default; MarketplacePlan marketplacePlan = default; MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default; - string modelId = default; MarketplaceSubscriptionProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("modelId"u8)) + { + modelId = property.Value.GetString(); + continue; + } if (property.NameEquals("marketplacePlan"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -115,11 +120,6 @@ internal static MarketplaceSubscriptionProperties DeserializeMarketplaceSubscrip marketplaceSubscriptionStatus = new MarketplaceSubscriptionStatus(property.Value.GetString()); continue; } - if (property.NameEquals("modelId"u8)) - { - modelId = property.Value.GetString(); - continue; - } if (property.NameEquals("provisioningState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -135,7 +135,7 @@ internal static MarketplaceSubscriptionProperties DeserializeMarketplaceSubscrip } } serializedAdditionalRawData = rawDataDictionary; - return new MarketplaceSubscriptionProperties(marketplacePlan, marketplaceSubscriptionStatus, modelId, provisioningState, serializedAdditionalRawData); + return new MarketplaceSubscriptionProperties(modelId, marketplacePlan, marketplaceSubscriptionStatus, provisioningState, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionProperties.cs index a952a9759fcee..98d60870f5048 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionProperties.cs @@ -56,16 +56,16 @@ public MarketplaceSubscriptionProperties(string modelId) } /// Initializes a new instance of . + /// [Required] Target Marketplace Model ID to create a Marketplace Subscription for. /// Marketplace Plan associated with the Marketplace Subscription. /// Current status of the Marketplace Subscription. - /// [Required] Target Marketplace Model ID to create a Marketplace Subscription for. /// Provisioning State of the Marketplace Subscription. /// Keeps track of any properties unknown to the library. - internal MarketplaceSubscriptionProperties(MarketplacePlan marketplacePlan, MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, string modelId, MarketplaceSubscriptionProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + internal MarketplaceSubscriptionProperties(string modelId, MarketplacePlan marketplacePlan, MarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, MarketplaceSubscriptionProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { + ModelId = modelId; MarketplacePlan = marketplacePlan; MarketplaceSubscriptionStatus = marketplaceSubscriptionStatus; - ModelId = modelId; ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -75,12 +75,12 @@ internal MarketplaceSubscriptionProperties() { } + /// [Required] Target Marketplace Model ID to create a Marketplace Subscription for. + public string ModelId { get; set; } /// Marketplace Plan associated with the Marketplace Subscription. public MarketplacePlan MarketplacePlan { get; } /// Current status of the Marketplace Subscription. public MarketplaceSubscriptionStatus? MarketplaceSubscriptionStatus { get; } - /// [Required] Target Marketplace Model ID to create a Marketplace Subscription for. - public string ModelId { get; set; } /// Provisioning State of the Marketplace Subscription. public MarketplaceSubscriptionProvisioningState? ProvisioningState { get; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionResourceArmPaginatedResult.Serialization.cs index 14a5efb3f6ae9..c912f79ca46b0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8Jso } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8Jso } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static MarketplaceSubscriptionResourceArmPaginatedResult DeserializeMar { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static MarketplaceSubscriptionResourceArmPaginatedResult DeserializeMar 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 MarketplaceSubscriptionResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new MarketplaceSubscriptionResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionResourceArmPaginatedResult.cs index 02e7b285f352d..ce030770c3f90 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MarketplaceSubscriptionResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal MarketplaceSubscriptionResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of MarketplaceSubscription objects. If null, there are no additional pages. /// An array of objects of type MarketplaceSubscription. + /// The link to the next page of MarketplaceSubscription objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal MarketplaceSubscriptionResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal MarketplaceSubscriptionResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of MarketplaceSubscription objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type MarketplaceSubscription. public IReadOnlyList Value { get; } + /// The link to the next page of MarketplaceSubscription objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.Serialization.cs index a7c096ffc9d9b..7107136405ef0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.Serialization.cs @@ -26,6 +26,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteStartObject(); + if (Optional.IsDefined(StoreType)) + { + writer.WritePropertyName("storeType"u8); + writer.WriteStringValue(StoreType.Value.ToString()); + } + if (Optional.IsDefined(Schedule)) + { + if (Schedule != null) + { + writer.WritePropertyName("schedule"u8); + writer.WriteObjectValue(Schedule, options); + } + else + { + writer.WriteNull("schedule"); + } + } if (Optional.IsDefined(Notification)) { if (Notification != null) @@ -50,18 +67,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNull("resource"); } } - if (Optional.IsDefined(Schedule)) - { - if (Schedule != null) - { - writer.WritePropertyName("schedule"u8); - writer.WriteObjectValue(Schedule, options); - } - else - { - writer.WriteNull("schedule"); - } - } if (Optional.IsCollectionDefined(SparkConfiguration)) { if (SparkConfiguration != null) @@ -80,11 +85,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNull("sparkConfiguration"); } } - if (Optional.IsDefined(StoreType)) - { - writer.WritePropertyName("storeType"u8); - writer.WriteStringValue(StoreType.Value.ToString()); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -123,43 +123,52 @@ internal static MaterializationSettings DeserializeMaterializationSettings(JsonE { return null; } + MaterializationStoreType? storeType = default; + MachineLearningRecurrenceTrigger schedule = default; NotificationSetting notification = default; MaterializationComputeResource resource = default; - MachineLearningRecurrenceTrigger schedule = default; IDictionary sparkConfiguration = default; - MaterializationStoreType? storeType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("notification"u8)) + if (property.NameEquals("storeType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - notification = null; continue; } - notification = NotificationSetting.DeserializeNotificationSetting(property.Value, options); + storeType = new MaterializationStoreType(property.Value.GetString()); continue; } - if (property.NameEquals("resource"u8)) + if (property.NameEquals("schedule"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - resource = null; + schedule = null; continue; } - resource = MaterializationComputeResource.DeserializeMaterializationComputeResource(property.Value, options); + schedule = MachineLearningRecurrenceTrigger.DeserializeMachineLearningRecurrenceTrigger(property.Value, options); continue; } - if (property.NameEquals("schedule"u8)) + if (property.NameEquals("notification"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - schedule = null; + notification = null; continue; } - schedule = MachineLearningRecurrenceTrigger.DeserializeMachineLearningRecurrenceTrigger(property.Value, options); + notification = NotificationSetting.DeserializeNotificationSetting(property.Value, options); + continue; + } + if (property.NameEquals("resource"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resource = null; + continue; + } + resource = MaterializationComputeResource.DeserializeMaterializationComputeResource(property.Value, options); continue; } if (property.NameEquals("sparkConfiguration"u8)) @@ -177,15 +186,6 @@ internal static MaterializationSettings DeserializeMaterializationSettings(JsonE sparkConfiguration = dictionary; continue; } - if (property.NameEquals("storeType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storeType = new MaterializationStoreType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -193,11 +193,11 @@ internal static MaterializationSettings DeserializeMaterializationSettings(JsonE } serializedAdditionalRawData = rawDataDictionary; return new MaterializationSettings( + storeType, + schedule, notification, resource, - schedule, sparkConfiguration ?? new ChangeTrackingDictionary(), - storeType, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.cs index e1d58ffba8103..fde2ca5b1e41b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MaterializationSettings.cs @@ -52,22 +52,26 @@ public MaterializationSettings() } /// Initializes a new instance of . + /// Specifies the stores to which materialization should happen. + /// Specifies the schedule details. /// Specifies the notification details. /// Specifies the compute resource settings. - /// Specifies the schedule details. /// Specifies the spark compute settings. - /// Specifies the stores to which materialization should happen. /// Keeps track of any properties unknown to the library. - internal MaterializationSettings(NotificationSetting notification, MaterializationComputeResource resource, MachineLearningRecurrenceTrigger schedule, IDictionary sparkConfiguration, MaterializationStoreType? storeType, IDictionary serializedAdditionalRawData) + internal MaterializationSettings(MaterializationStoreType? storeType, MachineLearningRecurrenceTrigger schedule, NotificationSetting notification, MaterializationComputeResource resource, IDictionary sparkConfiguration, IDictionary serializedAdditionalRawData) { + StoreType = storeType; + Schedule = schedule; Notification = notification; Resource = resource; - Schedule = schedule; SparkConfiguration = sparkConfiguration; - StoreType = storeType; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Specifies the stores to which materialization should happen. + public MaterializationStoreType? StoreType { get; set; } + /// Specifies the schedule details. + public MachineLearningRecurrenceTrigger Schedule { get; set; } /// Specifies the notification details. public NotificationSetting Notification { get; set; } /// Specifies the compute resource settings. @@ -84,11 +88,7 @@ public string ResourceInstanceType } } - /// Specifies the schedule details. - public MachineLearningRecurrenceTrigger Schedule { get; set; } /// Specifies the spark compute settings. public IDictionary SparkConfiguration { get; set; } - /// Specifies the stores to which materialization should happen. - public MaterializationStoreType? StoreType { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MedianStoppingPolicy.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MedianStoppingPolicy.Serialization.cs index 4c7b759ce554b..9522808299ac0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MedianStoppingPolicy.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MedianStoppingPolicy.Serialization.cs @@ -26,18 +26,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } writer.WriteStartObject(); - if (Optional.IsDefined(DelayEvaluation)) - { - writer.WritePropertyName("delayEvaluation"u8); - writer.WriteNumberValue(DelayEvaluation.Value); - } + writer.WritePropertyName("policyType"u8); + writer.WriteStringValue(PolicyType.ToString()); if (Optional.IsDefined(EvaluationInterval)) { writer.WritePropertyName("evaluationInterval"u8); writer.WriteNumberValue(EvaluationInterval.Value); } - writer.WritePropertyName("policyType"u8); - writer.WriteStringValue(PolicyType.ToString()); + if (Optional.IsDefined(DelayEvaluation)) + { + writer.WritePropertyName("delayEvaluation"u8); + writer.WriteNumberValue(DelayEvaluation.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -76,20 +76,16 @@ internal static MedianStoppingPolicy DeserializeMedianStoppingPolicy(JsonElement { return null; } - int? delayEvaluation = default; - int? evaluationInterval = default; EarlyTerminationPolicyType policyType = default; + int? evaluationInterval = default; + int? delayEvaluation = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("delayEvaluation"u8)) + if (property.NameEquals("policyType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - delayEvaluation = property.Value.GetInt32(); + policyType = new EarlyTerminationPolicyType(property.Value.GetString()); continue; } if (property.NameEquals("evaluationInterval"u8)) @@ -101,9 +97,13 @@ internal static MedianStoppingPolicy DeserializeMedianStoppingPolicy(JsonElement evaluationInterval = property.Value.GetInt32(); continue; } - if (property.NameEquals("policyType"u8)) + if (property.NameEquals("delayEvaluation"u8)) { - policyType = new EarlyTerminationPolicyType(property.Value.GetString()); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delayEvaluation = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -112,7 +112,7 @@ internal static MedianStoppingPolicy DeserializeMedianStoppingPolicy(JsonElement } } serializedAdditionalRawData = rawDataDictionary; - return new MedianStoppingPolicy(delayEvaluation, evaluationInterval, policyType, serializedAdditionalRawData); + return new MedianStoppingPolicy(policyType, evaluationInterval, delayEvaluation, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MedianStoppingPolicy.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MedianStoppingPolicy.cs index 002f0261ce90f..4bea779f66b6e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MedianStoppingPolicy.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MedianStoppingPolicy.cs @@ -20,11 +20,11 @@ public MedianStoppingPolicy() } /// Initializes a new instance of . - /// Number of intervals by which to delay the first evaluation. - /// Interval (number of runs) between policy evaluations. /// [Required] Name of policy configuration. + /// Interval (number of runs) between policy evaluations. + /// Number of intervals by which to delay the first evaluation. /// Keeps track of any properties unknown to the library. - internal MedianStoppingPolicy(int? delayEvaluation, int? evaluationInterval, EarlyTerminationPolicyType policyType, IDictionary serializedAdditionalRawData) : base(delayEvaluation, evaluationInterval, policyType, serializedAdditionalRawData) + internal MedianStoppingPolicy(EarlyTerminationPolicyType policyType, int? evaluationInterval, int? delayEvaluation, IDictionary serializedAdditionalRawData) : base(policyType, evaluationInterval, delayEvaluation, serializedAdditionalRawData) { PolicyType = policyType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerResourceArmPaginatedResult.Serialization.cs index c8ee7689980a6..e542cde8d2b98 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter w } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter w } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static ModelContainerResourceArmPaginatedResult DeserializeModelContain { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static ModelContainerResourceArmPaginatedResult DeserializeModelContain 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 ModelContainerResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new ModelContainerResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerResourceArmPaginatedResult.cs index 4403a0778f512..c1d45952c348a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal ModelContainerResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of ModelContainer objects. If null, there are no additional pages. /// An array of objects of type ModelContainer. + /// The link to the next page of ModelContainer objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal ModelContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal ModelContainerResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of ModelContainer objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type ModelContainer. public IReadOnlyList Value { get; } + /// The link to the next page of ModelContainer objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelLifecycleStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelLifecycleStatus.cs deleted file mode 100644 index 0b6a4651ccac4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelLifecycleStatus.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Model lifecycle status. - public readonly partial struct ModelLifecycleStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ModelLifecycleStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string GenerallyAvailableValue = "GenerallyAvailable"; - private const string PreviewValue = "Preview"; - - /// GenerallyAvailable. - public static ModelLifecycleStatus GenerallyAvailable { get; } = new ModelLifecycleStatus(GenerallyAvailableValue); - /// Preview. - public static ModelLifecycleStatus Preview { get; } = new ModelLifecycleStatus(PreviewValue); - /// Determines if two values are the same. - public static bool operator ==(ModelLifecycleStatus left, ModelLifecycleStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ModelLifecycleStatus left, ModelLifecycleStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ModelLifecycleStatus(string value) => new ModelLifecycleStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ModelLifecycleStatus other && Equals(other); - /// - public bool Equals(ModelLifecycleStatus 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelProvider.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelProvider.cs deleted file mode 100644 index abfac75efe61b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelProvider.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Enum to determine the type of fine tuning. - internal readonly partial struct ModelProvider : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ModelProvider(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AzureOpenAIValue = "AzureOpenAI"; - private const string CustomValue = "Custom"; - - /// Fine tuning using Azure Open AI model. - public static ModelProvider AzureOpenAI { get; } = new ModelProvider(AzureOpenAIValue); - /// Fine tuning using custom model. - public static ModelProvider Custom { get; } = new ModelProvider(CustomValue); - /// Determines if two values are the same. - public static bool operator ==(ModelProvider left, ModelProvider right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ModelProvider left, ModelProvider right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ModelProvider(string value) => new ModelProvider(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ModelProvider other && Equals(other); - /// - public bool Equals(ModelProvider 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionResourceArmPaginatedResult.Serialization.cs index 773bc76c9baac..da587a12905ac 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter wri } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter wri } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static ModelVersionResourceArmPaginatedResult DeserializeModelVersionRe { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static ModelVersionResourceArmPaginatedResult DeserializeModelVersionRe 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 ModelVersionResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new ModelVersionResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionResourceArmPaginatedResult.cs index fac91823d5f84..8214bc6e521e6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal ModelVersionResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of ModelVersion objects. If null, there are no additional pages. /// An array of objects of type ModelVersion. + /// The link to the next page of ModelVersion objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal ModelVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal ModelVersionResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of ModelVersion objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type ModelVersion. public IReadOnlyList Value { get; } + /// The link to the next page of ModelVersion objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.Serialization.cs index 47e16cbcab878..aead0b6b7fd09 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.Serialization.cs @@ -26,20 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite } writer.WriteStartObject(); - if (Optional.IsDefined(AlertNotificationSettings)) - { - if (AlertNotificationSettings != null) - { - writer.WritePropertyName("alertNotificationSettings"u8); - writer.WriteObjectValue(AlertNotificationSettings, options); - } - else - { - writer.WriteNull("alertNotificationSettings"); - } - } - writer.WritePropertyName("computeConfiguration"u8); - writer.WriteObjectValue(ComputeConfiguration, options); if (Optional.IsDefined(MonitoringTarget)) { if (MonitoringTarget != null) @@ -60,6 +46,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WriteObjectValue(item.Value, options); } writer.WriteEndObject(); + writer.WritePropertyName("computeConfiguration"u8); + writer.WriteObjectValue(ComputeConfiguration, options); + if (Optional.IsDefined(AlertNotificationSettings)) + { + if (AlertNotificationSettings != null) + { + writer.WritePropertyName("alertNotificationSettings"u8); + writer.WriteObjectValue(AlertNotificationSettings, options); + } + else + { + writer.WriteNull("alertNotificationSettings"); + } + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -98,29 +98,14 @@ internal static MonitorDefinition DeserializeMonitorDefinition(JsonElement eleme { return null; } - MonitorNotificationSettings alertNotificationSettings = default; - MonitorComputeConfigurationBase computeConfiguration = default; MonitoringTarget monitoringTarget = default; IDictionary signals = default; + MonitorComputeConfigurationBase computeConfiguration = default; + MonitorNotificationSettings alertNotificationSettings = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("alertNotificationSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - alertNotificationSettings = null; - continue; - } - alertNotificationSettings = MonitorNotificationSettings.DeserializeMonitorNotificationSettings(property.Value, options); - continue; - } - if (property.NameEquals("computeConfiguration"u8)) - { - computeConfiguration = MonitorComputeConfigurationBase.DeserializeMonitorComputeConfigurationBase(property.Value, options); - continue; - } if (property.NameEquals("monitoringTarget"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -141,13 +126,28 @@ internal static MonitorDefinition DeserializeMonitorDefinition(JsonElement eleme signals = dictionary; continue; } + if (property.NameEquals("computeConfiguration"u8)) + { + computeConfiguration = MonitorComputeConfigurationBase.DeserializeMonitorComputeConfigurationBase(property.Value, options); + continue; + } + if (property.NameEquals("alertNotificationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + alertNotificationSettings = null; + continue; + } + alertNotificationSettings = MonitorNotificationSettings.DeserializeMonitorNotificationSettings(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new MonitorDefinition(alertNotificationSettings, computeConfiguration, monitoringTarget, signals, serializedAdditionalRawData); + return new MonitorDefinition(monitoringTarget, signals, computeConfiguration, alertNotificationSettings, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.cs index a5950dac2b15e..692d7cae992ca 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitorDefinition.cs @@ -46,46 +46,46 @@ public partial class MonitorDefinition private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// [Required] The ARM resource ID of the compute resource to run the monitoring job on. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// /// /// [Required] The signals to monitor. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , and . /// - /// or is null. - public MonitorDefinition(MonitorComputeConfigurationBase computeConfiguration, IDictionary signals) + /// + /// [Required] The ARM resource ID of the compute resource to run the monitoring job on. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// or is null. + public MonitorDefinition(IDictionary signals, MonitorComputeConfigurationBase computeConfiguration) { - Argument.AssertNotNull(computeConfiguration, nameof(computeConfiguration)); Argument.AssertNotNull(signals, nameof(signals)); + Argument.AssertNotNull(computeConfiguration, nameof(computeConfiguration)); - ComputeConfiguration = computeConfiguration; Signals = signals; + ComputeConfiguration = computeConfiguration; } /// Initializes a new instance of . - /// The monitor's notification settings. - /// - /// [Required] The ARM resource ID of the compute resource to run the monitoring job on. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// /// The entities targeted by the monitor. /// /// [Required] The signals to monitor. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , and . /// + /// + /// [Required] The ARM resource ID of the compute resource to run the monitoring job on. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// The monitor's notification settings. /// Keeps track of any properties unknown to the library. - internal MonitorDefinition(MonitorNotificationSettings alertNotificationSettings, MonitorComputeConfigurationBase computeConfiguration, MonitoringTarget monitoringTarget, IDictionary signals, IDictionary serializedAdditionalRawData) + internal MonitorDefinition(MonitoringTarget monitoringTarget, IDictionary signals, MonitorComputeConfigurationBase computeConfiguration, MonitorNotificationSettings alertNotificationSettings, IDictionary serializedAdditionalRawData) { - AlertNotificationSettings = alertNotificationSettings; - ComputeConfiguration = computeConfiguration; MonitoringTarget = monitoringTarget; Signals = signals; + ComputeConfiguration = computeConfiguration; + AlertNotificationSettings = alertNotificationSettings; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -94,6 +94,20 @@ internal MonitorDefinition() { } + /// The entities targeted by the monitor. + public MonitoringTarget MonitoringTarget { get; set; } + /// + /// [Required] The signals to monitor. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , , and . + /// + public IDictionary Signals { get; } + /// + /// [Required] The ARM resource ID of the compute resource to run the monitoring job on. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public MonitorComputeConfigurationBase ComputeConfiguration { get; set; } /// The monitor's notification settings. internal MonitorNotificationSettings AlertNotificationSettings { get; set; } /// The email recipient list which has a limitation of 499 characters in total. @@ -107,20 +121,5 @@ public IList Emails AlertNotificationSettings.Emails = value; } } - - /// - /// [Required] The ARM resource ID of the compute resource to run the monitoring job on. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - public MonitorComputeConfigurationBase ComputeConfiguration { get; set; } - /// The entities targeted by the monitor. - public MonitoringTarget MonitoringTarget { get; set; } - /// - /// [Required] The signals to monitor. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , and . - /// - public IDictionary Signals { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.Serialization.cs index 2676753525453..e6b12d6812b6b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.Serialization.cs @@ -26,6 +26,24 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteStartObject(); + writer.WritePropertyName("inputDataType"u8); + writer.WriteStringValue(InputDataType.ToString()); + if (Optional.IsDefined(DataContext)) + { + if (DataContext != null) + { + writer.WritePropertyName("dataContext"u8); + writer.WriteStringValue(DataContext); + } + else + { + writer.WriteNull("dataContext"); + } + } + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); if (Optional.IsCollectionDefined(Columns)) { if (Columns != null) @@ -44,24 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNull("columns"); } } - if (Optional.IsDefined(DataContext)) - { - if (DataContext != null) - { - writer.WritePropertyName("dataContext"u8); - writer.WriteStringValue(DataContext); - } - else - { - writer.WriteNull("dataContext"); - } - } - writer.WritePropertyName("inputDataType"u8); - writer.WriteStringValue(InputDataType.ToString()); - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.cs index cc188c85d1a11..f022ad46008ca 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringInputDataBase.cs @@ -57,25 +57,25 @@ protected MonitoringInputDataBase(JobInputType jobInputType, Uri uri) { Argument.AssertNotNull(uri, nameof(uri)); - Columns = new ChangeTrackingDictionary(); JobInputType = jobInputType; Uri = uri; + Columns = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// Mapping of column names to special uses. - /// The context metadata of the data source. /// [Required] Specifies the type of signal to monitor. + /// The context metadata of the data source. /// [Required] Specifies the type of job. /// [Required] Input Asset URI. + /// Mapping of column names to special uses. /// Keeps track of any properties unknown to the library. - internal MonitoringInputDataBase(IDictionary columns, string dataContext, MonitoringInputDataType inputDataType, JobInputType jobInputType, Uri uri, IDictionary serializedAdditionalRawData) + internal MonitoringInputDataBase(MonitoringInputDataType inputDataType, string dataContext, JobInputType jobInputType, Uri uri, IDictionary columns, IDictionary serializedAdditionalRawData) { - Columns = columns; - DataContext = dataContext; InputDataType = inputDataType; + DataContext = dataContext; JobInputType = jobInputType; Uri = uri; + Columns = columns; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -84,15 +84,15 @@ internal MonitoringInputDataBase() { } - /// Mapping of column names to special uses. - public IDictionary Columns { get; set; } - /// The context metadata of the data source. - public string DataContext { get; set; } /// [Required] Specifies the type of signal to monitor. internal MonitoringInputDataType InputDataType { get; set; } + /// The context metadata of the data source. + public string DataContext { get; set; } /// [Required] Specifies the type of job. public JobInputType JobInputType { get; set; } /// [Required] Input Asset URI. public Uri Uri { get; set; } + /// Mapping of column names to special uses. + public IDictionary Columns { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.Serialization.cs index 5ff5888a2ac6f..59c35500e196c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } writer.WriteStartObject(); + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); if (Optional.IsCollectionDefined(NotificationTypes)) { if (NotificationTypes != null) @@ -61,8 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("properties"); } } - writer.WritePropertyName("signalType"u8); - writer.WriteStringValue(SignalType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.cs index 2aeb6c39497d1..a07a176e6651b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringSignalBase.cs @@ -56,23 +56,23 @@ protected MonitoringSignalBase() } /// Initializes a new instance of . + /// [Required] Specifies the type of signal to monitor. /// The current notification mode for this signal. /// Property dictionary. Properties can be added, but not removed or altered. - /// [Required] Specifies the type of signal to monitor. /// Keeps track of any properties unknown to the library. - internal MonitoringSignalBase(IList notificationTypes, IDictionary properties, MonitoringSignalType signalType, IDictionary serializedAdditionalRawData) + internal MonitoringSignalBase(MonitoringSignalType signalType, IList notificationTypes, IDictionary properties, IDictionary serializedAdditionalRawData) { + SignalType = signalType; NotificationTypes = notificationTypes; Properties = properties; - SignalType = signalType; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// [Required] Specifies the type of signal to monitor. + internal MonitoringSignalType SignalType { get; set; } /// The current notification mode for this signal. public IList NotificationTypes { get; set; } /// Property dictionary. Properties can be added, but not removed or altered. public IDictionary Properties { get; set; } - /// [Required] Specifies the type of signal to monitor. - internal MonitoringSignalType SignalType { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.Serialization.cs index da68f2681d7ac..5d5dd35fd58fe 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.Serialization.cs @@ -26,28 +26,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } writer.WriteStartObject(); - if (Optional.IsDefined(DeploymentId)) + if (Optional.IsDefined(ModelId)) { - if (DeploymentId != null) + if (ModelId != null) { - writer.WritePropertyName("deploymentId"u8); - writer.WriteStringValue(DeploymentId); + writer.WritePropertyName("modelId"u8); + writer.WriteStringValue(ModelId); } else { - writer.WriteNull("deploymentId"); + writer.WriteNull("modelId"); } } - if (Optional.IsDefined(ModelId)) + if (Optional.IsDefined(DeploymentId)) { - if (ModelId != null) + if (DeploymentId != null) { - writer.WritePropertyName("modelId"u8); - writer.WriteStringValue(ModelId); + writer.WritePropertyName("deploymentId"u8); + writer.WriteStringValue(DeploymentId); } else { - writer.WriteNull("modelId"); + writer.WriteNull("deploymentId"); } } writer.WritePropertyName("taskType"u8); @@ -90,31 +90,31 @@ internal static MonitoringTarget DeserializeMonitoringTarget(JsonElement element { return null; } - string deploymentId = default; string modelId = default; + string deploymentId = default; ModelTaskType taskType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("deploymentId"u8)) + if (property.NameEquals("modelId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - deploymentId = null; + modelId = null; continue; } - deploymentId = property.Value.GetString(); + modelId = property.Value.GetString(); continue; } - if (property.NameEquals("modelId"u8)) + if (property.NameEquals("deploymentId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - modelId = null; + deploymentId = null; continue; } - modelId = property.Value.GetString(); + deploymentId = property.Value.GetString(); continue; } if (property.NameEquals("taskType"u8)) @@ -128,7 +128,7 @@ internal static MonitoringTarget DeserializeMonitoringTarget(JsonElement element } } serializedAdditionalRawData = rawDataDictionary; - return new MonitoringTarget(deploymentId, modelId, taskType, serializedAdditionalRawData); + return new MonitoringTarget(modelId, deploymentId, taskType, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.cs index 22420b15967f5..695c09a8d3081 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MonitoringTarget.cs @@ -53,14 +53,14 @@ public MonitoringTarget(ModelTaskType taskType) } /// Initializes a new instance of . - /// Reference to the deployment asset targeted by this monitor. /// Reference to the model asset targeted by this monitor. + /// Reference to the deployment asset targeted by this monitor. /// [Required] The machine learning task type of the monitored model. /// Keeps track of any properties unknown to the library. - internal MonitoringTarget(string deploymentId, string modelId, ModelTaskType taskType, IDictionary serializedAdditionalRawData) + internal MonitoringTarget(string modelId, string deploymentId, ModelTaskType taskType, IDictionary serializedAdditionalRawData) { - DeploymentId = deploymentId; ModelId = modelId; + DeploymentId = deploymentId; TaskType = taskType; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -70,10 +70,10 @@ internal MonitoringTarget() { } - /// Reference to the deployment asset targeted by this monitor. - public string DeploymentId { get; set; } /// Reference to the model asset targeted by this monitor. public string ModelId { get; set; } + /// Reference to the deployment asset targeted by this monitor. + public string DeploymentId { get; set; } /// [Required] The machine learning task type of the monitored model. public ModelTaskType TaskType { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountBindOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountBindOptions.cs index 8e01b0367d5a8..2ce804f732c0f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountBindOptions.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountBindOptions.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The MountBindOptions. + /// Describes the bind options for the container. public partial class MountBindOptions { /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountMode.cs deleted file mode 100644 index 7ddf80dfea74a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountMode.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Mount Mode. - public readonly partial struct MountMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MountMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ReadOnlyValue = "ReadOnly"; - private const string ReadWriteValue = "ReadWrite"; - - /// ReadOnly. - public static MountMode ReadOnly { get; } = new MountMode(ReadOnlyValue); - /// ReadWrite. - public static MountMode ReadWrite { get; } = new MountMode(ReadWriteValue); - /// Determines if two values are the same. - public static bool operator ==(MountMode left, MountMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MountMode left, MountMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MountMode(string value) => new MountMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MountMode other && Equals(other); - /// - public bool Equals(MountMode 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.Serialization.cs index 8cc83bff03bc9..ac9d21dd77293 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.Serialization.cs @@ -26,20 +26,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } writer.WriteStartObject(); - if (Optional.IsDefined(MaxConcurrentTrials)) + if (Optional.IsDefined(Timeout)) { - writer.WritePropertyName("maxConcurrentTrials"u8); - writer.WriteNumberValue(MaxConcurrentTrials.Value); + writer.WritePropertyName("timeout"u8); + writer.WriteStringValue(Timeout.Value, "P"); } if (Optional.IsDefined(MaxTrials)) { writer.WritePropertyName("maxTrials"u8); writer.WriteNumberValue(MaxTrials.Value); } - if (Optional.IsDefined(Timeout)) + if (Optional.IsDefined(MaxConcurrentTrials)) { - writer.WritePropertyName("timeout"u8); - writer.WriteStringValue(Timeout.Value, "P"); + writer.WritePropertyName("maxConcurrentTrials"u8); + writer.WriteNumberValue(MaxConcurrentTrials.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -79,20 +79,20 @@ internal static NlpVerticalLimitSettings DeserializeNlpVerticalLimitSettings(Jso { return null; } - int? maxConcurrentTrials = default; - int? maxTrials = default; TimeSpan? timeout = default; + int? maxTrials = default; + int? maxConcurrentTrials = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("maxConcurrentTrials"u8)) + if (property.NameEquals("timeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - maxConcurrentTrials = property.Value.GetInt32(); + timeout = property.Value.GetTimeSpan("P"); continue; } if (property.NameEquals("maxTrials"u8)) @@ -104,13 +104,13 @@ internal static NlpVerticalLimitSettings DeserializeNlpVerticalLimitSettings(Jso maxTrials = property.Value.GetInt32(); continue; } - if (property.NameEquals("timeout"u8)) + if (property.NameEquals("maxConcurrentTrials"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - timeout = property.Value.GetTimeSpan("P"); + maxConcurrentTrials = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -119,7 +119,7 @@ internal static NlpVerticalLimitSettings DeserializeNlpVerticalLimitSettings(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new NlpVerticalLimitSettings(maxConcurrentTrials, maxTrials, timeout, serializedAdditionalRawData); + return new NlpVerticalLimitSettings(timeout, maxTrials, maxConcurrentTrials, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.cs index 6b5393c274eb3..1859d033df4f4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.cs @@ -51,23 +51,23 @@ public NlpVerticalLimitSettings() } /// Initializes a new instance of . - /// Maximum Concurrent AutoML iterations. - /// Number of AutoML iterations. /// AutoML job timeout. + /// Number of AutoML iterations. + /// Maximum Concurrent AutoML iterations. /// Keeps track of any properties unknown to the library. - internal NlpVerticalLimitSettings(int? maxConcurrentTrials, int? maxTrials, TimeSpan? timeout, IDictionary serializedAdditionalRawData) + internal NlpVerticalLimitSettings(TimeSpan? timeout, int? maxTrials, int? maxConcurrentTrials, IDictionary serializedAdditionalRawData) { - MaxConcurrentTrials = maxConcurrentTrials; - MaxTrials = maxTrials; Timeout = timeout; + MaxTrials = maxTrials; + MaxConcurrentTrials = maxConcurrentTrials; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Maximum Concurrent AutoML iterations. - public int? MaxConcurrentTrials { get; set; } - /// Number of AutoML iterations. - public int? MaxTrials { get; set; } /// AutoML job timeout. public TimeSpan? Timeout { get; set; } + /// Number of AutoML iterations. + public int? MaxTrials { get; set; } + /// Maximum Concurrent AutoML iterations. + public int? MaxConcurrentTrials { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.Serialization.cs index b654a1c92a8c4..5e9a09abe90e9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.Serialization.cs @@ -26,38 +26,38 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteStartObject(); - if (Optional.IsCollectionDefined(EmailOn)) + if (Optional.IsCollectionDefined(Emails)) { - if (EmailOn != null) + if (Emails != null) { - writer.WritePropertyName("emailOn"u8); + writer.WritePropertyName("emails"u8); writer.WriteStartArray(); - foreach (var item in EmailOn) + foreach (var item in Emails) { - writer.WriteStringValue(item.ToString()); + writer.WriteStringValue(item); } writer.WriteEndArray(); } else { - writer.WriteNull("emailOn"); + writer.WriteNull("emails"); } } - if (Optional.IsCollectionDefined(Emails)) + if (Optional.IsCollectionDefined(EmailOn)) { - if (Emails != null) + if (EmailOn != null) { - writer.WritePropertyName("emails"u8); + writer.WritePropertyName("emailOn"u8); writer.WriteStartArray(); - foreach (var item in Emails) + foreach (var item in EmailOn) { - writer.WriteStringValue(item); + writer.WriteStringValue(item.ToString()); } writer.WriteEndArray(); } else { - writer.WriteNull("emails"); + writer.WriteNull("emailOn"); } } if (Optional.IsCollectionDefined(Webhooks)) @@ -116,41 +116,41 @@ internal static NotificationSetting DeserializeNotificationSetting(JsonElement e { return null; } - IList emailOn = default; IList emails = default; + IList emailOn = default; IDictionary webhooks = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("emailOn"u8)) + if (property.NameEquals("emails"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - emailOn = null; + emails = null; continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(new EmailNotificationEnableType(item.GetString())); + array.Add(item.GetString()); } - emailOn = array; + emails = array; continue; } - if (property.NameEquals("emails"u8)) + if (property.NameEquals("emailOn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - emails = null; + emailOn = null; continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(item.GetString()); + array.Add(new EmailNotificationEnableType(item.GetString())); } - emails = array; + emailOn = array; continue; } if (property.NameEquals("webhooks"u8)) @@ -174,7 +174,7 @@ internal static NotificationSetting DeserializeNotificationSetting(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new NotificationSetting(emailOn ?? new ChangeTrackingList(), emails ?? new ChangeTrackingList(), webhooks ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new NotificationSetting(emails ?? new ChangeTrackingList(), emailOn ?? new ChangeTrackingList(), webhooks ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.cs index c17d89e4fc3c1..31b29e2687351 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotificationSetting.cs @@ -48,32 +48,32 @@ public partial class NotificationSetting /// Initializes a new instance of . public NotificationSetting() { - EmailOn = new ChangeTrackingList(); Emails = new ChangeTrackingList(); + EmailOn = new ChangeTrackingList(); Webhooks = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// Send email notification to user on specified notification type. /// This is the email recipient list which has a limitation of 499 characters in total concat with comma separator. + /// Send email notification to user on specified notification type. /// /// Send webhook callback to a service. Key is a user-provided name for the webhook. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include . /// /// Keeps track of any properties unknown to the library. - internal NotificationSetting(IList emailOn, IList emails, IDictionary webhooks, IDictionary serializedAdditionalRawData) + internal NotificationSetting(IList emails, IList emailOn, IDictionary webhooks, IDictionary serializedAdditionalRawData) { - EmailOn = emailOn; Emails = emails; + EmailOn = emailOn; Webhooks = webhooks; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Send email notification to user on specified notification type. - public IList EmailOn { get; set; } /// This is the email recipient list which has a limitation of 499 characters in total concat with comma separator. public IList Emails { get; set; } + /// Send email notification to user on specified notification type. + public IList EmailOn { get; set; } /// /// Send webhook callback to a service. Key is a user-provided name for the webhook. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OAuth2AuthTypeWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OAuth2AuthTypeWorkspaceConnectionProperties.Serialization.cs index fc82e1b98c278..8e7f899464352 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OAuth2AuthTypeWorkspaceConnectionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OAuth2AuthTypeWorkspaceConnectionProperties.Serialization.cs @@ -43,11 +43,6 @@ void IJsonModel.Write(Utf8JsonWrite writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -63,6 +58,11 @@ void IJsonModel.Write(Utf8JsonWrite writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -74,16 +74,6 @@ void IJsonModel.Write(Utf8JsonWrite } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -94,15 +84,15 @@ void IJsonModel.Write(Utf8JsonWrite } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -146,16 +136,14 @@ internal static OAuth2AuthTypeWorkspaceConnectionProperties DeserializeOAuth2Aut MachineLearningConnectionAuthType authType = default; MachineLearningConnectionCategory? category = default; ResourceIdentifier createdByWorkspaceArmId = default; - string error = default; DateTimeOffset? expiryTime = default; ConnectionGroup? group = default; bool? isSharedToAll = default; + string target = default; IDictionary metadata = default; - ManagedPERequirement? peRequirement = default; - ManagedPEStatus? peStatus = default; IList sharedUserList = default; - string target = default; - bool? useWorkspaceManagedIdentity = default; + string value = default; + MachineLearningValueFormat? valueFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -192,11 +180,6 @@ internal static OAuth2AuthTypeWorkspaceConnectionProperties DeserializeOAuth2Aut createdByWorkspaceArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } if (property.NameEquals("expiryTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,6 +207,11 @@ internal static OAuth2AuthTypeWorkspaceConnectionProperties DeserializeOAuth2Aut isSharedToAll = property.Value.GetBoolean(); continue; } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -238,24 +226,6 @@ internal static OAuth2AuthTypeWorkspaceConnectionProperties DeserializeOAuth2Aut metadata = dictionary; continue; } - if (property.NameEquals("peRequirement"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peRequirement = new ManagedPERequirement(property.Value.GetString()); - continue; - } - if (property.NameEquals("peStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peStatus = new ManagedPEStatus(property.Value.GetString()); - continue; - } if (property.NameEquals("sharedUserList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -270,18 +240,18 @@ internal static OAuth2AuthTypeWorkspaceConnectionProperties DeserializeOAuth2Aut sharedUserList = array; continue; } - if (property.NameEquals("target"u8)) + if (property.NameEquals("value"u8)) { - target = property.Value.GetString(); + value = property.Value.GetString(); continue; } - if (property.NameEquals("useWorkspaceManagedIdentity"u8)) + if (property.NameEquals("valueFormat"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - useWorkspaceManagedIdentity = property.Value.GetBoolean(); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } if (options.Format != "W") @@ -294,16 +264,14 @@ internal static OAuth2AuthTypeWorkspaceConnectionProperties DeserializeOAuth2Aut authType, category, createdByWorkspaceArmId, - error, expiryTime, group, isSharedToAll, + target, metadata ?? new ChangeTrackingDictionary(), - peRequirement, - peStatus, sharedUserList ?? new ChangeTrackingList(), - target, - useWorkspaceManagedIdentity, + value, + valueFormat, serializedAdditionalRawData, credentials); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OAuth2AuthTypeWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OAuth2AuthTypeWorkspaceConnectionProperties.cs index 7385aab9bbac3..c9e4df458c528 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OAuth2AuthTypeWorkspaceConnectionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OAuth2AuthTypeWorkspaceConnectionProperties.cs @@ -24,22 +24,20 @@ public OAuth2AuthTypeWorkspaceConnectionProperties() /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. /// /// ClientId and ClientSecret are required. Other properties are optional /// depending on each OAuth2 provider's implementation. /// - internal OAuth2AuthTypeWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData, WorkspaceConnectionOAuth2 credentials) : base(authType, category, createdByWorkspaceArmId, error, expiryOn, group, isSharedToAll, metadata, peRequirement, peStatus, sharedUserList, target, useWorkspaceManagedIdentity, serializedAdditionalRawData) + internal OAuth2AuthTypeWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData, WorkspaceConnectionOAuth2 credentials) : base(authType, category, createdByWorkspaceArmId, expiryOn, group, isSharedToAll, target, metadata, sharedUserList, value, valueFormat, serializedAdditionalRawData) { Credentials = credentials; AuthType = authType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OSPatchingStatus.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OSPatchingStatus.Serialization.cs deleted file mode 100644 index dcc3aef7e0d98..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OSPatchingStatus.Serialization.cs +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class OSPatchingStatus : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(OSPatchingStatus)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(PatchStatus)) - { - writer.WritePropertyName("patchStatus"u8); - writer.WriteStringValue(PatchStatus.Value.ToString()); - } - if (Optional.IsDefined(LatestPatchOn)) - { - writer.WritePropertyName("latestPatchTime"u8); - writer.WriteStringValue(LatestPatchOn.Value, "O"); - } - if (Optional.IsDefined(RebootPending)) - { - writer.WritePropertyName("rebootPending"u8); - writer.WriteBooleanValue(RebootPending.Value); - } - if (Optional.IsDefined(ScheduledRebootOn)) - { - writer.WritePropertyName("scheduledRebootTime"u8); - writer.WriteStringValue(ScheduledRebootOn.Value, "O"); - } - if (Optional.IsCollectionDefined(OSPatchingErrors)) - { - if (OSPatchingErrors != null) - { - writer.WritePropertyName("osPatchingErrors"u8); - writer.WriteStartArray(); - foreach (var item in OSPatchingErrors) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("osPatchingErrors"); - } - } - 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 - } - } - writer.WriteEndObject(); - } - - OSPatchingStatus 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(OSPatchingStatus)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOSPatchingStatus(document.RootElement, options); - } - - internal static OSPatchingStatus DeserializeOSPatchingStatus(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - PatchStatus? patchStatus = default; - DateTimeOffset? latestPatchTime = default; - bool? rebootPending = default; - DateTimeOffset? scheduledRebootTime = default; - IReadOnlyList osPatchingErrors = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("patchStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - patchStatus = new PatchStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("latestPatchTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - latestPatchTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("rebootPending"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rebootPending = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("scheduledRebootTime"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scheduledRebootTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("osPatchingErrors"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - osPatchingErrors = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MachineLearningError.DeserializeMachineLearningError(item, options)); - } - osPatchingErrors = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new OSPatchingStatus( - patchStatus, - latestPatchTime, - rebootPending, - scheduledRebootTime, - osPatchingErrors ?? new ChangeTrackingList(), - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(OSPatchingStatus)} does not support writing '{options.Format}' format."); - } - } - - OSPatchingStatus 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 DeserializeOSPatchingStatus(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OSPatchingStatus)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OSPatchingStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OSPatchingStatus.cs deleted file mode 100644 index 5f9f0d128b84b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OSPatchingStatus.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Returns metadata about the os patching. - public partial class OSPatchingStatus - { - /// - /// 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 OSPatchingStatus() - { - OSPatchingErrors = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The os patching status. - /// Time of the latest os patching. - /// Specifies whether this compute instance is pending for reboot to finish os patching. - /// Time of scheduled reboot. - /// Collection of errors encountered when doing os patching. - /// Keeps track of any properties unknown to the library. - internal OSPatchingStatus(PatchStatus? patchStatus, DateTimeOffset? latestPatchOn, bool? rebootPending, DateTimeOffset? scheduledRebootOn, IReadOnlyList osPatchingErrors, IDictionary serializedAdditionalRawData) - { - PatchStatus = patchStatus; - LatestPatchOn = latestPatchOn; - RebootPending = rebootPending; - ScheduledRebootOn = scheduledRebootOn; - OSPatchingErrors = osPatchingErrors; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The os patching status. - public PatchStatus? PatchStatus { get; } - /// Time of the latest os patching. - public DateTimeOffset? LatestPatchOn { get; } - /// Specifies whether this compute instance is pending for reboot to finish os patching. - public bool? RebootPending { get; } - /// Time of scheduled reboot. - public DateTimeOffset? ScheduledRebootOn { get; } - /// Collection of errors encountered when doing os patching. - public IReadOnlyList OSPatchingErrors { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.Serialization.cs index 3d4840bb3c7f5..e5cf9fe511a43 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.Serialization.cs @@ -26,10 +26,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } writer.WriteStartObject(); - writer.WritePropertyName("artifactName"u8); - writer.WriteStringValue(ArtifactName); writer.WritePropertyName("artifactType"u8); writer.WriteStringValue(ArtifactType.ToString()); + writer.WritePropertyName("artifactName"u8); + writer.WriteStringValue(ArtifactName); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.cs index 2708b030cb560..7566fd7e696c9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeArtifact.cs @@ -60,13 +60,13 @@ protected OneLakeArtifact(string artifactName) } /// Initializes a new instance of . - /// [Required] OneLake artifact name. /// [Required] OneLake artifact type. + /// [Required] OneLake artifact name. /// Keeps track of any properties unknown to the library. - internal OneLakeArtifact(string artifactName, OneLakeArtifactType artifactType, IDictionary serializedAdditionalRawData) + internal OneLakeArtifact(OneLakeArtifactType artifactType, string artifactName, IDictionary serializedAdditionalRawData) { - ArtifactName = artifactName; ArtifactType = artifactType; + ArtifactName = artifactName; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -75,9 +75,9 @@ internal OneLakeArtifact() { } - /// [Required] OneLake artifact name. - public string ArtifactName { get; set; } /// [Required] OneLake artifact type. internal OneLakeArtifactType ArtifactType { get; set; } + /// [Required] OneLake artifact name. + public string ArtifactName { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.Serialization.cs index 9b7bd75301988..a01367b8d2f0e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.Serialization.cs @@ -28,6 +28,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteStartObject(); writer.WritePropertyName("artifact"u8); writer.WriteObjectValue(Artifact, options); + writer.WritePropertyName("oneLakeWorkspaceName"u8); + writer.WriteStringValue(OneLakeWorkspaceName); if (Optional.IsDefined(Endpoint)) { if (Endpoint != null) @@ -40,15 +42,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteNull("endpoint"); } } - writer.WritePropertyName("oneLakeWorkspaceName"u8); - writer.WriteStringValue(OneLakeWorkspaceName); if (Optional.IsDefined(ServiceDataAccessAuthIdentity)) { writer.WritePropertyName("serviceDataAccessAuthIdentity"u8); writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); } - writer.WritePropertyName("credentials"u8); - writer.WriteObjectValue(Credentials, options); writer.WritePropertyName("datastoreType"u8); writer.WriteStringValue(DatastoreType.ToString()); if (options.Format != "W" && Optional.IsDefined(IsDefault)) @@ -56,6 +54,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WritePropertyName("isDefault"u8); writer.WriteBooleanValue(IsDefault.Value); } + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials, options); if (Optional.IsDefined(Description)) { if (Description != null) @@ -68,13 +68,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -83,16 +83,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -101,7 +101,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -143,15 +143,15 @@ internal static OneLakeDatastore DeserializeOneLakeDatastore(JsonElement element return null; } OneLakeArtifact artifact = default; - string endpoint = default; string oneLakeWorkspaceName = default; + string endpoint = default; MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity = default; - MachineLearningDatastoreCredentials credentials = default; DatastoreType datastoreType = default; bool? isDefault = default; + MachineLearningDatastoreCredentials credentials = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -161,6 +161,11 @@ internal static OneLakeDatastore DeserializeOneLakeDatastore(JsonElement element artifact = OneLakeArtifact.DeserializeOneLakeArtifact(property.Value, options); continue; } + if (property.NameEquals("oneLakeWorkspaceName"u8)) + { + oneLakeWorkspaceName = property.Value.GetString(); + continue; + } if (property.NameEquals("endpoint"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -171,11 +176,6 @@ internal static OneLakeDatastore DeserializeOneLakeDatastore(JsonElement element endpoint = property.Value.GetString(); continue; } - if (property.NameEquals("oneLakeWorkspaceName"u8)) - { - oneLakeWorkspaceName = property.Value.GetString(); - continue; - } if (property.NameEquals("serviceDataAccessAuthIdentity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -185,11 +185,6 @@ internal static OneLakeDatastore DeserializeOneLakeDatastore(JsonElement element serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); continue; } - if (property.NameEquals("credentials"u8)) - { - credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value, options); - continue; - } if (property.NameEquals("datastoreType"u8)) { datastoreType = new DatastoreType(property.Value.GetString()); @@ -204,6 +199,11 @@ internal static OneLakeDatastore DeserializeOneLakeDatastore(JsonElement element isDefault = property.Value.GetBoolean(); continue; } + if (property.NameEquals("credentials"u8)) + { + credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value, options); + continue; + } if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -214,11 +214,11 @@ internal static OneLakeDatastore DeserializeOneLakeDatastore(JsonElement element description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -226,14 +226,14 @@ internal static OneLakeDatastore DeserializeOneLakeDatastore(JsonElement element { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -241,7 +241,7 @@ internal static OneLakeDatastore DeserializeOneLakeDatastore(JsonElement element { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -252,15 +252,15 @@ internal static OneLakeDatastore DeserializeOneLakeDatastore(JsonElement element serializedAdditionalRawData = rawDataDictionary; return new OneLakeDatastore( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - credentials, datastoreType, isDefault, + credentials, artifact, - endpoint, oneLakeWorkspaceName, + endpoint, serviceDataAccessAuthIdentity); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.cs index e9e567d8bdbf7..6ce71ab757811 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OneLakeDatastore.cs @@ -39,29 +39,29 @@ public OneLakeDatastore(MachineLearningDatastoreCredentials credentials, OneLake /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. + /// [Required] Storage type backing the datastore. + /// Readonly property to indicate if datastore is the workspace default datastore. /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , and . /// - /// [Required] Storage type backing the datastore. - /// Readonly property to indicate if datastore is the workspace default datastore. /// /// [Required] OneLake artifact backing the datastore. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include . /// - /// OneLake endpoint to use for the datastore. /// [Required] OneLake workspace name. + /// OneLake endpoint to use for the datastore. /// Indicates which identity to use to authenticate service data access to customer's storage. - internal OneLakeDatastore(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, OneLakeArtifact artifact, string endpoint, string oneLakeWorkspaceName, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity) : base(description, properties, tags, serializedAdditionalRawData, credentials, datastoreType, isDefault) + internal OneLakeDatastore(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, DatastoreType datastoreType, bool? isDefault, MachineLearningDatastoreCredentials credentials, OneLakeArtifact artifact, string oneLakeWorkspaceName, string endpoint, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity) : base(description, tags, properties, serializedAdditionalRawData, datastoreType, isDefault, credentials) { Artifact = artifact; - Endpoint = endpoint; OneLakeWorkspaceName = oneLakeWorkspaceName; + Endpoint = endpoint; ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; DatastoreType = datastoreType; } @@ -77,10 +77,10 @@ internal OneLakeDatastore() /// The available derived classes include . /// public OneLakeArtifact Artifact { get; set; } - /// OneLake endpoint to use for the datastore. - public string Endpoint { get; set; } /// [Required] OneLake workspace name. public string OneLakeWorkspaceName { get; set; } + /// OneLake endpoint to use for the datastore. + public string Endpoint { get; set; } /// Indicates which identity to use to authenticate service data access to customer's storage. public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentTrackedResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentTrackedResourceArmPaginatedResult.Serialization.cs index 88355e628a452..18c3caa7d223b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentTrackedResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentTrackedResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8Jso } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8Jso } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static OnlineDeploymentTrackedResourceArmPaginatedResult DeserializeOnl { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static OnlineDeploymentTrackedResourceArmPaginatedResult DeserializeOnl 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 OnlineDeploymentTrackedResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new OnlineDeploymentTrackedResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentTrackedResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentTrackedResourceArmPaginatedResult.cs index 9c086ddea4f13..d86bbced3d285 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentTrackedResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentTrackedResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal OnlineDeploymentTrackedResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of OnlineDeployment objects. If null, there are no additional pages. /// An array of objects of type OnlineDeployment. + /// The link to the next page of OnlineDeployment objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal OnlineDeploymentTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal OnlineDeploymentTrackedResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of OnlineDeployment objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type OnlineDeployment. public IReadOnlyList Value { get; } + /// The link to the next page of OnlineDeployment objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointTrackedResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointTrackedResourceArmPaginatedResult.Serialization.cs index dc3ce9101887b..a2fe19f273250 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointTrackedResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointTrackedResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonW } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonW } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static OnlineEndpointTrackedResourceArmPaginatedResult DeserializeOnlin { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static OnlineEndpointTrackedResourceArmPaginatedResult DeserializeOnlin 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 OnlineEndpointTrackedResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new OnlineEndpointTrackedResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointTrackedResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointTrackedResourceArmPaginatedResult.cs index 8d4f4a701a109..3195a93d46679 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointTrackedResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointTrackedResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal OnlineEndpointTrackedResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. /// An array of objects of type OnlineEndpoint. + /// The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal OnlineEndpointTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal OnlineEndpointTrackedResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type OnlineEndpoint. public IReadOnlyList Value { get; } + /// The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OpenAIEndpointDeploymentResourceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OpenAIEndpointDeploymentResourceProperties.Serialization.cs deleted file mode 100644 index b4fd7a3ec41a4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OpenAIEndpointDeploymentResourceProperties.Serialization.cs +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class OpenAIEndpointDeploymentResourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(OpenAIEndpointDeploymentResourceProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, options); - if (Optional.IsDefined(RaiPolicyName)) - { - writer.WritePropertyName("raiPolicyName"u8); - writer.WriteStringValue(RaiPolicyName); - } - if (Optional.IsDefined(VersionUpgradeOption)) - { - writer.WritePropertyName("versionUpgradeOption"u8); - writer.WriteStringValue(VersionUpgradeOption.Value.ToString()); - } - if (Optional.IsDefined(FailureReason)) - { - writer.WritePropertyName("failureReason"u8); - writer.WriteStringValue(FailureReason); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(EndpointDeploymentResourcePropertiesType); - 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 - } - } - writer.WriteEndObject(); - } - - OpenAIEndpointDeploymentResourceProperties 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(OpenAIEndpointDeploymentResourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenAIEndpointDeploymentResourceProperties(document.RootElement, options); - } - - internal static OpenAIEndpointDeploymentResourceProperties DeserializeOpenAIEndpointDeploymentResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - EndpointDeploymentModel model = default; - string raiPolicyName = default; - DeploymentModelVersionUpgradeOption? versionUpgradeOption = default; - string failureReason = default; - DefaultResourceProvisioningState? provisioningState = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("model"u8)) - { - model = EndpointDeploymentModel.DeserializeEndpointDeploymentModel(property.Value, options); - continue; - } - if (property.NameEquals("raiPolicyName"u8)) - { - raiPolicyName = property.Value.GetString(); - continue; - } - if (property.NameEquals("versionUpgradeOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - versionUpgradeOption = new DeploymentModelVersionUpgradeOption(property.Value.GetString()); - continue; - } - if (property.NameEquals("failureReason"u8)) - { - failureReason = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new DefaultResourceProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new OpenAIEndpointDeploymentResourceProperties( - failureReason, - provisioningState, - type, - serializedAdditionalRawData, - model, - raiPolicyName, - versionUpgradeOption); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(OpenAIEndpointDeploymentResourceProperties)} does not support writing '{options.Format}' format."); - } - } - - OpenAIEndpointDeploymentResourceProperties 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 DeserializeOpenAIEndpointDeploymentResourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OpenAIEndpointDeploymentResourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OpenAIEndpointDeploymentResourceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OpenAIEndpointDeploymentResourceProperties.cs deleted file mode 100644 index f735423231505..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OpenAIEndpointDeploymentResourceProperties.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The OpenAIEndpointDeploymentResourceProperties. - public partial class OpenAIEndpointDeploymentResourceProperties : EndpointDeploymentResourceProperties - { - /// Initializes a new instance of . - /// Model used for the endpoint deployment. - /// is null. - public OpenAIEndpointDeploymentResourceProperties(EndpointDeploymentModel model) - { - Argument.AssertNotNull(model, nameof(model)); - - Model = model; - EndpointDeploymentResourcePropertiesType = "Azure.OpenAI"; - } - - /// Initializes a new instance of . - /// The failure reason if the creation failed. - /// Read-only provision state status property. - /// Kind of the deployment. - /// Keeps track of any properties unknown to the library. - /// Model used for the endpoint deployment. - /// The name of RAI policy. - /// Deployment model version upgrade option. - internal OpenAIEndpointDeploymentResourceProperties(string failureReason, DefaultResourceProvisioningState? provisioningState, string endpointDeploymentResourcePropertiesType, IDictionary serializedAdditionalRawData, EndpointDeploymentModel model, string raiPolicyName, DeploymentModelVersionUpgradeOption? versionUpgradeOption) : base(failureReason, provisioningState, endpointDeploymentResourcePropertiesType, serializedAdditionalRawData) - { - Model = model; - RaiPolicyName = raiPolicyName; - VersionUpgradeOption = versionUpgradeOption; - EndpointDeploymentResourcePropertiesType = endpointDeploymentResourcePropertiesType ?? "Azure.OpenAI"; - } - - /// Initializes a new instance of for deserialization. - internal OpenAIEndpointDeploymentResourceProperties() - { - } - - /// Model used for the endpoint deployment. - public EndpointDeploymentModel Model { get; set; } - /// The name of RAI policy. - public string RaiPolicyName { get; set; } - /// Deployment model version upgrade option. - public DeploymentModelVersionUpgradeOption? VersionUpgradeOption { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OpenAIEndpointResourceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OpenAIEndpointResourceProperties.Serialization.cs deleted file mode 100644 index b79f2cb16cda8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OpenAIEndpointResourceProperties.Serialization.cs +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class OpenAIEndpointResourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(OpenAIEndpointResourceProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(AssociatedResourceId)) - { - writer.WritePropertyName("associatedResourceId"u8); - writer.WriteStringValue(AssociatedResourceId); - } - if (Optional.IsCollectionDefined(Deployments)) - { - writer.WritePropertyName("deployments"u8); - writer.WriteStartArray(); - foreach (var item in Deployments) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (Optional.IsDefined(EndpointUri)) - { - writer.WritePropertyName("endpointUri"u8); - writer.WriteStringValue(EndpointUri.AbsoluteUri); - } - if (Optional.IsDefined(FailureReason)) - { - writer.WritePropertyName("failureReason"u8); - writer.WriteStringValue(FailureReason); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(ShouldCreateAiServicesEndpoint)) - { - writer.WritePropertyName("shouldCreateAiServicesEndpoint"u8); - writer.WriteBooleanValue(ShouldCreateAiServicesEndpoint.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 - } - } - writer.WriteEndObject(); - } - - OpenAIEndpointResourceProperties 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(OpenAIEndpointResourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenAIEndpointResourceProperties(document.RootElement, options); - } - - internal static OpenAIEndpointResourceProperties DeserializeOpenAIEndpointResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier associatedResourceId = default; - IList deployments = default; - EndpointType endpointType = default; - Uri endpointUri = default; - string failureReason = default; - AzureLocation? location = default; - string name = default; - DefaultResourceProvisioningState? provisioningState = default; - bool? shouldCreateAiServicesEndpoint = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("associatedResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - associatedResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("deployments"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(item, options)); - } - deployments = array; - continue; - } - if (property.NameEquals("endpointType"u8)) - { - endpointType = new EndpointType(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpointUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpointUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("failureReason"u8)) - { - failureReason = property.Value.GetString(); - continue; - } - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new DefaultResourceProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("shouldCreateAiServicesEndpoint"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - shouldCreateAiServicesEndpoint = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new OpenAIEndpointResourceProperties( - associatedResourceId, - deployments ?? new ChangeTrackingList(), - endpointType, - endpointUri, - failureReason, - location, - name, - provisioningState, - shouldCreateAiServicesEndpoint, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(OpenAIEndpointResourceProperties)} does not support writing '{options.Format}' format."); - } - } - - OpenAIEndpointResourceProperties 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 DeserializeOpenAIEndpointResourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OpenAIEndpointResourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OpenAIEndpointResourceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OpenAIEndpointResourceProperties.cs deleted file mode 100644 index fe0f3b0685768..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OpenAIEndpointResourceProperties.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The OpenAIEndpointResourceProperties. - public partial class OpenAIEndpointResourceProperties : EndpointResourceProperties - { - /// Initializes a new instance of . - public OpenAIEndpointResourceProperties() - { - EndpointType = EndpointType.AzureOpenAI; - } - - /// Initializes a new instance of . - /// Byo resource id for creating the built-in model service endpoints. - /// Deployments info. - /// Type of the endpoint. - /// Uri of the endpoint. - /// The failure reason if the creation failed. - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace - /// - /// Name of the endpoint. - /// Read-only provision state status property. - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - /// Keeps track of any properties unknown to the library. - internal OpenAIEndpointResourceProperties(ResourceIdentifier associatedResourceId, IList deployments, EndpointType endpointType, Uri endpointUri, string failureReason, AzureLocation? location, string name, DefaultResourceProvisioningState? provisioningState, bool? shouldCreateAiServicesEndpoint, IDictionary serializedAdditionalRawData) : base(associatedResourceId, deployments, endpointType, endpointUri, failureReason, location, name, provisioningState, shouldCreateAiServicesEndpoint, serializedAdditionalRawData) - { - EndpointType = endpointType; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PatchStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PatchStatus.cs deleted file mode 100644 index cf568facb6ea5..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PatchStatus.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The os patching status. - public readonly partial struct PatchStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PatchStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CompletedWithWarningsValue = "CompletedWithWarnings"; - private const string FailedValue = "Failed"; - private const string InProgressValue = "InProgress"; - private const string SucceededValue = "Succeeded"; - private const string UnknownValue = "Unknown"; - - /// CompletedWithWarnings. - public static PatchStatus CompletedWithWarnings { get; } = new PatchStatus(CompletedWithWarningsValue); - /// Failed. - public static PatchStatus Failed { get; } = new PatchStatus(FailedValue); - /// InProgress. - public static PatchStatus InProgress { get; } = new PatchStatus(InProgressValue); - /// Succeeded. - public static PatchStatus Succeeded { get; } = new PatchStatus(SucceededValue); - /// Unknown. - public static PatchStatus Unknown { get; } = new PatchStatus(UnknownValue); - /// Determines if two values are the same. - public static bool operator ==(PatchStatus left, PatchStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PatchStatus left, PatchStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PatchStatus(string value) => new PatchStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PatchStatus other && Equals(other); - /// - public bool Equals(PatchStatus 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.Serialization.cs index 8b0d116bb9ad8..0389693d129c2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.Serialization.cs @@ -26,6 +26,17 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo } writer.WriteStartObject(); + writer.WritePropertyName("metricThresholds"u8); + writer.WriteStartArray(); + foreach (var item in MetricThresholds) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("productionData"u8); + writer.WriteObjectValue(ProductionData, options); + writer.WritePropertyName("referenceData"u8); + writer.WriteObjectValue(ReferenceData, options); if (Optional.IsCollectionDefined(FeatureDataTypeOverride)) { if (FeatureDataTypeOverride != null) @@ -44,17 +55,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteNull("featureDataTypeOverride"); } } - writer.WritePropertyName("metricThresholds"u8); - writer.WriteStartArray(); - foreach (var item in MetricThresholds) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("productionData"u8); - writer.WriteObjectValue(ProductionData, options); - writer.WritePropertyName("referenceData"u8); - writer.WriteObjectValue(ReferenceData, options); + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); if (Optional.IsCollectionDefined(NotificationTypes)) { if (NotificationTypes != null) @@ -90,8 +92,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WriteNull("properties"); } } - writer.WritePropertyName("signalType"u8); - writer.WriteStringValue(SignalType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -130,32 +130,17 @@ internal static PredictionDriftMonitoringSignal DeserializePredictionDriftMonito { return null; } - IDictionary featureDataTypeOverride = default; IList metricThresholds = default; MonitoringInputDataBase productionData = default; MonitoringInputDataBase referenceData = default; + IDictionary featureDataTypeOverride = default; + MonitoringSignalType signalType = default; IList notificationTypes = default; IDictionary properties = default; - MonitoringSignalType signalType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("featureDataTypeOverride"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - featureDataTypeOverride = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, new MonitoringFeatureDataType(property0.Value.GetString())); - } - featureDataTypeOverride = dictionary; - continue; - } if (property.NameEquals("metricThresholds"u8)) { List array = new List(); @@ -176,6 +161,26 @@ internal static PredictionDriftMonitoringSignal DeserializePredictionDriftMonito referenceData = MonitoringInputDataBase.DeserializeMonitoringInputDataBase(property.Value, options); continue; } + if (property.NameEquals("featureDataTypeOverride"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + featureDataTypeOverride = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, new MonitoringFeatureDataType(property0.Value.GetString())); + } + featureDataTypeOverride = dictionary; + continue; + } + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } if (property.NameEquals("notificationTypes"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -206,11 +211,6 @@ internal static PredictionDriftMonitoringSignal DeserializePredictionDriftMonito properties = dictionary; continue; } - if (property.NameEquals("signalType"u8)) - { - signalType = new MonitoringSignalType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -218,14 +218,14 @@ internal static PredictionDriftMonitoringSignal DeserializePredictionDriftMonito } serializedAdditionalRawData = rawDataDictionary; return new PredictionDriftMonitoringSignal( + signalType, notificationTypes ?? new ChangeTrackingList(), properties ?? new ChangeTrackingDictionary(), - signalType, serializedAdditionalRawData, - featureDataTypeOverride ?? new ChangeTrackingDictionary(), metricThresholds, productionData, - referenceData); + referenceData, + featureDataTypeOverride ?? new ChangeTrackingDictionary()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.cs index f26fdd50121ba..50ecebd1df476 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PredictionDriftMonitoringSignal.cs @@ -37,19 +37,18 @@ public PredictionDriftMonitoringSignal(IEnumerable(); MetricThresholds = metricThresholds.ToList(); ProductionData = productionData; ReferenceData = referenceData; + FeatureDataTypeOverride = new ChangeTrackingDictionary(); SignalType = MonitoringSignalType.PredictionDrift; } /// Initializes a new instance of . + /// [Required] Specifies the type of signal to monitor. /// The current notification mode for this signal. /// Property dictionary. Properties can be added, but not removed or altered. - /// [Required] Specifies the type of signal to monitor. /// Keeps track of any properties unknown to the library. - /// A dictionary that maps feature names to their respective data types. /// /// [Required] A list of metrics to calculate and their associated thresholds. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -65,12 +64,13 @@ public PredictionDriftMonitoringSignal(IEnumerable is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - internal PredictionDriftMonitoringSignal(IList notificationTypes, IDictionary properties, MonitoringSignalType signalType, IDictionary serializedAdditionalRawData, IDictionary featureDataTypeOverride, IList metricThresholds, MonitoringInputDataBase productionData, MonitoringInputDataBase referenceData) : base(notificationTypes, properties, signalType, serializedAdditionalRawData) + /// A dictionary that maps feature names to their respective data types. + internal PredictionDriftMonitoringSignal(MonitoringSignalType signalType, IList notificationTypes, IDictionary properties, IDictionary serializedAdditionalRawData, IList metricThresholds, MonitoringInputDataBase productionData, MonitoringInputDataBase referenceData, IDictionary featureDataTypeOverride) : base(signalType, notificationTypes, properties, serializedAdditionalRawData) { - FeatureDataTypeOverride = featureDataTypeOverride; MetricThresholds = metricThresholds; ProductionData = productionData; ReferenceData = referenceData; + FeatureDataTypeOverride = featureDataTypeOverride; SignalType = signalType; } @@ -79,8 +79,6 @@ internal PredictionDriftMonitoringSignal() { } - /// A dictionary that maps feature names to their respective data types. - public IDictionary FeatureDataTypeOverride { get; set; } /// /// [Required] A list of metrics to calculate and their associated thresholds. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -99,5 +97,7 @@ internal PredictionDriftMonitoringSignal() /// The available derived classes include , and . /// public MonitoringInputDataBase ReferenceData { get; set; } + /// A dictionary that maps feature names to their respective data types. + public IDictionary FeatureDataTypeOverride { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.Serialization.cs index 7e66f6fa245ea..01e9b4c88fa7b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.Serialization.cs @@ -31,31 +31,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("destination"u8); writer.WriteObjectValue(Destination, options); } - if (Optional.IsCollectionDefined(Fqdns)) - { - writer.WritePropertyName("fqdns"u8); - writer.WriteStartArray(); - foreach (var item in Fqdns) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } if (Optional.IsDefined(Category)) { writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.Value.ToString()); } - if (options.Format != "W" && Optional.IsCollectionDefined(ParentRuleNames)) - { - writer.WritePropertyName("parentRuleNames"u8); - writer.WriteStartArray(); - foreach (var item in ParentRuleNames) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -102,9 +82,7 @@ internal static PrivateEndpointOutboundRule DeserializePrivateEndpointOutboundRu return null; } PrivateEndpointDestination destination = default; - IList fqdns = default; OutboundRuleCategory? category = default; - IReadOnlyList parentRuleNames = default; OutboundRuleStatus? status = default; OutboundRuleType type = default; IDictionary serializedAdditionalRawData = default; @@ -120,20 +98,6 @@ internal static PrivateEndpointOutboundRule DeserializePrivateEndpointOutboundRu destination = PrivateEndpointDestination.DeserializePrivateEndpointDestination(property.Value, options); continue; } - if (property.NameEquals("fqdns"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - fqdns = array; - continue; - } if (property.NameEquals("category"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -143,20 +107,6 @@ internal static PrivateEndpointOutboundRule DeserializePrivateEndpointOutboundRu category = new OutboundRuleCategory(property.Value.GetString()); continue; } - if (property.NameEquals("parentRuleNames"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - parentRuleNames = array; - continue; - } if (property.NameEquals("status"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -177,14 +127,7 @@ internal static PrivateEndpointOutboundRule DeserializePrivateEndpointOutboundRu } } serializedAdditionalRawData = rawDataDictionary; - return new PrivateEndpointOutboundRule( - category, - parentRuleNames ?? new ChangeTrackingList(), - status, - type, - serializedAdditionalRawData, - destination, - fqdns ?? new ChangeTrackingList()); + return new PrivateEndpointOutboundRule(category, status, type, serializedAdditionalRawData, destination); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.cs index 429377fc8c6d9..320e28bbee68a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpointOutboundRule.cs @@ -16,28 +16,22 @@ public partial class PrivateEndpointOutboundRule : MachineLearningOutboundRule /// Initializes a new instance of . public PrivateEndpointOutboundRule() { - Fqdns = new ChangeTrackingList(); OutboundRuleType = OutboundRuleType.PrivateEndpoint; } /// Initializes a new instance of . /// Category of a managed network Outbound Rule of a machine learning workspace. - /// /// Type of a managed network Outbound Rule of a machine learning workspace. /// Type of a managed network Outbound Rule of a machine learning workspace. /// Keeps track of any properties unknown to the library. /// Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace. - /// - internal PrivateEndpointOutboundRule(OutboundRuleCategory? category, IReadOnlyList parentRuleNames, OutboundRuleStatus? status, OutboundRuleType outboundRuleType, IDictionary serializedAdditionalRawData, PrivateEndpointDestination destination, IList fqdns) : base(category, parentRuleNames, status, outboundRuleType, serializedAdditionalRawData) + internal PrivateEndpointOutboundRule(OutboundRuleCategory? category, OutboundRuleStatus? status, OutboundRuleType outboundRuleType, IDictionary serializedAdditionalRawData, PrivateEndpointDestination destination) : base(category, status, outboundRuleType, serializedAdditionalRawData) { Destination = destination; - Fqdns = fqdns; OutboundRuleType = outboundRuleType; } /// Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace. public PrivateEndpointDestination Destination { get; set; } - /// Gets the fqdns. - public IList Fqdns { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PublicNetworkAccess.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PublicNetworkAccess.cs new file mode 100644 index 0000000000000..456f790c5e4e7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PublicNetworkAccess.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.MachineLearning.Models +{ + /// Whether requests from Public Network are allowed. + public readonly partial struct PublicNetworkAccess : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PublicNetworkAccess(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// Enabled. + public static PublicNetworkAccess Enabled { get; } = new PublicNetworkAccess(EnabledValue); + /// Disabled. + public static PublicNetworkAccess Disabled { get; } = new PublicNetworkAccess(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(PublicNetworkAccess left, PublicNetworkAccess right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PublicNetworkAccess left, PublicNetworkAccess right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PublicNetworkAccess(string value) => new PublicNetworkAccess(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PublicNetworkAccess other && Equals(other); + /// + public bool Equals(PublicNetworkAccess 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistConfig.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistConfig.Serialization.cs deleted file mode 100644 index 129c212193248..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistConfig.Serialization.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class RaiBlocklistConfig : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RaiBlocklistConfig)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Blocking)) - { - writer.WritePropertyName("blocking"u8); - writer.WriteBooleanValue(Blocking.Value); - } - if (Optional.IsDefined(BlocklistName)) - { - writer.WritePropertyName("blocklistName"u8); - writer.WriteStringValue(BlocklistName); - } - 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 - } - } - writer.WriteEndObject(); - } - - RaiBlocklistConfig 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(RaiBlocklistConfig)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRaiBlocklistConfig(document.RootElement, options); - } - - internal static RaiBlocklistConfig DeserializeRaiBlocklistConfig(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - bool? blocking = default; - string blocklistName = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("blocking"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - blocking = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("blocklistName"u8)) - { - blocklistName = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RaiBlocklistConfig(blocking, blocklistName, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RaiBlocklistConfig)} does not support writing '{options.Format}' format."); - } - } - - RaiBlocklistConfig 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 DeserializeRaiBlocklistConfig(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RaiBlocklistConfig)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistConfig.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistConfig.cs deleted file mode 100644 index 83e1be0f35feb..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistConfig.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Azure OpenAI blocklist config. - public partial class RaiBlocklistConfig - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public RaiBlocklistConfig() - { - } - - /// Initializes a new instance of . - /// If blocking would occur. - /// Name of ContentFilter. - /// Keeps track of any properties unknown to the library. - internal RaiBlocklistConfig(bool? blocking, string blocklistName, IDictionary serializedAdditionalRawData) - { - Blocking = blocking; - BlocklistName = blocklistName; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// If blocking would occur. - public bool? Blocking { get; set; } - /// Name of ContentFilter. - public string BlocklistName { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemBulkRequest.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemBulkRequest.Serialization.cs deleted file mode 100644 index 23dade87b9638..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemBulkRequest.Serialization.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class RaiBlocklistItemBulkRequest : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RaiBlocklistItemBulkRequest)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - RaiBlocklistItemBulkRequest 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(RaiBlocklistItemBulkRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRaiBlocklistItemBulkRequest(document.RootElement, options); - } - - internal static RaiBlocklistItemBulkRequest DeserializeRaiBlocklistItemBulkRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - RaiBlocklistItemProperties properties = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - properties = RaiBlocklistItemProperties.DeserializeRaiBlocklistItemProperties(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RaiBlocklistItemBulkRequest(name, properties, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RaiBlocklistItemBulkRequest)} does not support writing '{options.Format}' format."); - } - } - - RaiBlocklistItemBulkRequest 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 DeserializeRaiBlocklistItemBulkRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RaiBlocklistItemBulkRequest)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemBulkRequest.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemBulkRequest.cs deleted file mode 100644 index b29c159c5854d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemBulkRequest.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The Cognitive Services RaiBlocklist Item request body. - public partial class RaiBlocklistItemBulkRequest - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public RaiBlocklistItemBulkRequest() - { - } - - /// Initializes a new instance of . - /// - /// Properties of Cognitive Services RaiBlocklist Item. - /// Keeps track of any properties unknown to the library. - internal RaiBlocklistItemBulkRequest(string name, RaiBlocklistItemProperties properties, IDictionary serializedAdditionalRawData) - { - Name = name; - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets or sets the name. - public string Name { get; set; } - /// Properties of Cognitive Services RaiBlocklist Item. - public RaiBlocklistItemProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemProperties.Serialization.cs deleted file mode 100644 index 7f1f607d80f7f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemProperties.Serialization.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class RaiBlocklistItemProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RaiBlocklistItemProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(IsRegex)) - { - writer.WritePropertyName("isRegex"u8); - writer.WriteBooleanValue(IsRegex.Value); - } - if (Optional.IsDefined(Pattern)) - { - writer.WritePropertyName("pattern"u8); - writer.WriteStringValue(Pattern); - } - 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 - } - } - writer.WriteEndObject(); - } - - RaiBlocklistItemProperties 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(RaiBlocklistItemProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRaiBlocklistItemProperties(document.RootElement, options); - } - - internal static RaiBlocklistItemProperties DeserializeRaiBlocklistItemProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - bool? isRegex = default; - string pattern = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("isRegex"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - isRegex = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("pattern"u8)) - { - pattern = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RaiBlocklistItemProperties(isRegex, pattern, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RaiBlocklistItemProperties)} does not support writing '{options.Format}' format."); - } - } - - RaiBlocklistItemProperties 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 DeserializeRaiBlocklistItemProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RaiBlocklistItemProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemProperties.cs deleted file mode 100644 index 73f38f3c677c4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemProperties.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// RAI Custom Blocklist Item properties. - public partial class RaiBlocklistItemProperties - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public RaiBlocklistItemProperties() - { - } - - /// Initializes a new instance of . - /// If the pattern is a regex pattern. - /// Pattern to match against. - /// Keeps track of any properties unknown to the library. - internal RaiBlocklistItemProperties(bool? isRegex, string pattern, IDictionary serializedAdditionalRawData) - { - IsRegex = isRegex; - Pattern = pattern; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// If the pattern is a regex pattern. - public bool? IsRegex { get; set; } - /// Pattern to match against. - public string Pattern { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index b0cfc60cff313..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - 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" && _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 - } - } - writer.WriteEndObject(); - } - - RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult 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(RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult(document.RootElement, options); - } - - internal static RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult DeserializeRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string nextLink = default; - IReadOnlyList value = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - 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(RaiBlocklistItemPropertiesBasicResourceData.DeserializeRaiBlocklistItemPropertiesBasicResourceData(item, options)); - } - value = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult)} does not support writing '{options.Format}' format."); - } - } - - RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult 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 DeserializeRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.cs deleted file mode 100644 index 44ebeba3ee013..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult. - internal partial class RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult - { - /// - /// 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 RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// - /// Keeps track of any properties unknown to the library. - internal RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) - { - NextLink = nextLink; - Value = value; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets the next link. - public string NextLink { get; } - /// Gets the value. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistProperties.Serialization.cs deleted file mode 100644 index 13ba791cccfe3..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistProperties.Serialization.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class RaiBlocklistProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RaiBlocklistProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - 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 - } - } - writer.WriteEndObject(); - } - - RaiBlocklistProperties 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(RaiBlocklistProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRaiBlocklistProperties(document.RootElement, options); - } - - internal static RaiBlocklistProperties DeserializeRaiBlocklistProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string description = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RaiBlocklistProperties(description, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RaiBlocklistProperties)} does not support writing '{options.Format}' format."); - } - } - - RaiBlocklistProperties 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 DeserializeRaiBlocklistProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RaiBlocklistProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistProperties.cs deleted file mode 100644 index 616e6f5311a22..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistProperties.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// RAI Custom Blocklist properties. - public partial class RaiBlocklistProperties - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public RaiBlocklistProperties() - { - } - - /// Initializes a new instance of . - /// Description of the block list. - /// Keeps track of any properties unknown to the library. - internal RaiBlocklistProperties(string description, IDictionary serializedAdditionalRawData) - { - Description = description; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Description of the block list. - public string Description { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index bcaa0b6f547bd..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class RaiBlocklistPropertiesBasicResourceArmPaginatedResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RaiBlocklistPropertiesBasicResourceArmPaginatedResult)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - 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" && _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 - } - } - writer.WriteEndObject(); - } - - RaiBlocklistPropertiesBasicResourceArmPaginatedResult 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(RaiBlocklistPropertiesBasicResourceArmPaginatedResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRaiBlocklistPropertiesBasicResourceArmPaginatedResult(document.RootElement, options); - } - - internal static RaiBlocklistPropertiesBasicResourceArmPaginatedResult DeserializeRaiBlocklistPropertiesBasicResourceArmPaginatedResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string nextLink = default; - IReadOnlyList value = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - 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(RaiBlocklistPropertiesBasicResourceData.DeserializeRaiBlocklistPropertiesBasicResourceData(item, options)); - } - value = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RaiBlocklistPropertiesBasicResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RaiBlocklistPropertiesBasicResourceArmPaginatedResult)} does not support writing '{options.Format}' format."); - } - } - - RaiBlocklistPropertiesBasicResourceArmPaginatedResult 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 DeserializeRaiBlocklistPropertiesBasicResourceArmPaginatedResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RaiBlocklistPropertiesBasicResourceArmPaginatedResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.cs deleted file mode 100644 index 79e77b0814ef0..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The RaiBlocklistPropertiesBasicResourceArmPaginatedResult. - internal partial class RaiBlocklistPropertiesBasicResourceArmPaginatedResult - { - /// - /// 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 RaiBlocklistPropertiesBasicResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// - /// Keeps track of any properties unknown to the library. - internal RaiBlocklistPropertiesBasicResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) - { - NextLink = nextLink; - Value = value; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets the next link. - public string NextLink { get; } - /// Gets the value. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyContentFilter.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyContentFilter.Serialization.cs deleted file mode 100644 index e10035dd34c97..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyContentFilter.Serialization.cs +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class RaiPolicyContentFilter : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RaiPolicyContentFilter)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(AllowedContentLevel)) - { - writer.WritePropertyName("allowedContentLevel"u8); - writer.WriteStringValue(AllowedContentLevel.Value.ToString()); - } - if (Optional.IsDefined(Blocking)) - { - writer.WritePropertyName("blocking"u8); - writer.WriteBooleanValue(Blocking.Value); - } - if (Optional.IsDefined(Enabled)) - { - writer.WritePropertyName("enabled"u8); - writer.WriteBooleanValue(Enabled.Value); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Source)) - { - writer.WritePropertyName("source"u8); - writer.WriteStringValue(Source.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 - } - } - writer.WriteEndObject(); - } - - RaiPolicyContentFilter 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(RaiPolicyContentFilter)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRaiPolicyContentFilter(document.RootElement, options); - } - - internal static RaiPolicyContentFilter DeserializeRaiPolicyContentFilter(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AllowedContentLevel? allowedContentLevel = default; - bool? blocking = default; - bool? enabled = default; - string name = default; - RaiPolicyContentSource? source = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("allowedContentLevel"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - allowedContentLevel = new AllowedContentLevel(property.Value.GetString()); - continue; - } - if (property.NameEquals("blocking"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - blocking = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("enabled"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("source"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - source = new RaiPolicyContentSource(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RaiPolicyContentFilter( - allowedContentLevel, - blocking, - enabled, - name, - source, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RaiPolicyContentFilter)} does not support writing '{options.Format}' format."); - } - } - - RaiPolicyContentFilter 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 DeserializeRaiPolicyContentFilter(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RaiPolicyContentFilter)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyContentFilter.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyContentFilter.cs deleted file mode 100644 index 7f552a2bd1456..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyContentFilter.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Azure OpenAI Content Filter. - public partial class RaiPolicyContentFilter - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public RaiPolicyContentFilter() - { - } - - /// Initializes a new instance of . - /// Level at which content is filtered. - /// If blocking would occur. - /// If the ContentFilter is enabled. - /// Name of ContentFilter. - /// Content source to apply the Content Filters. - /// Keeps track of any properties unknown to the library. - internal RaiPolicyContentFilter(AllowedContentLevel? allowedContentLevel, bool? blocking, bool? enabled, string name, RaiPolicyContentSource? source, IDictionary serializedAdditionalRawData) - { - AllowedContentLevel = allowedContentLevel; - Blocking = blocking; - Enabled = enabled; - Name = name; - Source = source; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Level at which content is filtered. - public AllowedContentLevel? AllowedContentLevel { get; set; } - /// If blocking would occur. - public bool? Blocking { get; set; } - /// If the ContentFilter is enabled. - public bool? Enabled { get; set; } - /// Name of ContentFilter. - public string Name { get; set; } - /// Content source to apply the Content Filters. - public RaiPolicyContentSource? Source { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyContentSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyContentSource.cs deleted file mode 100644 index bda93bfeeb39c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyContentSource.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Content source to apply the Content Filters. - public readonly partial struct RaiPolicyContentSource : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RaiPolicyContentSource(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PromptValue = "Prompt"; - private const string CompletionValue = "Completion"; - - /// Prompt. - public static RaiPolicyContentSource Prompt { get; } = new RaiPolicyContentSource(PromptValue); - /// Completion. - public static RaiPolicyContentSource Completion { get; } = new RaiPolicyContentSource(CompletionValue); - /// Determines if two values are the same. - public static bool operator ==(RaiPolicyContentSource left, RaiPolicyContentSource right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RaiPolicyContentSource left, RaiPolicyContentSource right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RaiPolicyContentSource(string value) => new RaiPolicyContentSource(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RaiPolicyContentSource other && Equals(other); - /// - public bool Equals(RaiPolicyContentSource 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyMode.cs deleted file mode 100644 index 2a627aafe4adf..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyMode.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Content Filters mode. - public readonly partial struct RaiPolicyMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RaiPolicyMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DefaultValue = "Default"; - private const string DeferredValue = "Deferred"; - private const string BlockingValue = "Blocking"; - - /// Default. - public static RaiPolicyMode Default { get; } = new RaiPolicyMode(DefaultValue); - /// Deferred. - public static RaiPolicyMode Deferred { get; } = new RaiPolicyMode(DeferredValue); - /// Blocking. - public static RaiPolicyMode Blocking { get; } = new RaiPolicyMode(BlockingValue); - /// Determines if two values are the same. - public static bool operator ==(RaiPolicyMode left, RaiPolicyMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RaiPolicyMode left, RaiPolicyMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RaiPolicyMode(string value) => new RaiPolicyMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RaiPolicyMode other && Equals(other); - /// - public bool Equals(RaiPolicyMode 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyProperties.Serialization.cs deleted file mode 100644 index dbd6ff6d29453..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyProperties.Serialization.cs +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class RaiPolicyProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RaiPolicyProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(BasePolicyName)) - { - writer.WritePropertyName("basePolicyName"u8); - writer.WriteStringValue(BasePolicyName); - } - if (Optional.IsCollectionDefined(CompletionBlocklists)) - { - writer.WritePropertyName("completionBlocklists"u8); - writer.WriteStartArray(); - foreach (var item in CompletionBlocklists) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(ContentFilters)) - { - writer.WritePropertyName("contentFilters"u8); - writer.WriteStartArray(); - foreach (var item in ContentFilters) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"u8); - writer.WriteStringValue(Mode.Value.ToString()); - } - if (Optional.IsCollectionDefined(PromptBlocklists)) - { - writer.WritePropertyName("promptBlocklists"u8); - writer.WriteStartArray(); - foreach (var item in PromptBlocklists) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(PolicyType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(PolicyType.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 - } - } - writer.WriteEndObject(); - } - - RaiPolicyProperties 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(RaiPolicyProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRaiPolicyProperties(document.RootElement, options); - } - - internal static RaiPolicyProperties DeserializeRaiPolicyProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string basePolicyName = default; - IList completionBlocklists = default; - IList contentFilters = default; - RaiPolicyMode? mode = default; - IList promptBlocklists = default; - RaiPolicyType? type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("basePolicyName"u8)) - { - basePolicyName = property.Value.GetString(); - continue; - } - if (property.NameEquals("completionBlocklists"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RaiBlocklistConfig.DeserializeRaiBlocklistConfig(item, options)); - } - completionBlocklists = array; - continue; - } - if (property.NameEquals("contentFilters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RaiPolicyContentFilter.DeserializeRaiPolicyContentFilter(item, options)); - } - contentFilters = array; - continue; - } - if (property.NameEquals("mode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - mode = new RaiPolicyMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("promptBlocklists"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RaiBlocklistConfig.DeserializeRaiBlocklistConfig(item, options)); - } - promptBlocklists = array; - continue; - } - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new RaiPolicyType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RaiPolicyProperties( - basePolicyName, - completionBlocklists ?? new ChangeTrackingList(), - contentFilters ?? new ChangeTrackingList(), - mode, - promptBlocklists ?? new ChangeTrackingList(), - type, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RaiPolicyProperties)} does not support writing '{options.Format}' format."); - } - } - - RaiPolicyProperties 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 DeserializeRaiPolicyProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RaiPolicyProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyProperties.cs deleted file mode 100644 index 051f56aa0aef9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyProperties.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Azure OpenAI Content Filters properties. - public partial class RaiPolicyProperties - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public RaiPolicyProperties() - { - CompletionBlocklists = new ChangeTrackingList(); - ContentFilters = new ChangeTrackingList(); - PromptBlocklists = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Name of the base Content Filters. - /// - /// - /// Content Filters mode. - /// - /// Content Filters policy type. - /// Keeps track of any properties unknown to the library. - internal RaiPolicyProperties(string basePolicyName, IList completionBlocklists, IList contentFilters, RaiPolicyMode? mode, IList promptBlocklists, RaiPolicyType? policyType, IDictionary serializedAdditionalRawData) - { - BasePolicyName = basePolicyName; - CompletionBlocklists = completionBlocklists; - ContentFilters = contentFilters; - Mode = mode; - PromptBlocklists = promptBlocklists; - PolicyType = policyType; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Name of the base Content Filters. - public string BasePolicyName { get; set; } - /// Gets the completion blocklists. - public IList CompletionBlocklists { get; } - /// Gets the content filters. - public IList ContentFilters { get; } - /// Content Filters mode. - public RaiPolicyMode? Mode { get; set; } - /// Gets the prompt blocklists. - public IList PromptBlocklists { get; } - /// Content Filters policy type. - public RaiPolicyType? PolicyType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.Serialization.cs deleted file mode 100644 index 5b9391b3a2208..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class RaiPolicyPropertiesBasicResourceArmPaginatedResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RaiPolicyPropertiesBasicResourceArmPaginatedResult)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - 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" && _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 - } - } - writer.WriteEndObject(); - } - - RaiPolicyPropertiesBasicResourceArmPaginatedResult 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(RaiPolicyPropertiesBasicResourceArmPaginatedResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRaiPolicyPropertiesBasicResourceArmPaginatedResult(document.RootElement, options); - } - - internal static RaiPolicyPropertiesBasicResourceArmPaginatedResult DeserializeRaiPolicyPropertiesBasicResourceArmPaginatedResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string nextLink = default; - IReadOnlyList value = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - 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(RaiPolicyPropertiesBasicResourceData.DeserializeRaiPolicyPropertiesBasicResourceData(item, options)); - } - value = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RaiPolicyPropertiesBasicResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RaiPolicyPropertiesBasicResourceArmPaginatedResult)} does not support writing '{options.Format}' format."); - } - } - - RaiPolicyPropertiesBasicResourceArmPaginatedResult 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 DeserializeRaiPolicyPropertiesBasicResourceArmPaginatedResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RaiPolicyPropertiesBasicResourceArmPaginatedResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.cs deleted file mode 100644 index 7085d0e21698b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Azure OpenAI Content Filters resource list. - internal partial class RaiPolicyPropertiesBasicResourceArmPaginatedResult - { - /// - /// 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 RaiPolicyPropertiesBasicResourceArmPaginatedResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// - /// Keeps track of any properties unknown to the library. - internal RaiPolicyPropertiesBasicResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) - { - NextLink = nextLink; - Value = value; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets the next link. - public string NextLink { get; } - /// Gets the value. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyType.cs deleted file mode 100644 index 1c9f489932e26..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RaiPolicyType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Content Filters policy type. - public readonly partial struct RaiPolicyType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RaiPolicyType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UserManagedValue = "UserManaged"; - private const string SystemManagedValue = "SystemManaged"; - - /// UserManaged. - public static RaiPolicyType UserManaged { get; } = new RaiPolicyType(UserManagedValue); - /// SystemManaged. - public static RaiPolicyType SystemManaged { get; } = new RaiPolicyType(SystemManagedValue); - /// Determines if two values are the same. - public static bool operator ==(RaiPolicyType left, RaiPolicyType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RaiPolicyType left, RaiPolicyType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RaiPolicyType(string value) => new RaiPolicyType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RaiPolicyType other && Equals(other); - /// - public bool Equals(RaiPolicyType 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.Serialization.cs index da96a39ca4c31..47027e3002ee1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteStartObject(); - if (Optional.IsDefined(Rule)) - { - writer.WritePropertyName("rule"u8); - writer.WriteStringValue(Rule.Value.ToString()); - } if (Optional.IsDefined(Seed)) { if (Seed != null) @@ -43,6 +38,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNull("seed"); } } + if (Optional.IsDefined(Rule)) + { + writer.WritePropertyName("rule"u8); + writer.WriteStringValue(Rule.Value.ToString()); + } writer.WritePropertyName("samplingAlgorithmType"u8); writer.WriteStringValue(SamplingAlgorithmType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -83,30 +83,30 @@ internal static RandomSamplingAlgorithm DeserializeRandomSamplingAlgorithm(JsonE { return null; } - RandomSamplingAlgorithmRule? rule = default; int? seed = default; + RandomSamplingAlgorithmRule? rule = default; SamplingAlgorithmType samplingAlgorithmType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("rule"u8)) + if (property.NameEquals("seed"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + seed = null; continue; } - rule = new RandomSamplingAlgorithmRule(property.Value.GetString()); + seed = property.Value.GetInt32(); continue; } - if (property.NameEquals("seed"u8)) + if (property.NameEquals("rule"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - seed = null; continue; } - seed = property.Value.GetInt32(); + rule = new RandomSamplingAlgorithmRule(property.Value.GetString()); continue; } if (property.NameEquals("samplingAlgorithmType"u8)) @@ -120,7 +120,7 @@ internal static RandomSamplingAlgorithm DeserializeRandomSamplingAlgorithm(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new RandomSamplingAlgorithm(samplingAlgorithmType, serializedAdditionalRawData, rule, seed); + return new RandomSamplingAlgorithm(samplingAlgorithmType, serializedAdditionalRawData, seed, rule); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.cs index cc0c965c2faae..10c37a08d96fd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.cs @@ -22,18 +22,18 @@ public RandomSamplingAlgorithm() /// Initializes a new instance of . /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties. /// Keeps track of any properties unknown to the library. - /// The specific type of random algorithm. /// An optional integer to use as the seed for random number generation. - internal RandomSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithmType, IDictionary serializedAdditionalRawData, RandomSamplingAlgorithmRule? rule, int? seed) : base(samplingAlgorithmType, serializedAdditionalRawData) + /// The specific type of random algorithm. + internal RandomSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithmType, IDictionary serializedAdditionalRawData, int? seed, RandomSamplingAlgorithmRule? rule) : base(samplingAlgorithmType, serializedAdditionalRawData) { - Rule = rule; Seed = seed; + Rule = rule; SamplingAlgorithmType = samplingAlgorithmType; } - /// The specific type of random algorithm. - public RandomSamplingAlgorithmRule? Rule { get; set; } /// An optional integer to use as the seed for random number generation. public int? Seed { get; set; } + /// The specific type of random algorithm. + public RandomSamplingAlgorithmRule? Rule { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegenerateServiceAccountKeyContent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegenerateServiceAccountKeyContent.Serialization.cs deleted file mode 100644 index 8d991ab0329e0..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegenerateServiceAccountKeyContent.Serialization.cs +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class RegenerateServiceAccountKeyContent : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RegenerateServiceAccountKeyContent)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(KeyName)) - { - writer.WritePropertyName("keyName"u8); - writer.WriteStringValue(KeyName.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 - } - } - writer.WriteEndObject(); - } - - RegenerateServiceAccountKeyContent 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(RegenerateServiceAccountKeyContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRegenerateServiceAccountKeyContent(document.RootElement, options); - } - - internal static RegenerateServiceAccountKeyContent DeserializeRegenerateServiceAccountKeyContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ServiceAccountKeyName? keyName = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("keyName"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - keyName = new ServiceAccountKeyName(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RegenerateServiceAccountKeyContent(keyName, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RegenerateServiceAccountKeyContent)} does not support writing '{options.Format}' format."); - } - } - - RegenerateServiceAccountKeyContent 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 DeserializeRegenerateServiceAccountKeyContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RegenerateServiceAccountKeyContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegenerateServiceAccountKeyContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegenerateServiceAccountKeyContent.cs deleted file mode 100644 index a4d96f697c97b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegenerateServiceAccountKeyContent.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The RegenerateServiceAccountKeyContent. - public partial class RegenerateServiceAccountKeyContent - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public RegenerateServiceAccountKeyContent() - { - } - - /// Initializes a new instance of . - /// - /// Keeps track of any properties unknown to the library. - internal RegenerateServiceAccountKeyContent(ServiceAccountKeyName? keyName, IDictionary serializedAdditionalRawData) - { - KeyName = keyName; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Gets or sets the key name. - public ServiceAccountKeyName? KeyName { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.Serialization.cs index b9651165445df..6eee48e175a9b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.Serialization.cs @@ -95,7 +95,7 @@ internal static RegistryPrivateLinkServiceConnectionState DeserializeRegistryPri } string actionsRequired = default; string description = default; - MachineLearningPrivateEndpointServiceConnectionStatus? status = default; + EndpointServiceConnectionStatus? status = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -126,7 +126,7 @@ internal static RegistryPrivateLinkServiceConnectionState DeserializeRegistryPri { continue; } - status = new MachineLearningPrivateEndpointServiceConnectionStatus(property.Value.GetString()); + status = new EndpointServiceConnectionStatus(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.cs index 92b5ba56d9c00..24503756edeba 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryPrivateLinkServiceConnectionState.cs @@ -55,7 +55,7 @@ public RegistryPrivateLinkServiceConnectionState() /// User-defined message that, per NRP doc, may be used for approval-related message. /// Connection status of the service consumer with the service provider. /// Keeps track of any properties unknown to the library. - internal RegistryPrivateLinkServiceConnectionState(string actionsRequired, string description, MachineLearningPrivateEndpointServiceConnectionStatus? status, IDictionary serializedAdditionalRawData) + internal RegistryPrivateLinkServiceConnectionState(string actionsRequired, string description, EndpointServiceConnectionStatus? status, IDictionary serializedAdditionalRawData) { ActionsRequired = actionsRequired; Description = description; @@ -68,6 +68,6 @@ internal RegistryPrivateLinkServiceConnectionState(string actionsRequired, strin /// User-defined message that, per NRP doc, may be used for approval-related message. public string Description { get; set; } /// Connection status of the service consumer with the service provider. - public MachineLearningPrivateEndpointServiceConnectionStatus? Status { get; set; } + public EndpointServiceConnectionStatus? Status { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.Serialization.cs index 72329643c50f5..c0edfc28b5285 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.Serialization.cs @@ -60,21 +60,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WriteNull("blockedTrainingAlgorithms"); } } - if (Optional.IsDefined(IsDnnTrainingEnabled)) - { - writer.WritePropertyName("enableDnnTraining"u8); - writer.WriteBooleanValue(IsDnnTrainingEnabled.Value); - } - if (Optional.IsDefined(IsModelExplainabilityEnabled)) - { - writer.WritePropertyName("enableModelExplainability"u8); - writer.WriteBooleanValue(IsModelExplainabilityEnabled.Value); - } if (Optional.IsDefined(IsOnnxCompatibleModelsEnabled)) { writer.WritePropertyName("enableOnnxCompatibleModels"u8); writer.WriteBooleanValue(IsOnnxCompatibleModelsEnabled.Value); } + if (Optional.IsDefined(StackEnsembleSettings)) + { + if (StackEnsembleSettings != null) + { + writer.WritePropertyName("stackEnsembleSettings"u8); + writer.WriteObjectValue(StackEnsembleSettings, options); + } + else + { + writer.WriteNull("stackEnsembleSettings"); + } + } if (Optional.IsDefined(IsStackEnsembleEnabled)) { writer.WritePropertyName("enableStackEnsemble"u8); @@ -90,17 +92,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("ensembleModelDownloadTimeout"u8); writer.WriteStringValue(EnsembleModelDownloadTimeout.Value, "P"); } - if (Optional.IsDefined(StackEnsembleSettings)) + if (Optional.IsDefined(IsModelExplainabilityEnabled)) { - if (StackEnsembleSettings != null) - { - writer.WritePropertyName("stackEnsembleSettings"u8); - writer.WriteObjectValue(StackEnsembleSettings, options); - } - else - { - writer.WriteNull("stackEnsembleSettings"); - } + writer.WritePropertyName("enableModelExplainability"u8); + writer.WriteBooleanValue(IsModelExplainabilityEnabled.Value); + } + if (Optional.IsDefined(IsDnnTrainingEnabled)) + { + writer.WritePropertyName("enableDnnTraining"u8); + writer.WriteBooleanValue(IsDnnTrainingEnabled.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -142,13 +142,13 @@ internal static RegressionTrainingSettings DeserializeRegressionTrainingSettings } IList allowedTrainingAlgorithms = default; IList blockedTrainingAlgorithms = default; - bool? enableDnnTraining = default; - bool? enableModelExplainability = default; bool? enableOnnxCompatibleModels = default; + MachineLearningStackEnsembleSettings stackEnsembleSettings = default; bool? enableStackEnsemble = default; bool? enableVoteEnsemble = default; TimeSpan? ensembleModelDownloadTimeout = default; - MachineLearningStackEnsembleSettings stackEnsembleSettings = default; + bool? enableModelExplainability = default; + bool? enableDnnTraining = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -183,68 +183,68 @@ internal static RegressionTrainingSettings DeserializeRegressionTrainingSettings blockedTrainingAlgorithms = array; continue; } - if (property.NameEquals("enableDnnTraining"u8)) + if (property.NameEquals("enableOnnxCompatibleModels"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableDnnTraining = property.Value.GetBoolean(); + enableOnnxCompatibleModels = property.Value.GetBoolean(); continue; } - if (property.NameEquals("enableModelExplainability"u8)) + if (property.NameEquals("stackEnsembleSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + stackEnsembleSettings = null; continue; } - enableModelExplainability = property.Value.GetBoolean(); + stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value, options); continue; } - if (property.NameEquals("enableOnnxCompatibleModels"u8)) + if (property.NameEquals("enableStackEnsemble"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableOnnxCompatibleModels = property.Value.GetBoolean(); + enableStackEnsemble = property.Value.GetBoolean(); continue; } - if (property.NameEquals("enableStackEnsemble"u8)) + if (property.NameEquals("enableVoteEnsemble"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableStackEnsemble = property.Value.GetBoolean(); + enableVoteEnsemble = property.Value.GetBoolean(); continue; } - if (property.NameEquals("enableVoteEnsemble"u8)) + if (property.NameEquals("ensembleModelDownloadTimeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableVoteEnsemble = property.Value.GetBoolean(); + ensembleModelDownloadTimeout = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("ensembleModelDownloadTimeout"u8)) + if (property.NameEquals("enableModelExplainability"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - ensembleModelDownloadTimeout = property.Value.GetTimeSpan("P"); + enableModelExplainability = property.Value.GetBoolean(); continue; } - if (property.NameEquals("stackEnsembleSettings"u8)) + if (property.NameEquals("enableDnnTraining"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - stackEnsembleSettings = null; continue; } - stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value, options); + enableDnnTraining = property.Value.GetBoolean(); continue; } if (options.Format != "W") @@ -254,13 +254,13 @@ internal static RegressionTrainingSettings DeserializeRegressionTrainingSettings } serializedAdditionalRawData = rawDataDictionary; return new RegressionTrainingSettings( - enableDnnTraining, - enableModelExplainability, enableOnnxCompatibleModels, + stackEnsembleSettings, enableStackEnsemble, enableVoteEnsemble, ensembleModelDownloadTimeout, - stackEnsembleSettings, + enableModelExplainability, + enableDnnTraining, serializedAdditionalRawData, allowedTrainingAlgorithms ?? new ChangeTrackingList(), blockedTrainingAlgorithms ?? new ChangeTrackingList()); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.cs index 05f8f2bf88839..41395defd6505 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.cs @@ -21,20 +21,20 @@ public RegressionTrainingSettings() } /// Initializes a new instance of . - /// Enable recommendation of DNN models. - /// Flag to turn on explainability on best model. /// Flag for enabling onnx compatible models. + /// Stack ensemble settings for stack ensemble run. /// Enable stack ensemble run. /// Enable voting ensemble run. /// /// During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. /// Configure this parameter with a higher value than 300 secs, if more time is needed. /// - /// Stack ensemble settings for stack ensemble run. + /// Flag to turn on explainability on best model. + /// Enable recommendation of DNN models. /// Keeps track of any properties unknown to the library. /// Allowed models for regression task. /// Blocked models for regression task. - internal RegressionTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, IDictionary serializedAdditionalRawData, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isDnnTrainingEnabled, isModelExplainabilityEnabled, isOnnxCompatibleModelsEnabled, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, stackEnsembleSettings, serializedAdditionalRawData) + internal RegressionTrainingSettings(bool? isOnnxCompatibleModelsEnabled, MachineLearningStackEnsembleSettings stackEnsembleSettings, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, bool? isModelExplainabilityEnabled, bool? isDnnTrainingEnabled, IDictionary serializedAdditionalRawData, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isOnnxCompatibleModelsEnabled, stackEnsembleSettings, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, isModelExplainabilityEnabled, isDnnTrainingEnabled, serializedAdditionalRawData) { AllowedTrainingAlgorithms = allowedTrainingAlgorithms; BlockedTrainingAlgorithms = blockedTrainingAlgorithms; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResizeSchema.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResizeSchema.Serialization.cs deleted file mode 100644 index 8f3648662266d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResizeSchema.Serialization.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ResizeSchema : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ResizeSchema)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(TargetVmSize)) - { - writer.WritePropertyName("targetVMSize"u8); - writer.WriteStringValue(TargetVmSize); - } - 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 - } - } - writer.WriteEndObject(); - } - - ResizeSchema 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(ResizeSchema)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeResizeSchema(document.RootElement, options); - } - - internal static ResizeSchema DeserializeResizeSchema(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string targetVmSize = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("targetVMSize"u8)) - { - targetVmSize = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ResizeSchema(targetVmSize, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ResizeSchema)} does not support writing '{options.Format}' format."); - } - } - - ResizeSchema 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 DeserializeResizeSchema(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ResizeSchema)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResizeSchema.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResizeSchema.cs deleted file mode 100644 index be33ee73ef451..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResizeSchema.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Schema for Compute Instance resize. - public partial class ResizeSchema - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public ResizeSchema() - { - } - - /// Initializes a new instance of . - /// The name of the virtual machine size. - /// Keeps track of any properties unknown to the library. - internal ResizeSchema(string targetVmSize, IDictionary serializedAdditionalRawData) - { - TargetVmSize = targetVmSize; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The name of the virtual machine size. - public string TargetVmSize { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RollingInputData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RollingInputData.Serialization.cs index b428af659a974..61a6211bc43de 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RollingInputData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RollingInputData.Serialization.cs @@ -26,6 +26,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } writer.WriteStartObject(); + writer.WritePropertyName("windowOffset"u8); + writer.WriteStringValue(WindowOffset, "P"); + writer.WritePropertyName("windowSize"u8); + writer.WriteStringValue(WindowSize, "P"); if (Optional.IsDefined(PreprocessingComponentId)) { if (PreprocessingComponentId != null) @@ -38,10 +42,24 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteNull("preprocessingComponentId"); } } - writer.WritePropertyName("windowOffset"u8); - writer.WriteStringValue(WindowOffset, "P"); - writer.WritePropertyName("windowSize"u8); - writer.WriteStringValue(WindowSize, "P"); + writer.WritePropertyName("inputDataType"u8); + writer.WriteStringValue(InputDataType.ToString()); + if (Optional.IsDefined(DataContext)) + { + if (DataContext != null) + { + writer.WritePropertyName("dataContext"u8); + writer.WriteStringValue(DataContext); + } + else + { + writer.WriteNull("dataContext"); + } + } + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); if (Optional.IsCollectionDefined(Columns)) { if (Columns != null) @@ -60,24 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter writer.WriteNull("columns"); } } - if (Optional.IsDefined(DataContext)) - { - if (DataContext != null) - { - writer.WritePropertyName("dataContext"u8); - writer.WriteStringValue(DataContext); - } - else - { - writer.WriteNull("dataContext"); - } - } - writer.WritePropertyName("inputDataType"u8); - writer.WriteStringValue(InputDataType.ToString()); - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -116,28 +116,18 @@ internal static RollingInputData DeserializeRollingInputData(JsonElement element { return null; } - string preprocessingComponentId = default; TimeSpan windowOffset = default; TimeSpan windowSize = default; - IDictionary columns = default; - string dataContext = default; + string preprocessingComponentId = default; MonitoringInputDataType inputDataType = default; + string dataContext = default; JobInputType jobInputType = default; Uri uri = default; + IDictionary columns = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("preprocessingComponentId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - preprocessingComponentId = null; - continue; - } - preprocessingComponentId = property.Value.GetString(); - continue; - } if (property.NameEquals("windowOffset"u8)) { windowOffset = property.Value.GetTimeSpan("P"); @@ -148,19 +138,19 @@ internal static RollingInputData DeserializeRollingInputData(JsonElement element windowSize = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("columns"u8)) + if (property.NameEquals("preprocessingComponentId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - columns = null; + preprocessingComponentId = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - columns = dictionary; + preprocessingComponentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputDataType"u8)) + { + inputDataType = new MonitoringInputDataType(property.Value.GetString()); continue; } if (property.NameEquals("dataContext"u8)) @@ -173,11 +163,6 @@ internal static RollingInputData DeserializeRollingInputData(JsonElement element dataContext = property.Value.GetString(); continue; } - if (property.NameEquals("inputDataType"u8)) - { - inputDataType = new MonitoringInputDataType(property.Value.GetString()); - continue; - } if (property.NameEquals("jobInputType"u8)) { jobInputType = new JobInputType(property.Value.GetString()); @@ -188,6 +173,21 @@ internal static RollingInputData DeserializeRollingInputData(JsonElement element uri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("columns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + columns = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + columns = dictionary; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -195,15 +195,15 @@ internal static RollingInputData DeserializeRollingInputData(JsonElement element } serializedAdditionalRawData = rawDataDictionary; return new RollingInputData( - columns ?? new ChangeTrackingDictionary(), - dataContext, inputDataType, + dataContext, jobInputType, uri, + columns ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - preprocessingComponentId, windowOffset, - windowSize); + windowSize, + preprocessingComponentId); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RollingInputData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RollingInputData.cs index 119e830fadadc..09b458411659a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RollingInputData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RollingInputData.cs @@ -29,20 +29,20 @@ public RollingInputData(JobInputType jobInputType, Uri uri, TimeSpan windowOffse } /// Initializes a new instance of . - /// Mapping of column names to special uses. - /// The context metadata of the data source. /// [Required] Specifies the type of signal to monitor. + /// The context metadata of the data source. /// [Required] Specifies the type of job. /// [Required] Input Asset URI. + /// Mapping of column names to special uses. /// Keeps track of any properties unknown to the library. - /// Reference to the component asset used to preprocess the data. /// [Required] The time offset between the end of the data window and the monitor's current run time. /// [Required] The size of the rolling data window. - internal RollingInputData(IDictionary columns, string dataContext, MonitoringInputDataType inputDataType, JobInputType jobInputType, Uri uri, IDictionary serializedAdditionalRawData, string preprocessingComponentId, TimeSpan windowOffset, TimeSpan windowSize) : base(columns, dataContext, inputDataType, jobInputType, uri, serializedAdditionalRawData) + /// Reference to the component asset used to preprocess the data. + internal RollingInputData(MonitoringInputDataType inputDataType, string dataContext, JobInputType jobInputType, Uri uri, IDictionary columns, IDictionary serializedAdditionalRawData, TimeSpan windowOffset, TimeSpan windowSize, string preprocessingComponentId) : base(inputDataType, dataContext, jobInputType, uri, columns, serializedAdditionalRawData) { - PreprocessingComponentId = preprocessingComponentId; WindowOffset = windowOffset; WindowSize = windowSize; + PreprocessingComponentId = preprocessingComponentId; InputDataType = inputDataType; } @@ -51,11 +51,11 @@ internal RollingInputData() { } - /// Reference to the component asset used to preprocess the data. - public string PreprocessingComponentId { get; set; } /// [Required] The time offset between the end of the data window and the monitor's current run time. public TimeSpan WindowOffset { get; set; } /// [Required] The size of the rolling data window. public TimeSpan WindowSize { get; set; } + /// Reference to the component asset used to preprocess the data. + public string PreprocessingComponentId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleResourceArmPaginatedResult.Serialization.cs index e39e04c92a057..2c28dd7f7eb01 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static ScheduleResourceArmPaginatedResult DeserializeScheduleResourceAr { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static ScheduleResourceArmPaginatedResult DeserializeScheduleResourceAr 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 ScheduleResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new ScheduleResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleResourceArmPaginatedResult.cs index 9080186f772f3..e8578bd686d60 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal ScheduleResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of Schedule objects. If null, there are no additional pages. /// An array of objects of type Schedule. + /// The link to the next page of Schedule objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal ScheduleResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal ScheduleResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of Schedule objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type Schedule. public IReadOnlyList Value { get; } + /// The link to the next page of Schedule objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretExpiry.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretExpiry.Serialization.cs deleted file mode 100644 index 309ee71ea33a1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretExpiry.Serialization.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SecretExpiry : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SecretExpiry)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(ExpirableSecret)) - { - writer.WritePropertyName("expirableSecret"u8); - writer.WriteBooleanValue(ExpirableSecret.Value); - } - if (Optional.IsDefined(ExpireAfterHours)) - { - writer.WritePropertyName("expireAfterHours"u8); - writer.WriteNumberValue(ExpireAfterHours.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 - } - } - writer.WriteEndObject(); - } - - SecretExpiry 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(SecretExpiry)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSecretExpiry(document.RootElement, options); - } - - internal static SecretExpiry DeserializeSecretExpiry(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - bool? expirableSecret = default; - int? expireAfterHours = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("expirableSecret"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - expirableSecret = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("expireAfterHours"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - expireAfterHours = property.Value.GetInt32(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SecretExpiry(expirableSecret, expireAfterHours, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(SecretExpiry)} does not support writing '{options.Format}' format."); - } - } - - SecretExpiry 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 DeserializeSecretExpiry(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SecretExpiry)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretExpiry.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretExpiry.cs deleted file mode 100644 index cdb6e2f1079ce..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretExpiry.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Secret expiration configuration. - public partial class SecretExpiry - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public SecretExpiry() - { - } - - /// Initializes a new instance of . - /// Indicates if the secret is expirable. - /// Number of hours after which the secret will expire. - /// Keeps track of any properties unknown to the library. - internal SecretExpiry(bool? expirableSecret, int? expireAfterHours, IDictionary serializedAdditionalRawData) - { - ExpirableSecret = expirableSecret; - ExpireAfterHours = expireAfterHours; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Indicates if the secret is expirable. - public bool? ExpirableSecret { get; set; } - /// Number of hours after which the secret will expire. - public int? ExpireAfterHours { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointCapacityReservation.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointCapacityReservation.Serialization.cs deleted file mode 100644 index 554e4ef639657..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointCapacityReservation.Serialization.cs +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ServerlessEndpointCapacityReservation : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ServerlessEndpointCapacityReservation)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("capacityReservationGroupId"u8); - writer.WriteStringValue(CapacityReservationGroupId); - if (Optional.IsDefined(EndpointReservedCapacity)) - { - writer.WritePropertyName("endpointReservedCapacity"u8); - writer.WriteNumberValue(EndpointReservedCapacity.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 - } - } - writer.WriteEndObject(); - } - - ServerlessEndpointCapacityReservation 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(ServerlessEndpointCapacityReservation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeServerlessEndpointCapacityReservation(document.RootElement, options); - } - - internal static ServerlessEndpointCapacityReservation DeserializeServerlessEndpointCapacityReservation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string capacityReservationGroupId = default; - int? endpointReservedCapacity = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("capacityReservationGroupId"u8)) - { - capacityReservationGroupId = property.Value.GetString(); - continue; - } - if (property.NameEquals("endpointReservedCapacity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpointReservedCapacity = property.Value.GetInt32(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ServerlessEndpointCapacityReservation(capacityReservationGroupId, endpointReservedCapacity, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ServerlessEndpointCapacityReservation)} does not support writing '{options.Format}' format."); - } - } - - ServerlessEndpointCapacityReservation 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 DeserializeServerlessEndpointCapacityReservation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ServerlessEndpointCapacityReservation)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointCapacityReservation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointCapacityReservation.cs deleted file mode 100644 index 98f81305c7224..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointCapacityReservation.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ServerlessEndpointCapacityReservation. - public partial class ServerlessEndpointCapacityReservation - { - /// - /// 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 . - /// - /// is null. - public ServerlessEndpointCapacityReservation(string capacityReservationGroupId) - { - Argument.AssertNotNull(capacityReservationGroupId, nameof(capacityReservationGroupId)); - - CapacityReservationGroupId = capacityReservationGroupId; - } - - /// Initializes a new instance of . - /// - /// - /// Keeps track of any properties unknown to the library. - internal ServerlessEndpointCapacityReservation(string capacityReservationGroupId, int? endpointReservedCapacity, IDictionary serializedAdditionalRawData) - { - CapacityReservationGroupId = capacityReservationGroupId; - EndpointReservedCapacity = endpointReservedCapacity; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ServerlessEndpointCapacityReservation() - { - } - - /// Gets or sets the capacity reservation group id. - public string CapacityReservationGroupId { get; set; } - /// Gets or sets the endpoint reserved capacity. - public int? EndpointReservedCapacity { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointContentSafety.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointContentSafety.Serialization.cs deleted file mode 100644 index 4aa4b25d79b85..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointContentSafety.Serialization.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class ServerlessEndpointContentSafety : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ServerlessEndpointContentSafety)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("contentSafetyStatus"u8); - writer.WriteStringValue(ContentSafetyStatus.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 - } - } - writer.WriteEndObject(); - } - - ServerlessEndpointContentSafety 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(ServerlessEndpointContentSafety)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeServerlessEndpointContentSafety(document.RootElement, options); - } - - internal static ServerlessEndpointContentSafety DeserializeServerlessEndpointContentSafety(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ContentSafetyStatus contentSafetyStatus = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("contentSafetyStatus"u8)) - { - contentSafetyStatus = new ContentSafetyStatus(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ServerlessEndpointContentSafety(contentSafetyStatus, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ServerlessEndpointContentSafety)} does not support writing '{options.Format}' format."); - } - } - - ServerlessEndpointContentSafety 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 DeserializeServerlessEndpointContentSafety(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ServerlessEndpointContentSafety)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointContentSafety.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointContentSafety.cs deleted file mode 100644 index e6dca65e1513b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointContentSafety.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ServerlessEndpointContentSafety. - internal partial class ServerlessEndpointContentSafety - { - /// - /// 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 . - /// Specifies the status of content safety. - public ServerlessEndpointContentSafety(ContentSafetyStatus contentSafetyStatus) - { - ContentSafetyStatus = contentSafetyStatus; - } - - /// Initializes a new instance of . - /// Specifies the status of content safety. - /// Keeps track of any properties unknown to the library. - internal ServerlessEndpointContentSafety(ContentSafetyStatus contentSafetyStatus, IDictionary serializedAdditionalRawData) - { - ContentSafetyStatus = contentSafetyStatus; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ServerlessEndpointContentSafety() - { - } - - /// Specifies the status of content safety. - public ContentSafetyStatus ContentSafetyStatus { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointInferenceEndpoint.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointInferenceEndpoint.Serialization.cs deleted file mode 100644 index a6b10fe0200f5..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointInferenceEndpoint.Serialization.cs +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ServerlessEndpointInferenceEndpoint : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ServerlessEndpointInferenceEndpoint)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsCollectionDefined(Headers)) - { - writer.WritePropertyName("headers"u8); - writer.WriteStartObject(); - foreach (var item in Headers) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); - } - - ServerlessEndpointInferenceEndpoint 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(ServerlessEndpointInferenceEndpoint)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeServerlessEndpointInferenceEndpoint(document.RootElement, options); - } - - internal static ServerlessEndpointInferenceEndpoint DeserializeServerlessEndpointInferenceEndpoint(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyDictionary headers = default; - Uri uri = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("headers"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - headers = dictionary; - continue; - } - if (property.NameEquals("uri"u8)) - { - uri = new Uri(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ServerlessEndpointInferenceEndpoint(headers ?? new ChangeTrackingDictionary(), uri, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ServerlessEndpointInferenceEndpoint)} does not support writing '{options.Format}' format."); - } - } - - ServerlessEndpointInferenceEndpoint 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 DeserializeServerlessEndpointInferenceEndpoint(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ServerlessEndpointInferenceEndpoint)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointInferenceEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointInferenceEndpoint.cs deleted file mode 100644 index eb530c9162ab4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointInferenceEndpoint.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ServerlessEndpointInferenceEndpoint. - public partial class ServerlessEndpointInferenceEndpoint - { - /// - /// 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 . - /// - /// is null. - public ServerlessEndpointInferenceEndpoint(Uri uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Headers = new ChangeTrackingDictionary(); - Uri = uri; - } - - /// Initializes a new instance of . - /// Dictionary of <string>. - /// - /// Keeps track of any properties unknown to the library. - internal ServerlessEndpointInferenceEndpoint(IReadOnlyDictionary headers, Uri uri, IDictionary serializedAdditionalRawData) - { - Headers = headers; - Uri = uri; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ServerlessEndpointInferenceEndpoint() - { - } - - /// Dictionary of <string>. - public IReadOnlyDictionary Headers { get; } - /// Gets or sets the uri. - public Uri Uri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointModelSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointModelSettings.Serialization.cs deleted file mode 100644 index 33387b645913e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointModelSettings.Serialization.cs +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class ServerlessEndpointModelSettings : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ServerlessEndpointModelSettings)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("modelId"u8); - writer.WriteStringValue(ModelId); - 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 - } - } - writer.WriteEndObject(); - } - - ServerlessEndpointModelSettings 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(ServerlessEndpointModelSettings)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeServerlessEndpointModelSettings(document.RootElement, options); - } - - internal static ServerlessEndpointModelSettings DeserializeServerlessEndpointModelSettings(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string modelId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("modelId"u8)) - { - modelId = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ServerlessEndpointModelSettings(modelId, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ServerlessEndpointModelSettings)} does not support writing '{options.Format}' format."); - } - } - - ServerlessEndpointModelSettings 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 DeserializeServerlessEndpointModelSettings(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ServerlessEndpointModelSettings)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointModelSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointModelSettings.cs deleted file mode 100644 index 8971c72c55109..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointModelSettings.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ServerlessEndpointModelSettings. - internal partial class ServerlessEndpointModelSettings - { - /// - /// 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 . - /// - /// is null. - public ServerlessEndpointModelSettings(string modelId) - { - Argument.AssertNotNull(modelId, nameof(modelId)); - - ModelId = modelId; - } - - /// Initializes a new instance of . - /// - /// Keeps track of any properties unknown to the library. - internal ServerlessEndpointModelSettings(string modelId, IDictionary serializedAdditionalRawData) - { - ModelId = modelId; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ServerlessEndpointModelSettings() - { - } - - /// Gets or sets the model id. - public string ModelId { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointPatch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointPatch.Serialization.cs index df1c9acd0a4c2..fff983b42e84f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointPatch.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointPatch.Serialization.cs @@ -26,16 +26,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity, options); - } if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku, options); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + writer.WriteObjectValue(Identity, options); + } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -85,29 +85,29 @@ internal static ServerlessEndpointPatch DeserializeServerlessEndpointPatch(JsonE { return null; } - MachineLearningPartialManagedServiceIdentity identity = default; MachineLearningSkuPatch sku = default; + MachineLearningPartialManagedServiceIdentity identity = default; IDictionary tags = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) + if (property.NameEquals("sku"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - identity = MachineLearningPartialManagedServiceIdentity.DeserializeMachineLearningPartialManagedServiceIdentity(property.Value, options); + sku = MachineLearningSkuPatch.DeserializeMachineLearningSkuPatch(property.Value, options); continue; } - if (property.NameEquals("sku"u8)) + if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - sku = MachineLearningSkuPatch.DeserializeMachineLearningSkuPatch(property.Value, options); + identity = MachineLearningPartialManagedServiceIdentity.DeserializeMachineLearningPartialManagedServiceIdentity(property.Value, options); continue; } if (property.NameEquals("tags"u8)) @@ -130,7 +130,7 @@ internal static ServerlessEndpointPatch DeserializeServerlessEndpointPatch(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new ServerlessEndpointPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, identity, sku); + return new ServerlessEndpointPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, sku, identity); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointPatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointPatch.cs index 137336fae71e7..a37be451cc5bd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointPatch.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointPatch.cs @@ -21,17 +21,17 @@ public ServerlessEndpointPatch() /// Initializes a new instance of . /// Resource tags. /// Keeps track of any properties unknown to the library. - /// Managed service identity (system assigned and/or user assigned identities). /// Sku details required for ARM contract for Autoscaling. - internal ServerlessEndpointPatch(IDictionary tags, IDictionary serializedAdditionalRawData, MachineLearningPartialManagedServiceIdentity identity, MachineLearningSkuPatch sku) : base(tags, serializedAdditionalRawData) + /// Managed service identity (system assigned and/or user assigned identities). + internal ServerlessEndpointPatch(IDictionary tags, IDictionary serializedAdditionalRawData, MachineLearningSkuPatch sku, MachineLearningPartialManagedServiceIdentity identity) : base(tags, serializedAdditionalRawData) { - Identity = identity; Sku = sku; + Identity = identity; } - /// Managed service identity (system assigned and/or user assigned identities). - public MachineLearningPartialManagedServiceIdentity Identity { get; set; } /// Sku details required for ARM contract for Autoscaling. public MachineLearningSkuPatch Sku { get; set; } + /// Managed service identity (system assigned and/or user assigned identities). + public MachineLearningPartialManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointProperties.Serialization.cs index dbf0dcccaa49c..364e09f1104c4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointProperties.Serialization.cs @@ -26,25 +26,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } writer.WriteStartObject(); - writer.WritePropertyName("authMode"u8); - writer.WriteStringValue(AuthMode.ToString()); - if (Optional.IsDefined(ContentSafety)) + if (Optional.IsDefined(ModelSettings)) { - if (ContentSafety != null) + if (ModelSettings != null) { - writer.WritePropertyName("contentSafety"u8); - writer.WriteObjectValue(ContentSafety, options); + writer.WritePropertyName("modelSettings"u8); + writer.WriteObjectValue(ModelSettings, options); } else { - writer.WriteNull("contentSafety"); + writer.WriteNull("modelSettings"); } } - if (options.Format != "W" && Optional.IsDefined(EndpointState)) - { - writer.WritePropertyName("endpointState"u8); - writer.WriteStringValue(EndpointState.Value.ToString()); - } + writer.WritePropertyName("authMode"u8); + writer.WriteStringValue(AuthMode.ToString()); if (options.Format != "W" && Optional.IsDefined(InferenceEndpoint)) { if (InferenceEndpoint != null) @@ -57,6 +52,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteNull("inferenceEndpoint"); } } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(EndpointState)) + { + writer.WritePropertyName("endpointState"u8); + writer.WriteStringValue(EndpointState.Value.ToString()); + } if (options.Format != "W" && Optional.IsDefined(MarketplaceSubscriptionId)) { if (MarketplaceSubscriptionId != null) @@ -69,23 +74,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteNull("marketplaceSubscriptionId"); } } - if (Optional.IsDefined(ModelSettings)) + if (Optional.IsDefined(ContentSafety)) { - if (ModelSettings != null) + if (ContentSafety != null) { - writer.WritePropertyName("modelSettings"u8); - writer.WriteObjectValue(ModelSettings, options); + writer.WritePropertyName("contentSafety"u8); + writer.WriteObjectValue(ContentSafety, options); } else { - writer.WriteNull("modelSettings"); + writer.WriteNull("contentSafety"); } } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -124,49 +124,58 @@ internal static ServerlessEndpointProperties DeserializeServerlessEndpointProper { return null; } + ModelSettings modelSettings = default; ServerlessInferenceEndpointAuthMode authMode = default; - ContentSafety contentSafety = default; - ServerlessEndpointState? endpointState = default; ServerlessInferenceEndpoint inferenceEndpoint = default; - string marketplaceSubscriptionId = default; - ModelSettings modelSettings = default; MachineLearningEndpointProvisioningState? provisioningState = default; + ServerlessEndpointState? endpointState = default; + string marketplaceSubscriptionId = default; + ContentSafety contentSafety = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("modelSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + modelSettings = null; + continue; + } + modelSettings = ModelSettings.DeserializeModelSettings(property.Value, options); + continue; + } if (property.NameEquals("authMode"u8)) { authMode = new ServerlessInferenceEndpointAuthMode(property.Value.GetString()); continue; } - if (property.NameEquals("contentSafety"u8)) + if (property.NameEquals("inferenceEndpoint"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - contentSafety = null; + inferenceEndpoint = null; continue; } - contentSafety = ContentSafety.DeserializeContentSafety(property.Value, options); + inferenceEndpoint = ServerlessInferenceEndpoint.DeserializeServerlessInferenceEndpoint(property.Value, options); continue; } - if (property.NameEquals("endpointState"u8)) + if (property.NameEquals("provisioningState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - endpointState = new ServerlessEndpointState(property.Value.GetString()); + provisioningState = new MachineLearningEndpointProvisioningState(property.Value.GetString()); continue; } - if (property.NameEquals("inferenceEndpoint"u8)) + if (property.NameEquals("endpointState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - inferenceEndpoint = null; continue; } - inferenceEndpoint = ServerlessInferenceEndpoint.DeserializeServerlessInferenceEndpoint(property.Value, options); + endpointState = new ServerlessEndpointState(property.Value.GetString()); continue; } if (property.NameEquals("marketplaceSubscriptionId"u8)) @@ -179,23 +188,14 @@ internal static ServerlessEndpointProperties DeserializeServerlessEndpointProper marketplaceSubscriptionId = property.Value.GetString(); continue; } - if (property.NameEquals("modelSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - modelSettings = null; - continue; - } - modelSettings = ModelSettings.DeserializeModelSettings(property.Value, options); - continue; - } - if (property.NameEquals("provisioningState"u8)) + if (property.NameEquals("contentSafety"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + contentSafety = null; continue; } - provisioningState = new MachineLearningEndpointProvisioningState(property.Value.GetString()); + contentSafety = ContentSafety.DeserializeContentSafety(property.Value, options); continue; } if (options.Format != "W") @@ -205,13 +205,13 @@ internal static ServerlessEndpointProperties DeserializeServerlessEndpointProper } serializedAdditionalRawData = rawDataDictionary; return new ServerlessEndpointProperties( + modelSettings, authMode, - contentSafety, - endpointState, inferenceEndpoint, - marketplaceSubscriptionId, - modelSettings, provisioningState, + endpointState, + marketplaceSubscriptionId, + contentSafety, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointProperties.cs index e3db0035b547c..749efb075a196 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointProperties.cs @@ -53,23 +53,23 @@ public ServerlessEndpointProperties(ServerlessInferenceEndpointAuthMode authMode } /// Initializes a new instance of . + /// The model settings (model id) for the model being serviced on the ServerlessEndpoint. /// [Required] Specifies the authentication mode for the Serverless endpoint. - /// Specifies the content safety options. If omitted, the default content safety settings will be configured. - /// The current state of the ServerlessEndpoint. /// The inference uri to target when making requests against the serverless endpoint. - /// The MarketplaceSubscription Azure ID associated to this ServerlessEndpoint. - /// The model settings (model id) for the model being serviced on the ServerlessEndpoint. /// Provisioning state for the endpoint. + /// The current state of the ServerlessEndpoint. + /// The MarketplaceSubscription Azure ID associated to this ServerlessEndpoint. + /// Specifies the content safety options. If omitted, the default content safety settings will be configured. /// Keeps track of any properties unknown to the library. - internal ServerlessEndpointProperties(ServerlessInferenceEndpointAuthMode authMode, ContentSafety contentSafety, ServerlessEndpointState? endpointState, ServerlessInferenceEndpoint inferenceEndpoint, string marketplaceSubscriptionId, ModelSettings modelSettings, MachineLearningEndpointProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + internal ServerlessEndpointProperties(ModelSettings modelSettings, ServerlessInferenceEndpointAuthMode authMode, ServerlessInferenceEndpoint inferenceEndpoint, MachineLearningEndpointProvisioningState? provisioningState, ServerlessEndpointState? endpointState, string marketplaceSubscriptionId, ContentSafety contentSafety, IDictionary serializedAdditionalRawData) { + ModelSettings = modelSettings; AuthMode = authMode; - ContentSafety = contentSafety; - EndpointState = endpointState; InferenceEndpoint = inferenceEndpoint; - MarketplaceSubscriptionId = marketplaceSubscriptionId; - ModelSettings = modelSettings; ProvisioningState = provisioningState; + EndpointState = endpointState; + MarketplaceSubscriptionId = marketplaceSubscriptionId; + ContentSafety = contentSafety; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -78,26 +78,6 @@ internal ServerlessEndpointProperties() { } - /// [Required] Specifies the authentication mode for the Serverless endpoint. - public ServerlessInferenceEndpointAuthMode AuthMode { get; set; } - /// Specifies the content safety options. If omitted, the default content safety settings will be configured. - internal ContentSafety ContentSafety { get; set; } - /// [Required] Specifies the status of content safety. - public ContentSafetyStatus? ContentSafetyStatus - { - get => ContentSafety is null ? default(ContentSafetyStatus?) : ContentSafety.ContentSafetyStatus; - set - { - ContentSafety = value.HasValue ? new ContentSafety(value.Value) : null; - } - } - - /// The current state of the ServerlessEndpoint. - public ServerlessEndpointState? EndpointState { get; } - /// The inference uri to target when making requests against the serverless endpoint. - public ServerlessInferenceEndpoint InferenceEndpoint { get; } - /// The MarketplaceSubscription Azure ID associated to this ServerlessEndpoint. - public string MarketplaceSubscriptionId { get; } /// The model settings (model id) for the model being serviced on the ServerlessEndpoint. internal ModelSettings ModelSettings { get; set; } /// The unique model identifier that this ServerlessEndpoint should provision. @@ -112,7 +92,26 @@ public string ModelId } } + /// [Required] Specifies the authentication mode for the Serverless endpoint. + public ServerlessInferenceEndpointAuthMode AuthMode { get; set; } + /// The inference uri to target when making requests against the serverless endpoint. + public ServerlessInferenceEndpoint InferenceEndpoint { get; } /// Provisioning state for the endpoint. public MachineLearningEndpointProvisioningState? ProvisioningState { get; } + /// The current state of the ServerlessEndpoint. + public ServerlessEndpointState? EndpointState { get; } + /// The MarketplaceSubscription Azure ID associated to this ServerlessEndpoint. + public string MarketplaceSubscriptionId { get; } + /// Specifies the content safety options. If omitted, the default content safety settings will be configured. + internal ContentSafety ContentSafety { get; set; } + /// [Required] Specifies the status of content safety. + public ContentSafetyStatus? ContentSafetyStatus + { + get => ContentSafety is null ? default(ContentSafetyStatus?) : ContentSafety.ContentSafetyStatus; + set + { + ContentSafety = value.HasValue ? new ContentSafety(value.Value) : null; + } + } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointResourceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointResourceProperties.Serialization.cs deleted file mode 100644 index 52b5229b2826d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointResourceProperties.Serialization.cs +++ /dev/null @@ -1,398 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ServerlessEndpointResourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ServerlessEndpointResourceProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(AuthMode)) - { - writer.WritePropertyName("authMode"u8); - writer.WriteStringValue(AuthMode.Value.ToString()); - } - if (Optional.IsDefined(CapacityReservation)) - { - writer.WritePropertyName("capacityReservation"u8); - writer.WriteObjectValue(CapacityReservation, options); - } - if (Optional.IsDefined(ContentSafety)) - { - writer.WritePropertyName("contentSafety"u8); - writer.WriteObjectValue(ContentSafety, options); - } - if (Optional.IsDefined(EndpointState)) - { - writer.WritePropertyName("endpointState"u8); - writer.WriteStringValue(EndpointState.Value.ToString()); - } - if (Optional.IsDefined(InferenceEndpoint)) - { - writer.WritePropertyName("inferenceEndpoint"u8); - writer.WriteObjectValue(InferenceEndpoint, options); - } - if (Optional.IsDefined(MarketplaceSubscriptionId)) - { - writer.WritePropertyName("marketplaceSubscriptionId"u8); - writer.WriteStringValue(MarketplaceSubscriptionId); - } - if (Optional.IsDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Metadata); -#else - using (JsonDocument document = JsonDocument.Parse(Metadata)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - if (Optional.IsDefined(ModelSettings)) - { - writer.WritePropertyName("modelSettings"u8); - writer.WriteObjectValue(ModelSettings, options); - } - if (Optional.IsDefined(Offer)) - { - writer.WritePropertyName("offer"u8); - writer.WriteObjectValue(Offer, options); - } - if (Optional.IsDefined(AssociatedResourceId)) - { - writer.WritePropertyName("associatedResourceId"u8); - writer.WriteStringValue(AssociatedResourceId); - } - if (Optional.IsCollectionDefined(Deployments)) - { - writer.WritePropertyName("deployments"u8); - writer.WriteStartArray(); - foreach (var item in Deployments) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (Optional.IsDefined(EndpointUri)) - { - writer.WritePropertyName("endpointUri"u8); - writer.WriteStringValue(EndpointUri.AbsoluteUri); - } - if (Optional.IsDefined(FailureReason)) - { - writer.WritePropertyName("failureReason"u8); - writer.WriteStringValue(FailureReason); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(ShouldCreateAiServicesEndpoint)) - { - writer.WritePropertyName("shouldCreateAiServicesEndpoint"u8); - writer.WriteBooleanValue(ShouldCreateAiServicesEndpoint.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 - } - } - writer.WriteEndObject(); - } - - ServerlessEndpointResourceProperties 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(ServerlessEndpointResourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeServerlessEndpointResourceProperties(document.RootElement, options); - } - - internal static ServerlessEndpointResourceProperties DeserializeServerlessEndpointResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ServerlessInferenceEndpointAuthMode? authMode = default; - ServerlessEndpointCapacityReservation capacityReservation = default; - ServerlessEndpointContentSafety contentSafety = default; - ServerlessEndpointState? endpointState = default; - ServerlessEndpointInferenceEndpoint inferenceEndpoint = default; - string marketplaceSubscriptionId = default; - BinaryData metadata = default; - ServerlessEndpointModelSettings modelSettings = default; - ServerlessOffer offer = default; - ResourceIdentifier associatedResourceId = default; - IList deployments = default; - EndpointType endpointType = default; - Uri endpointUri = default; - string failureReason = default; - AzureLocation? location = default; - string name = default; - DefaultResourceProvisioningState? provisioningState = default; - bool? shouldCreateAiServicesEndpoint = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authMode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - authMode = new ServerlessInferenceEndpointAuthMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("capacityReservation"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - capacityReservation = ServerlessEndpointCapacityReservation.DeserializeServerlessEndpointCapacityReservation(property.Value, options); - continue; - } - if (property.NameEquals("contentSafety"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - contentSafety = ServerlessEndpointContentSafety.DeserializeServerlessEndpointContentSafety(property.Value, options); - continue; - } - if (property.NameEquals("endpointState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpointState = new ServerlessEndpointState(property.Value.GetString()); - continue; - } - if (property.NameEquals("inferenceEndpoint"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - inferenceEndpoint = ServerlessEndpointInferenceEndpoint.DeserializeServerlessEndpointInferenceEndpoint(property.Value, options); - continue; - } - if (property.NameEquals("marketplaceSubscriptionId"u8)) - { - marketplaceSubscriptionId = property.Value.GetString(); - continue; - } - if (property.NameEquals("metadata"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - metadata = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("modelSettings"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - modelSettings = ServerlessEndpointModelSettings.DeserializeServerlessEndpointModelSettings(property.Value, options); - continue; - } - if (property.NameEquals("offer"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - offer = ServerlessOffer.DeserializeServerlessOffer(property.Value, options); - continue; - } - if (property.NameEquals("associatedResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - associatedResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("deployments"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(item, options)); - } - deployments = array; - continue; - } - if (property.NameEquals("endpointType"u8)) - { - endpointType = new EndpointType(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpointUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpointUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("failureReason"u8)) - { - failureReason = property.Value.GetString(); - continue; - } - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new DefaultResourceProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("shouldCreateAiServicesEndpoint"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - shouldCreateAiServicesEndpoint = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ServerlessEndpointResourceProperties( - associatedResourceId, - deployments ?? new ChangeTrackingList(), - endpointType, - endpointUri, - failureReason, - location, - name, - provisioningState, - shouldCreateAiServicesEndpoint, - serializedAdditionalRawData, - authMode, - capacityReservation, - contentSafety, - endpointState, - inferenceEndpoint, - marketplaceSubscriptionId, - metadata, - modelSettings, - offer); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ServerlessEndpointResourceProperties)} does not support writing '{options.Format}' format."); - } - } - - ServerlessEndpointResourceProperties 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 DeserializeServerlessEndpointResourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ServerlessEndpointResourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointResourceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointResourceProperties.cs deleted file mode 100644 index 3a4142dae258c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointResourceProperties.cs +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ServerlessEndpointResourceProperties. - public partial class ServerlessEndpointResourceProperties : EndpointResourceProperties - { - /// Initializes a new instance of . - public ServerlessEndpointResourceProperties() - { - EndpointType = EndpointType.ServerlessEndpoint; - } - - /// Initializes a new instance of . - /// Byo resource id for creating the built-in model service endpoints. - /// Deployments info. - /// Type of the endpoint. - /// Uri of the endpoint. - /// The failure reason if the creation failed. - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace - /// - /// Name of the endpoint. - /// Read-only provision state status property. - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - /// Keeps track of any properties unknown to the library. - /// - /// - /// - /// State of the Serverless Endpoint. - /// - /// - /// Anything. - /// - /// - internal ServerlessEndpointResourceProperties(ResourceIdentifier associatedResourceId, IList deployments, EndpointType endpointType, Uri endpointUri, string failureReason, AzureLocation? location, string name, DefaultResourceProvisioningState? provisioningState, bool? shouldCreateAiServicesEndpoint, IDictionary serializedAdditionalRawData, ServerlessInferenceEndpointAuthMode? authMode, ServerlessEndpointCapacityReservation capacityReservation, ServerlessEndpointContentSafety contentSafety, ServerlessEndpointState? endpointState, ServerlessEndpointInferenceEndpoint inferenceEndpoint, string marketplaceSubscriptionId, BinaryData metadata, ServerlessEndpointModelSettings modelSettings, ServerlessOffer offer) : base(associatedResourceId, deployments, endpointType, endpointUri, failureReason, location, name, provisioningState, shouldCreateAiServicesEndpoint, serializedAdditionalRawData) - { - AuthMode = authMode; - CapacityReservation = capacityReservation; - ContentSafety = contentSafety; - EndpointState = endpointState; - InferenceEndpoint = inferenceEndpoint; - MarketplaceSubscriptionId = marketplaceSubscriptionId; - Metadata = metadata; - ModelSettings = modelSettings; - Offer = offer; - EndpointType = endpointType; - } - - /// Gets or sets the auth mode. - public ServerlessInferenceEndpointAuthMode? AuthMode { get; set; } - /// Gets or sets the capacity reservation. - public ServerlessEndpointCapacityReservation CapacityReservation { get; set; } - /// Gets or sets the content safety. - internal ServerlessEndpointContentSafety ContentSafety { get; set; } - /// Specifies the status of content safety. - public ContentSafetyStatus? ContentSafetyStatus - { - get => ContentSafety is null ? default(ContentSafetyStatus?) : ContentSafety.ContentSafetyStatus; - set - { - ContentSafety = value.HasValue ? new ServerlessEndpointContentSafety(value.Value) : null; - } - } - - /// State of the Serverless Endpoint. - public ServerlessEndpointState? EndpointState { get; set; } - /// Gets or sets the inference endpoint. - public ServerlessEndpointInferenceEndpoint InferenceEndpoint { get; set; } - /// Gets or sets the marketplace subscription id. - public string MarketplaceSubscriptionId { get; set; } - /// - /// Anything - /// - /// To assign an object to 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" }. - /// - /// - /// - /// - public BinaryData Metadata { get; set; } - /// Gets or sets the model settings. - internal ServerlessEndpointModelSettings ModelSettings { get; set; } - /// Gets or sets the model id. - public string ModelId - { - get => ModelSettings is null ? default : ModelSettings.ModelId; - set => ModelSettings = new ServerlessEndpointModelSettings(value); - } - - /// Gets or sets the offer. - public ServerlessOffer Offer { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointTrackedResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointTrackedResourceArmPaginatedResult.Serialization.cs index dc873f503bf42..546606ccbf7b4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointTrackedResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointTrackedResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8J } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8J } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static ServerlessEndpointTrackedResourceArmPaginatedResult DeserializeS { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static ServerlessEndpointTrackedResourceArmPaginatedResult DeserializeS 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 ServerlessEndpointTrackedResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new ServerlessEndpointTrackedResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointTrackedResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointTrackedResourceArmPaginatedResult.cs index e51f01c2ded01..6e55852b19d37 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointTrackedResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessEndpointTrackedResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal ServerlessEndpointTrackedResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of ServerlessEndpoint objects. If null, there are no additional pages. /// An array of objects of type ServerlessEndpoint. + /// The link to the next page of ServerlessEndpoint objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal ServerlessEndpointTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal ServerlessEndpointTrackedResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of ServerlessEndpoint objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type ServerlessEndpoint. public IReadOnlyList Value { get; } + /// The link to the next page of ServerlessEndpoint objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessInferenceEndpoint.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessInferenceEndpoint.Serialization.cs index 18fda5b97b887..4c4c45df06836 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessInferenceEndpoint.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessInferenceEndpoint.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR } writer.WriteStartObject(); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); if (options.Format != "W" && Optional.IsCollectionDefined(Headers)) { if (Headers != null) @@ -44,8 +46,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WriteNull("headers"); } } - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -84,12 +84,17 @@ internal static ServerlessInferenceEndpoint DeserializeServerlessInferenceEndpoi { return null; } - IReadOnlyDictionary headers = default; Uri uri = default; + IReadOnlyDictionary headers = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("uri"u8)) + { + uri = new Uri(property.Value.GetString()); + continue; + } if (property.NameEquals("headers"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -105,18 +110,13 @@ internal static ServerlessInferenceEndpoint DeserializeServerlessInferenceEndpoi headers = dictionary; continue; } - if (property.NameEquals("uri"u8)) - { - uri = new Uri(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new ServerlessInferenceEndpoint(headers ?? new ChangeTrackingDictionary(), uri, serializedAdditionalRawData); + return new ServerlessInferenceEndpoint(uri, headers ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessInferenceEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessInferenceEndpoint.cs index 759d80976d6d6..3767d8385867b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessInferenceEndpoint.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessInferenceEndpoint.cs @@ -52,18 +52,18 @@ internal ServerlessInferenceEndpoint(Uri uri) { Argument.AssertNotNull(uri, nameof(uri)); - Headers = new ChangeTrackingDictionary(); Uri = uri; + Headers = new ChangeTrackingDictionary(); } /// Initializes a new instance of . - /// Specifies any required headers to target this serverless endpoint. /// [Required] The inference uri to target when making requests against the Serverless Endpoint. + /// Specifies any required headers to target this serverless endpoint. /// Keeps track of any properties unknown to the library. - internal ServerlessInferenceEndpoint(IReadOnlyDictionary headers, Uri uri, IDictionary serializedAdditionalRawData) + internal ServerlessInferenceEndpoint(Uri uri, IReadOnlyDictionary headers, IDictionary serializedAdditionalRawData) { - Headers = headers; Uri = uri; + Headers = headers; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -72,9 +72,9 @@ internal ServerlessInferenceEndpoint() { } - /// Specifies any required headers to target this serverless endpoint. - public IReadOnlyDictionary Headers { get; } /// [Required] The inference uri to target when making requests against the Serverless Endpoint. public Uri Uri { get; } + /// Specifies any required headers to target this serverless endpoint. + public IReadOnlyDictionary Headers { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessOffer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessOffer.Serialization.cs deleted file mode 100644 index 3d5ffbd62a5df..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessOffer.Serialization.cs +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ServerlessOffer : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ServerlessOffer)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("offerName"u8); - writer.WriteStringValue(OfferName); - writer.WritePropertyName("publisher"u8); - writer.WriteStringValue(Publisher); - 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 - } - } - writer.WriteEndObject(); - } - - ServerlessOffer 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(ServerlessOffer)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeServerlessOffer(document.RootElement, options); - } - - internal static ServerlessOffer DeserializeServerlessOffer(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string offerName = default; - string publisher = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("offerName"u8)) - { - offerName = property.Value.GetString(); - continue; - } - if (property.NameEquals("publisher"u8)) - { - publisher = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ServerlessOffer(offerName, publisher, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(ServerlessOffer)} does not support writing '{options.Format}' format."); - } - } - - ServerlessOffer 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 DeserializeServerlessOffer(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ServerlessOffer)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessOffer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessOffer.cs deleted file mode 100644 index faf4d027440c9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServerlessOffer.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ServerlessOffer. - public partial class ServerlessOffer - { - /// - /// 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 . - /// - /// - /// or is null. - public ServerlessOffer(string offerName, string publisher) - { - Argument.AssertNotNull(offerName, nameof(offerName)); - Argument.AssertNotNull(publisher, nameof(publisher)); - - OfferName = offerName; - Publisher = publisher; - } - - /// Initializes a new instance of . - /// - /// - /// Keeps track of any properties unknown to the library. - internal ServerlessOffer(string offerName, string publisher, IDictionary serializedAdditionalRawData) - { - OfferName = offerName; - Publisher = publisher; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ServerlessOffer() - { - } - - /// Gets or sets the offer name. - public string OfferName { get; set; } - /// Gets or sets the publisher. - public string Publisher { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceAccountKeyName.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceAccountKeyName.cs deleted file mode 100644 index 651f2dd032cf7..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceAccountKeyName.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ServiceAccountKeyName. - public readonly partial struct ServiceAccountKeyName : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ServiceAccountKeyName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string Key1Value = "Key1"; - private const string Key2Value = "Key2"; - - /// Key1. - public static ServiceAccountKeyName Key1 { get; } = new ServiceAccountKeyName(Key1Value); - /// Key2. - public static ServiceAccountKeyName Key2 { get; } = new ServiceAccountKeyName(Key2Value); - /// Determines if two values are the same. - public static bool operator ==(ServiceAccountKeyName left, ServiceAccountKeyName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ServiceAccountKeyName left, ServiceAccountKeyName right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ServiceAccountKeyName(string value) => new ServiceAccountKeyName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ServiceAccountKeyName other && Equals(other); - /// - public bool Equals(ServiceAccountKeyName 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/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceManagedResourcesSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceManagedResourcesSettings.cs index e9ca5009bffd2..b59a8940907ff 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceManagedResourcesSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceManagedResourcesSettings.cs @@ -51,7 +51,7 @@ public ServiceManagedResourcesSettings() } /// Initializes a new instance of . - /// + /// The settings for the service managed cosmosdb account. /// Keeps track of any properties unknown to the library. internal ServiceManagedResourcesSettings(CosmosDbSettings cosmosDb, IDictionary serializedAdditionalRawData) { @@ -59,9 +59,9 @@ internal ServiceManagedResourcesSettings(CosmosDbSettings cosmosDb, IDictionary< _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets or sets the cosmos db. + /// The settings for the service managed cosmosdb account. internal CosmosDbSettings CosmosDb { get; set; } - /// Gets or sets the cosmos db collections throughput. + /// The throughput of the collections in cosmosdb database. public int? CosmosDbCollectionsThroughput { get => CosmosDb is null ? default : CosmosDb.CollectionsThroughput; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.Serialization.cs index 6be65baab1336..9737ff18d77ed 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.Serialization.cs @@ -43,11 +43,6 @@ void IJsonModel.Write(Utf writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -63,6 +58,11 @@ void IJsonModel.Write(Utf writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -74,16 +74,6 @@ void IJsonModel.Write(Utf } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -94,15 +84,15 @@ void IJsonModel.Write(Utf } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -146,16 +136,14 @@ internal static ServicePrincipalAuthTypeWorkspaceConnectionProperties Deserializ MachineLearningConnectionAuthType authType = default; MachineLearningConnectionCategory? category = default; ResourceIdentifier createdByWorkspaceArmId = default; - string error = default; DateTimeOffset? expiryTime = default; ConnectionGroup? group = default; bool? isSharedToAll = default; + string target = default; IDictionary metadata = default; - ManagedPERequirement? peRequirement = default; - ManagedPEStatus? peStatus = default; IList sharedUserList = default; - string target = default; - bool? useWorkspaceManagedIdentity = default; + string value = default; + MachineLearningValueFormat? valueFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -192,11 +180,6 @@ internal static ServicePrincipalAuthTypeWorkspaceConnectionProperties Deserializ createdByWorkspaceArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } if (property.NameEquals("expiryTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -224,6 +207,11 @@ internal static ServicePrincipalAuthTypeWorkspaceConnectionProperties Deserializ isSharedToAll = property.Value.GetBoolean(); continue; } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -238,24 +226,6 @@ internal static ServicePrincipalAuthTypeWorkspaceConnectionProperties Deserializ metadata = dictionary; continue; } - if (property.NameEquals("peRequirement"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peRequirement = new ManagedPERequirement(property.Value.GetString()); - continue; - } - if (property.NameEquals("peStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peStatus = new ManagedPEStatus(property.Value.GetString()); - continue; - } if (property.NameEquals("sharedUserList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -270,18 +240,18 @@ internal static ServicePrincipalAuthTypeWorkspaceConnectionProperties Deserializ sharedUserList = array; continue; } - if (property.NameEquals("target"u8)) + if (property.NameEquals("value"u8)) { - target = property.Value.GetString(); + value = property.Value.GetString(); continue; } - if (property.NameEquals("useWorkspaceManagedIdentity"u8)) + if (property.NameEquals("valueFormat"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - useWorkspaceManagedIdentity = property.Value.GetBoolean(); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } if (options.Format != "W") @@ -294,16 +264,14 @@ internal static ServicePrincipalAuthTypeWorkspaceConnectionProperties Deserializ authType, category, createdByWorkspaceArmId, - error, expiryTime, group, isSharedToAll, + target, metadata ?? new ChangeTrackingDictionary(), - peRequirement, - peStatus, sharedUserList ?? new ChangeTrackingList(), - target, - useWorkspaceManagedIdentity, + value, + valueFormat, serializedAdditionalRawData, credentials); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.cs index d23a13d1d53ea..10b02ab4620d4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.cs @@ -24,19 +24,17 @@ public ServicePrincipalAuthTypeWorkspaceConnectionProperties() /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. /// - internal ServicePrincipalAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData, WorkspaceConnectionServicePrincipal credentials) : base(authType, category, createdByWorkspaceArmId, error, expiryOn, group, isSharedToAll, metadata, peRequirement, peStatus, sharedUserList, target, useWorkspaceManagedIdentity, serializedAdditionalRawData) + internal ServicePrincipalAuthTypeWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData, WorkspaceConnectionServicePrincipal credentials) : base(authType, category, createdByWorkspaceArmId, expiryOn, group, isSharedToAll, target, metadata, sharedUserList, value, valueFormat, serializedAdditionalRawData) { Credentials = credentials; AuthType = authType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.Serialization.cs index 899a9cd602418..e3e25ed2f533b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.Serialization.cs @@ -36,16 +36,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.Value.ToString()); } - if (options.Format != "W" && Optional.IsCollectionDefined(ParentRuleNames)) - { - writer.WritePropertyName("parentRuleNames"u8); - writer.WriteStartArray(); - foreach (var item in ParentRuleNames) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -93,7 +83,6 @@ internal static ServiceTagOutboundRule DeserializeServiceTagOutboundRule(JsonEle } ServiceTagDestination destination = default; OutboundRuleCategory? category = default; - IReadOnlyList parentRuleNames = default; OutboundRuleStatus? status = default; OutboundRuleType type = default; IDictionary serializedAdditionalRawData = default; @@ -118,20 +107,6 @@ internal static ServiceTagOutboundRule DeserializeServiceTagOutboundRule(JsonEle category = new OutboundRuleCategory(property.Value.GetString()); continue; } - if (property.NameEquals("parentRuleNames"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - parentRuleNames = array; - continue; - } if (property.NameEquals("status"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -152,13 +127,7 @@ internal static ServiceTagOutboundRule DeserializeServiceTagOutboundRule(JsonEle } } serializedAdditionalRawData = rawDataDictionary; - return new ServiceTagOutboundRule( - category, - parentRuleNames ?? new ChangeTrackingList(), - status, - type, - serializedAdditionalRawData, - destination); + return new ServiceTagOutboundRule(category, status, type, serializedAdditionalRawData, destination); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.cs index 91e02ffc49d27..3044028f3dbff 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceTagOutboundRule.cs @@ -21,12 +21,11 @@ public ServiceTagOutboundRule() /// Initializes a new instance of . /// Category of a managed network Outbound Rule of a machine learning workspace. - /// /// Type of a managed network Outbound Rule of a machine learning workspace. /// Type of a managed network Outbound Rule of a machine learning workspace. /// Keeps track of any properties unknown to the library. /// Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace. - internal ServiceTagOutboundRule(OutboundRuleCategory? category, IReadOnlyList parentRuleNames, OutboundRuleStatus? status, OutboundRuleType outboundRuleType, IDictionary serializedAdditionalRawData, ServiceTagDestination destination) : base(category, parentRuleNames, status, outboundRuleType, serializedAdditionalRawData) + internal ServiceTagOutboundRule(OutboundRuleCategory? category, OutboundRuleStatus? status, OutboundRuleType outboundRuleType, IDictionary serializedAdditionalRawData, ServiceTagDestination destination) : base(category, status, outboundRuleType, serializedAdditionalRawData) { Destination = destination; OutboundRuleType = outboundRuleType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResourceArmPaginatedResult.Serialization.cs index 2dd2d99d3b25a..27e6ea887ae9e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static SkuResourceArmPaginatedResult DeserializeSkuResourceArmPaginated { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static SkuResourceArmPaginatedResult DeserializeSkuResourceArmPaginated 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 SkuResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new SkuResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResourceArmPaginatedResult.cs index 1d38ad332bd07..5e52ac69d3923 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal SkuResourceArmPaginatedResult() } /// Initializes a new instance of . - /// The link to the next page of SkuResource objects. If null, there are no additional pages. /// An array of objects of type SkuResource. + /// The link to the next page of SkuResource objects. If null, there are no additional pages. /// Keeps track of any properties unknown to the library. - internal SkuResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal SkuResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page of SkuResource objects. If null, there are no additional pages. - public string NextLink { get; } /// An array of objects of type SkuResource. public IReadOnlyList Value { get; } + /// The link to the next page of SkuResource objects. If null, there are no additional pages. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.Serialization.cs index 08ed4c9ccfa9f..5e6cdf43e6c7c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.Serialization.cs @@ -26,21 +26,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Archives)) + if (Optional.IsDefined(Resources)) { - if (Archives != null) + if (Resources != null) { - writer.WritePropertyName("archives"u8); - writer.WriteStartArray(); - foreach (var item in Archives) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); + writer.WritePropertyName("resources"u8); + writer.WriteObjectValue(Resources, options); } else { - writer.WriteNull("archives"); + writer.WriteNull("resources"); } } if (Optional.IsDefined(Args)) @@ -57,24 +52,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } writer.WritePropertyName("codeId"u8); writer.WriteStringValue(CodeId); - if (Optional.IsCollectionDefined(Conf)) - { - if (Conf != null) - { - writer.WritePropertyName("conf"u8); - writer.WriteStartObject(); - foreach (var item in Conf) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("conf"); - } - } writer.WritePropertyName("entry"u8); writer.WriteObjectValue(Entry, options); if (Optional.IsDefined(EnvironmentId)) @@ -89,57 +66,57 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteNull("environmentId"); } } - if (Optional.IsCollectionDefined(EnvironmentVariables)) + if (Optional.IsCollectionDefined(Inputs)) { - if (EnvironmentVariables != null) + if (Inputs != null) { - writer.WritePropertyName("environmentVariables"u8); + writer.WritePropertyName("inputs"u8); writer.WriteStartObject(); - foreach (var item in EnvironmentVariables) + foreach (var item in Inputs) { writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WriteObjectValue(item.Value, options); } writer.WriteEndObject(); } else { - writer.WriteNull("environmentVariables"); + writer.WriteNull("inputs"); } } - if (Optional.IsCollectionDefined(Files)) + if (Optional.IsCollectionDefined(Outputs)) { - if (Files != null) + if (Outputs != null) { - writer.WritePropertyName("files"u8); - writer.WriteStartArray(); - foreach (var item in Files) + writer.WritePropertyName("outputs"u8); + writer.WriteStartObject(); + foreach (var item in Outputs) { - writer.WriteStringValue(item); + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); } - writer.WriteEndArray(); + writer.WriteEndObject(); } else { - writer.WriteNull("files"); + writer.WriteNull("outputs"); } } - if (Optional.IsCollectionDefined(Inputs)) + if (Optional.IsCollectionDefined(PyFiles)) { - if (Inputs != null) + if (PyFiles != null) { - writer.WritePropertyName("inputs"u8); - writer.WriteStartObject(); - foreach (var item in Inputs) + writer.WritePropertyName("pyFiles"u8); + writer.WriteStartArray(); + foreach (var item in PyFiles) { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); + writer.WriteStringValue(item); } - writer.WriteEndObject(); + writer.WriteEndArray(); } else { - writer.WriteNull("inputs"); + writer.WriteNull("pyFiles"); } } if (Optional.IsCollectionDefined(Jars)) @@ -159,31 +136,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteNull("jars"); } } - if (Optional.IsCollectionDefined(Outputs)) + if (Optional.IsCollectionDefined(Files)) { - if (Outputs != null) + if (Files != null) { - writer.WritePropertyName("outputs"u8); - writer.WriteStartObject(); - foreach (var item in Outputs) + writer.WritePropertyName("files"u8); + writer.WriteStartArray(); + foreach (var item in Files) { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); + writer.WriteStringValue(item); } - writer.WriteEndObject(); + writer.WriteEndArray(); } else { - writer.WriteNull("outputs"); + writer.WriteNull("files"); } } - if (Optional.IsCollectionDefined(PyFiles)) + if (Optional.IsCollectionDefined(Archives)) { - if (PyFiles != null) + if (Archives != null) { - writer.WritePropertyName("pyFiles"u8); + writer.WritePropertyName("archives"u8); writer.WriteStartArray(); - foreach (var item in PyFiles) + foreach (var item in Archives) { writer.WriteStringValue(item); } @@ -191,7 +167,25 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } else { - writer.WriteNull("pyFiles"); + writer.WriteNull("archives"); + } + } + if (Optional.IsCollectionDefined(Conf)) + { + if (Conf != null) + { + writer.WritePropertyName("conf"u8); + writer.WriteStartObject(); + foreach (var item in Conf) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("conf"); } } if (Optional.IsDefined(QueueSettings)) @@ -206,58 +200,82 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteNull("queueSettings"); } } - if (Optional.IsDefined(Resources)) + if (Optional.IsCollectionDefined(EnvironmentVariables)) { - if (Resources != null) + if (EnvironmentVariables != null) { - writer.WritePropertyName("resources"u8); - writer.WriteObjectValue(Resources, options); + writer.WritePropertyName("environmentVariables"u8); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } else { - writer.WriteNull("resources"); + writer.WriteNull("environmentVariables"); } } - if (Optional.IsDefined(ComponentId)) + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(DisplayName)) { - if (ComponentId != null) + if (DisplayName != null) { - writer.WritePropertyName("componentId"u8); - writer.WriteStringValue(ComponentId); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); } else { - writer.WriteNull("componentId"); + writer.WriteNull("displayName"); } } - if (Optional.IsDefined(ComputeId)) + if (options.Format != "W" && Optional.IsDefined(Status)) { - if (ComputeId != null) + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + } + if (Optional.IsCollectionDefined(Services)) + { + if (Services != null) { - writer.WritePropertyName("computeId"u8); - writer.WriteStringValue(ComputeId); + writer.WritePropertyName("services"u8); + writer.WriteStartObject(); + foreach (var item in Services) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); } else { - writer.WriteNull("computeId"); + writer.WriteNull("services"); } } - if (Optional.IsDefined(DisplayName)) + if (Optional.IsDefined(ComputeId)) { - if (DisplayName != null) + if (ComputeId != null) { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); + writer.WritePropertyName("computeId"u8); + writer.WriteStringValue(ComputeId); } else { - writer.WriteNull("displayName"); + writer.WriteNull("computeId"); } } - if (Optional.IsDefined(ExperimentName)) + if (Optional.IsDefined(IsArchived)) { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); } if (Optional.IsDefined(Identity)) { @@ -271,48 +289,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteNull("identity"); } } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"u8); - writer.WriteBooleanValue(IsArchived.Value); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsDefined(NotificationSetting)) + if (Optional.IsDefined(ComponentId)) { - if (NotificationSetting != null) + if (ComponentId != null) { - writer.WritePropertyName("notificationSetting"u8); - writer.WriteObjectValue(NotificationSetting, options); + writer.WritePropertyName("componentId"u8); + writer.WriteStringValue(ComponentId); } else { - writer.WriteNull("notificationSetting"); + writer.WriteNull("componentId"); } } - if (Optional.IsCollectionDefined(Services)) + if (Optional.IsDefined(NotificationSetting)) { - if (Services != null) + if (NotificationSetting != null) { - writer.WritePropertyName("services"u8); - writer.WriteStartObject(); - foreach (var item in Services) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting, options); } else { - writer.WriteNull("services"); + writer.WriteNull("notificationSetting"); } } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } if (Optional.IsDefined(Description)) { if (Description != null) @@ -325,13 +325,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -340,16 +340,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -358,7 +358,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -399,50 +399,45 @@ internal static SparkJob DeserializeSparkJob(JsonElement element, ModelReaderWri { return null; } - IList archives = default; + SparkResourceConfiguration resources = default; string args = default; ResourceIdentifier codeId = default; - IDictionary conf = default; SparkJobEntry entry = default; ResourceIdentifier environmentId = default; - IDictionary environmentVariables = default; - IList files = default; IDictionary inputs = default; - IList jars = default; IDictionary outputs = default; IList pyFiles = default; + IList jars = default; + IList files = default; + IList archives = default; + IDictionary conf = default; JobQueueSettings queueSettings = default; - SparkResourceConfiguration resources = default; - ResourceIdentifier componentId = default; - ResourceIdentifier computeId = default; + IDictionary environmentVariables = default; + JobType jobType = default; string displayName = default; + MachineLearningJobStatus? status = default; string experimentName = default; - MachineLearningIdentityConfiguration identity = default; + IDictionary services = default; + ResourceIdentifier computeId = default; bool? isArchived = default; - JobType jobType = default; + MachineLearningIdentityConfiguration identity = default; + ResourceIdentifier componentId = default; NotificationSetting notificationSetting = default; - IDictionary services = default; - MachineLearningJobStatus? status = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("archives"u8)) + if (property.NameEquals("resources"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - archives = null; + resources = null; continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - archives = array; + resources = SparkResourceConfiguration.DeserializeSparkResourceConfiguration(property.Value, options); continue; } if (property.NameEquals("args"u8)) @@ -460,21 +455,6 @@ internal static SparkJob DeserializeSparkJob(JsonElement element, ModelReaderWri codeId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("conf"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - conf = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - conf = dictionary; - continue; - } if (property.NameEquals("entry"u8)) { entry = SparkJobEntry.DeserializeSparkJobEntry(property.Value, options); @@ -490,49 +470,49 @@ internal static SparkJob DeserializeSparkJob(JsonElement element, ModelReaderWri environmentId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("environmentVariables"u8)) + if (property.NameEquals("inputs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - environmentVariables = null; + inputs = null; continue; } - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + dictionary.Add(property0.Name, MachineLearningJobInput.DeserializeMachineLearningJobInput(property0.Value, options)); } - environmentVariables = dictionary; + inputs = dictionary; continue; } - if (property.NameEquals("files"u8)) + if (property.NameEquals("outputs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - files = null; + outputs = null; continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) { - array.Add(item.GetString()); + dictionary.Add(property0.Name, MachineLearningJobOutput.DeserializeMachineLearningJobOutput(property0.Value, options)); } - files = array; + outputs = dictionary; continue; } - if (property.NameEquals("inputs"u8)) + if (property.NameEquals("pyFiles"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - inputs = null; + pyFiles = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) { - dictionary.Add(property0.Name, MachineLearningJobInput.DeserializeMachineLearningJobInput(property0.Value, options)); + array.Add(item.GetString()); } - inputs = dictionary; + pyFiles = array; continue; } if (property.NameEquals("jars"u8)) @@ -550,26 +530,26 @@ internal static SparkJob DeserializeSparkJob(JsonElement element, ModelReaderWri jars = array; continue; } - if (property.NameEquals("outputs"u8)) + if (property.NameEquals("files"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - outputs = null; + files = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) { - dictionary.Add(property0.Name, MachineLearningJobOutput.DeserializeMachineLearningJobOutput(property0.Value, options)); + array.Add(item.GetString()); } - outputs = dictionary; + files = array; continue; } - if (property.NameEquals("pyFiles"u8)) + if (property.NameEquals("archives"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - pyFiles = null; + archives = null; continue; } List array = new List(); @@ -577,57 +557,71 @@ internal static SparkJob DeserializeSparkJob(JsonElement element, ModelReaderWri { array.Add(item.GetString()); } - pyFiles = array; + archives = array; continue; } - if (property.NameEquals("queueSettings"u8)) + if (property.NameEquals("conf"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - queueSettings = null; + conf = null; continue; } - queueSettings = JobQueueSettings.DeserializeJobQueueSettings(property.Value, options); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + conf = dictionary; continue; } - if (property.NameEquals("resources"u8)) + if (property.NameEquals("queueSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - resources = null; + queueSettings = null; continue; } - resources = SparkResourceConfiguration.DeserializeSparkResourceConfiguration(property.Value, options); + queueSettings = JobQueueSettings.DeserializeJobQueueSettings(property.Value, options); continue; } - if (property.NameEquals("componentId"u8)) + if (property.NameEquals("environmentVariables"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - componentId = null; + environmentVariables = null; continue; } - componentId = new ResourceIdentifier(property.Value.GetString()); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + environmentVariables = dictionary; continue; } - if (property.NameEquals("computeId"u8)) + if (property.NameEquals("jobType"u8)) + { + jobType = new JobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - computeId = null; + displayName = null; continue; } - computeId = new ResourceIdentifier(property.Value.GetString()); + displayName = property.Value.GetString(); continue; } - if (property.NameEquals("displayName"u8)) + if (property.NameEquals("status"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - displayName = null; continue; } - displayName = property.Value.GetString(); + status = new MachineLearningJobStatus(property.Value.GetString()); continue; } if (property.NameEquals("experimentName"u8)) @@ -635,62 +629,68 @@ internal static SparkJob DeserializeSparkJob(JsonElement element, ModelReaderWri experimentName = property.Value.GetString(); continue; } - if (property.NameEquals("identity"u8)) + if (property.NameEquals("services"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - identity = null; + services = null; continue; } - identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value, options); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value, options)); + } + services = dictionary; continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("computeId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + computeId = null; continue; } - isArchived = property.Value.GetBoolean(); + computeId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("jobType"u8)) + if (property.NameEquals("isArchived"u8)) { - jobType = new JobType(property.Value.GetString()); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("notificationSetting"u8)) + if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - notificationSetting = null; + identity = null; continue; } - notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value, options); + identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value, options); continue; } - if (property.NameEquals("services"u8)) + if (property.NameEquals("componentId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - services = null; + componentId = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value, options)); - } - services = dictionary; + componentId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("notificationSetting"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + notificationSetting = null; continue; } - status = new MachineLearningJobStatus(property.Value.GetString()); + notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value, options); continue; } if (property.NameEquals("description"u8)) @@ -703,11 +703,11 @@ internal static SparkJob DeserializeSparkJob(JsonElement element, ModelReaderWri description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -715,14 +715,14 @@ internal static SparkJob DeserializeSparkJob(JsonElement element, ModelReaderWri { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -730,7 +730,7 @@ internal static SparkJob DeserializeSparkJob(JsonElement element, ModelReaderWri { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -741,33 +741,33 @@ internal static SparkJob DeserializeSparkJob(JsonElement element, ModelReaderWri serializedAdditionalRawData = rawDataDictionary; return new SparkJob( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - componentId, - computeId, + jobType, displayName, + status, experimentName, - identity, + services ?? new ChangeTrackingDictionary(), + computeId, isArchived, - jobType, + identity, + componentId, notificationSetting, - services ?? new ChangeTrackingDictionary(), - status, - archives ?? new ChangeTrackingList(), + resources, args, codeId, - conf ?? new ChangeTrackingDictionary(), entry, environmentId, - environmentVariables ?? new ChangeTrackingDictionary(), - files ?? new ChangeTrackingList(), inputs ?? new ChangeTrackingDictionary(), - jars ?? new ChangeTrackingList(), outputs ?? new ChangeTrackingDictionary(), pyFiles ?? new ChangeTrackingList(), + jars ?? new ChangeTrackingList(), + files ?? new ChangeTrackingList(), + archives ?? new ChangeTrackingList(), + conf ?? new ChangeTrackingDictionary(), queueSettings, - resources); + environmentVariables ?? new ChangeTrackingDictionary()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.cs index 6ac19e0aeb67c..ae0f1093ac9f0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SparkJob.cs @@ -27,84 +27,84 @@ public SparkJob(ResourceIdentifier codeId, SparkJobEntry entry) Argument.AssertNotNull(codeId, nameof(codeId)); Argument.AssertNotNull(entry, nameof(entry)); - Archives = new ChangeTrackingList(); CodeId = codeId; - Conf = new ChangeTrackingDictionary(); Entry = entry; - EnvironmentVariables = new ChangeTrackingDictionary(); - Files = new ChangeTrackingList(); Inputs = new ChangeTrackingDictionary(); - Jars = new ChangeTrackingList(); Outputs = new ChangeTrackingDictionary(); PyFiles = new ChangeTrackingList(); + Jars = new ChangeTrackingList(); + Files = new ChangeTrackingList(); + Archives = new ChangeTrackingList(); + Conf = new ChangeTrackingDictionary(); + EnvironmentVariables = new ChangeTrackingDictionary(); JobType = JobType.Spark; } /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. + /// [Required] Specifies the type of job. /// Display name of job. + /// Status of the job. /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// ARM resource ID of the compute resource. + /// Is the asset archived?. /// /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. /// Defaults to AmlToken if null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// Is the asset archived?. - /// [Required] Specifies the type of job. + /// ARM resource ID of the component resource. /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. - /// Archive files used in the job. + /// Compute Resource configuration for the job. /// Arguments for the job. /// [Required] arm-id of the code asset. - /// Spark configured properties. /// /// [Required] The entry to execute on startup of the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// /// The ARM resource ID of the Environment specification for the job. - /// Environment variables included in the job. - /// Files used in the job. /// /// Mapping of input data bindings used in the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , , and . /// - /// Jar files used in the job. /// /// Mapping of output data bindings used in the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , and . /// /// Python files used in the job. + /// Jar files used in the job. + /// Files used in the job. + /// Archive files used in the job. + /// Spark configured properties. /// Queue settings for the job. - /// Compute Resource configuration for the job. - internal SparkJob(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary services, MachineLearningJobStatus? status, IList archives, string args, ResourceIdentifier codeId, IDictionary conf, SparkJobEntry entry, ResourceIdentifier environmentId, IDictionary environmentVariables, IList files, IDictionary inputs, IList jars, IDictionary outputs, IList pyFiles, JobQueueSettings queueSettings, SparkResourceConfiguration resources) : base(description, properties, tags, serializedAdditionalRawData, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, services, status) + /// Environment variables included in the job. + internal SparkJob(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, JobType jobType, string displayName, MachineLearningJobStatus? status, string experimentName, IDictionary services, ResourceIdentifier computeId, bool? isArchived, MachineLearningIdentityConfiguration identity, ResourceIdentifier componentId, NotificationSetting notificationSetting, SparkResourceConfiguration resources, string args, ResourceIdentifier codeId, SparkJobEntry entry, ResourceIdentifier environmentId, IDictionary inputs, IDictionary outputs, IList pyFiles, IList jars, IList files, IList archives, IDictionary conf, JobQueueSettings queueSettings, IDictionary environmentVariables) : base(description, tags, properties, serializedAdditionalRawData, jobType, displayName, status, experimentName, services, computeId, isArchived, identity, componentId, notificationSetting) { - Archives = archives; + Resources = resources; Args = args; CodeId = codeId; - Conf = conf; Entry = entry; EnvironmentId = environmentId; - EnvironmentVariables = environmentVariables; - Files = files; Inputs = inputs; - Jars = jars; Outputs = outputs; PyFiles = pyFiles; + Jars = jars; + Files = files; + Archives = archives; + Conf = conf; QueueSettings = queueSettings; - Resources = resources; + EnvironmentVariables = environmentVariables; JobType = jobType; } @@ -113,14 +113,12 @@ internal SparkJob() { } - /// Archive files used in the job. - public IList Archives { get; set; } + /// Compute Resource configuration for the job. + public SparkResourceConfiguration Resources { get; set; } /// Arguments for the job. public string Args { get; set; } /// [Required] arm-id of the code asset. public ResourceIdentifier CodeId { get; set; } - /// Spark configured properties. - public IDictionary Conf { get; set; } /// /// [Required] The entry to execute on startup of the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -129,18 +127,12 @@ internal SparkJob() public SparkJobEntry Entry { get; set; } /// The ARM resource ID of the Environment specification for the job. public ResourceIdentifier EnvironmentId { get; set; } - /// Environment variables included in the job. - public IDictionary EnvironmentVariables { get; set; } - /// Files used in the job. - public IList Files { get; set; } /// /// Mapping of input data bindings used in the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , , and . /// public IDictionary Inputs { get; set; } - /// Jar files used in the job. - public IList Jars { get; set; } /// /// Mapping of output data bindings used in the job. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. @@ -149,6 +141,14 @@ internal SparkJob() public IDictionary Outputs { get; set; } /// Python files used in the job. public IList PyFiles { get; set; } + /// Jar files used in the job. + public IList Jars { get; set; } + /// Files used in the job. + public IList Files { get; set; } + /// Archive files used in the job. + public IList Archives { get; set; } + /// Spark configured properties. + public IDictionary Conf { get; set; } /// Queue settings for the job. internal JobQueueSettings QueueSettings { get; set; } /// Controls the compute job tier. @@ -163,7 +163,7 @@ public JobTier? QueueJobTier } } - /// Compute Resource configuration for the job. - public SparkResourceConfiguration Resources { get; set; } + /// Environment variables included in the job. + public IDictionary EnvironmentVariables { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SpeechEndpointDeploymentResourceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SpeechEndpointDeploymentResourceProperties.Serialization.cs deleted file mode 100644 index 2ef1472d3ea19..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SpeechEndpointDeploymentResourceProperties.Serialization.cs +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SpeechEndpointDeploymentResourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SpeechEndpointDeploymentResourceProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, options); - if (Optional.IsDefined(RaiPolicyName)) - { - writer.WritePropertyName("raiPolicyName"u8); - writer.WriteStringValue(RaiPolicyName); - } - if (Optional.IsDefined(VersionUpgradeOption)) - { - writer.WritePropertyName("versionUpgradeOption"u8); - writer.WriteStringValue(VersionUpgradeOption.Value.ToString()); - } - if (Optional.IsDefined(FailureReason)) - { - writer.WritePropertyName("failureReason"u8); - writer.WriteStringValue(FailureReason); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(EndpointDeploymentResourcePropertiesType); - 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 - } - } - writer.WriteEndObject(); - } - - SpeechEndpointDeploymentResourceProperties 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(SpeechEndpointDeploymentResourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSpeechEndpointDeploymentResourceProperties(document.RootElement, options); - } - - internal static SpeechEndpointDeploymentResourceProperties DeserializeSpeechEndpointDeploymentResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - EndpointDeploymentModel model = default; - string raiPolicyName = default; - DeploymentModelVersionUpgradeOption? versionUpgradeOption = default; - string failureReason = default; - DefaultResourceProvisioningState? provisioningState = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("model"u8)) - { - model = EndpointDeploymentModel.DeserializeEndpointDeploymentModel(property.Value, options); - continue; - } - if (property.NameEquals("raiPolicyName"u8)) - { - raiPolicyName = property.Value.GetString(); - continue; - } - if (property.NameEquals("versionUpgradeOption"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - versionUpgradeOption = new DeploymentModelVersionUpgradeOption(property.Value.GetString()); - continue; - } - if (property.NameEquals("failureReason"u8)) - { - failureReason = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new DefaultResourceProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SpeechEndpointDeploymentResourceProperties( - failureReason, - provisioningState, - type, - serializedAdditionalRawData, - model, - raiPolicyName, - versionUpgradeOption); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(SpeechEndpointDeploymentResourceProperties)} does not support writing '{options.Format}' format."); - } - } - - SpeechEndpointDeploymentResourceProperties 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 DeserializeSpeechEndpointDeploymentResourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SpeechEndpointDeploymentResourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SpeechEndpointDeploymentResourceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SpeechEndpointDeploymentResourceProperties.cs deleted file mode 100644 index a683fbee428d8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SpeechEndpointDeploymentResourceProperties.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The SpeechEndpointDeploymentResourceProperties. - public partial class SpeechEndpointDeploymentResourceProperties : EndpointDeploymentResourceProperties - { - /// Initializes a new instance of . - /// Model used for the endpoint deployment. - /// is null. - public SpeechEndpointDeploymentResourceProperties(EndpointDeploymentModel model) - { - Argument.AssertNotNull(model, nameof(model)); - - Model = model; - EndpointDeploymentResourcePropertiesType = "Azure.Speech"; - } - - /// Initializes a new instance of . - /// The failure reason if the creation failed. - /// Read-only provision state status property. - /// Kind of the deployment. - /// Keeps track of any properties unknown to the library. - /// Model used for the endpoint deployment. - /// The name of RAI policy. - /// Deployment model version upgrade option. - internal SpeechEndpointDeploymentResourceProperties(string failureReason, DefaultResourceProvisioningState? provisioningState, string endpointDeploymentResourcePropertiesType, IDictionary serializedAdditionalRawData, EndpointDeploymentModel model, string raiPolicyName, DeploymentModelVersionUpgradeOption? versionUpgradeOption) : base(failureReason, provisioningState, endpointDeploymentResourcePropertiesType, serializedAdditionalRawData) - { - Model = model; - RaiPolicyName = raiPolicyName; - VersionUpgradeOption = versionUpgradeOption; - EndpointDeploymentResourcePropertiesType = endpointDeploymentResourcePropertiesType ?? "Azure.Speech"; - } - - /// Initializes a new instance of for deserialization. - internal SpeechEndpointDeploymentResourceProperties() - { - } - - /// Model used for the endpoint deployment. - public EndpointDeploymentModel Model { get; set; } - /// The name of RAI policy. - public string RaiPolicyName { get; set; } - /// Deployment model version upgrade option. - public DeploymentModelVersionUpgradeOption? VersionUpgradeOption { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SpeechEndpointResourceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SpeechEndpointResourceProperties.Serialization.cs deleted file mode 100644 index 82b4200464e19..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SpeechEndpointResourceProperties.Serialization.cs +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SpeechEndpointResourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SpeechEndpointResourceProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(AssociatedResourceId)) - { - writer.WritePropertyName("associatedResourceId"u8); - writer.WriteStringValue(AssociatedResourceId); - } - if (Optional.IsCollectionDefined(Deployments)) - { - writer.WritePropertyName("deployments"u8); - writer.WriteStartArray(); - foreach (var item in Deployments) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (Optional.IsDefined(EndpointUri)) - { - writer.WritePropertyName("endpointUri"u8); - writer.WriteStringValue(EndpointUri.AbsoluteUri); - } - if (Optional.IsDefined(FailureReason)) - { - writer.WritePropertyName("failureReason"u8); - writer.WriteStringValue(FailureReason); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(ShouldCreateAiServicesEndpoint)) - { - writer.WritePropertyName("shouldCreateAiServicesEndpoint"u8); - writer.WriteBooleanValue(ShouldCreateAiServicesEndpoint.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 - } - } - writer.WriteEndObject(); - } - - SpeechEndpointResourceProperties 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(SpeechEndpointResourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSpeechEndpointResourceProperties(document.RootElement, options); - } - - internal static SpeechEndpointResourceProperties DeserializeSpeechEndpointResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier associatedResourceId = default; - IList deployments = default; - EndpointType endpointType = default; - Uri endpointUri = default; - string failureReason = default; - AzureLocation? location = default; - string name = default; - DefaultResourceProvisioningState? provisioningState = default; - bool? shouldCreateAiServicesEndpoint = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("associatedResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - associatedResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("deployments"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(item, options)); - } - deployments = array; - continue; - } - if (property.NameEquals("endpointType"u8)) - { - endpointType = new EndpointType(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpointUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpointUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("failureReason"u8)) - { - failureReason = property.Value.GetString(); - continue; - } - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new DefaultResourceProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("shouldCreateAiServicesEndpoint"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - shouldCreateAiServicesEndpoint = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SpeechEndpointResourceProperties( - associatedResourceId, - deployments ?? new ChangeTrackingList(), - endpointType, - endpointUri, - failureReason, - location, - name, - provisioningState, - shouldCreateAiServicesEndpoint, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(SpeechEndpointResourceProperties)} does not support writing '{options.Format}' format."); - } - } - - SpeechEndpointResourceProperties 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 DeserializeSpeechEndpointResourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SpeechEndpointResourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SpeechEndpointResourceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SpeechEndpointResourceProperties.cs deleted file mode 100644 index 7270ce4db5afa..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SpeechEndpointResourceProperties.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The SpeechEndpointResourceProperties. - public partial class SpeechEndpointResourceProperties : EndpointResourceProperties - { - /// Initializes a new instance of . - public SpeechEndpointResourceProperties() - { - EndpointType = EndpointType.AzureSpeech; - } - - /// Initializes a new instance of . - /// Byo resource id for creating the built-in model service endpoints. - /// Deployments info. - /// Type of the endpoint. - /// Uri of the endpoint. - /// The failure reason if the creation failed. - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace - /// - /// Name of the endpoint. - /// Read-only provision state status property. - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - /// Keeps track of any properties unknown to the library. - internal SpeechEndpointResourceProperties(ResourceIdentifier associatedResourceId, IList deployments, EndpointType endpointType, Uri endpointUri, string failureReason, AzureLocation? location, string name, DefaultResourceProvisioningState? provisioningState, bool? shouldCreateAiServicesEndpoint, IDictionary serializedAdditionalRawData) : base(associatedResourceId, deployments, endpointType, endpointUri, failureReason, location, name, provisioningState, shouldCreateAiServicesEndpoint, serializedAdditionalRawData) - { - EndpointType = endpointType; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.Serialization.cs index ba2543ab0bdc3..60fa96bdfb427 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.Serialization.cs @@ -26,6 +26,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } writer.WriteStartObject(); + writer.WritePropertyName("windowStart"u8); + writer.WriteStringValue(WindowStart, "O"); + writer.WritePropertyName("windowEnd"u8); + writer.WriteStringValue(WindowEnd, "O"); if (Optional.IsDefined(PreprocessingComponentId)) { if (PreprocessingComponentId != null) @@ -38,10 +42,24 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteNull("preprocessingComponentId"); } } - writer.WritePropertyName("windowEnd"u8); - writer.WriteStringValue(WindowEnd, "O"); - writer.WritePropertyName("windowStart"u8); - writer.WriteStringValue(WindowStart, "O"); + writer.WritePropertyName("inputDataType"u8); + writer.WriteStringValue(InputDataType.ToString()); + if (Optional.IsDefined(DataContext)) + { + if (DataContext != null) + { + writer.WritePropertyName("dataContext"u8); + writer.WriteStringValue(DataContext); + } + else + { + writer.WriteNull("dataContext"); + } + } + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); if (Optional.IsCollectionDefined(Columns)) { if (Columns != null) @@ -60,24 +78,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO writer.WriteNull("columns"); } } - if (Optional.IsDefined(DataContext)) - { - if (DataContext != null) - { - writer.WritePropertyName("dataContext"u8); - writer.WriteStringValue(DataContext); - } - else - { - writer.WriteNull("dataContext"); - } - } - writer.WritePropertyName("inputDataType"u8); - writer.WriteStringValue(InputDataType.ToString()); - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -116,26 +116,21 @@ internal static StaticInputData DeserializeStaticInputData(JsonElement element, { return null; } - string preprocessingComponentId = default; - DateTimeOffset windowEnd = default; DateTimeOffset windowStart = default; - IDictionary columns = default; - string dataContext = default; + DateTimeOffset windowEnd = default; + string preprocessingComponentId = default; MonitoringInputDataType inputDataType = default; + string dataContext = default; JobInputType jobInputType = default; Uri uri = default; + IDictionary columns = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("preprocessingComponentId"u8)) + if (property.NameEquals("windowStart"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - preprocessingComponentId = null; - continue; - } - preprocessingComponentId = property.Value.GetString(); + windowStart = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("windowEnd"u8)) @@ -143,24 +138,19 @@ internal static StaticInputData DeserializeStaticInputData(JsonElement element, windowEnd = property.Value.GetDateTimeOffset("O"); continue; } - if (property.NameEquals("windowStart"u8)) - { - windowStart = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("columns"u8)) + if (property.NameEquals("preprocessingComponentId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - columns = null; + preprocessingComponentId = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - columns = dictionary; + preprocessingComponentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputDataType"u8)) + { + inputDataType = new MonitoringInputDataType(property.Value.GetString()); continue; } if (property.NameEquals("dataContext"u8)) @@ -173,11 +163,6 @@ internal static StaticInputData DeserializeStaticInputData(JsonElement element, dataContext = property.Value.GetString(); continue; } - if (property.NameEquals("inputDataType"u8)) - { - inputDataType = new MonitoringInputDataType(property.Value.GetString()); - continue; - } if (property.NameEquals("jobInputType"u8)) { jobInputType = new JobInputType(property.Value.GetString()); @@ -188,6 +173,21 @@ internal static StaticInputData DeserializeStaticInputData(JsonElement element, uri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("columns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + columns = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + columns = dictionary; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -195,15 +195,15 @@ internal static StaticInputData DeserializeStaticInputData(JsonElement element, } serializedAdditionalRawData = rawDataDictionary; return new StaticInputData( - columns ?? new ChangeTrackingDictionary(), - dataContext, inputDataType, + dataContext, jobInputType, uri, + columns ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - preprocessingComponentId, + windowStart, windowEnd, - windowStart); + preprocessingComponentId); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.cs index 66bb5c6cce714..01ce31675f002 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StaticInputData.cs @@ -16,33 +16,33 @@ public partial class StaticInputData : MonitoringInputDataBase /// Initializes a new instance of . /// [Required] Specifies the type of job. /// [Required] Input Asset URI. - /// [Required] The end date of the data window. /// [Required] The start date of the data window. + /// [Required] The end date of the data window. /// is null. - public StaticInputData(JobInputType jobInputType, Uri uri, DateTimeOffset windowEnd, DateTimeOffset windowStart) : base(jobInputType, uri) + public StaticInputData(JobInputType jobInputType, Uri uri, DateTimeOffset windowStart, DateTimeOffset windowEnd) : base(jobInputType, uri) { Argument.AssertNotNull(uri, nameof(uri)); - WindowEnd = windowEnd; WindowStart = windowStart; + WindowEnd = windowEnd; InputDataType = MonitoringInputDataType.Static; } /// Initializes a new instance of . - /// Mapping of column names to special uses. - /// The context metadata of the data source. /// [Required] Specifies the type of signal to monitor. + /// The context metadata of the data source. /// [Required] Specifies the type of job. /// [Required] Input Asset URI. + /// Mapping of column names to special uses. /// Keeps track of any properties unknown to the library. - /// Reference to the component asset used to preprocess the data. - /// [Required] The end date of the data window. /// [Required] The start date of the data window. - internal StaticInputData(IDictionary columns, string dataContext, MonitoringInputDataType inputDataType, JobInputType jobInputType, Uri uri, IDictionary serializedAdditionalRawData, string preprocessingComponentId, DateTimeOffset windowEnd, DateTimeOffset windowStart) : base(columns, dataContext, inputDataType, jobInputType, uri, serializedAdditionalRawData) + /// [Required] The end date of the data window. + /// Reference to the component asset used to preprocess the data. + internal StaticInputData(MonitoringInputDataType inputDataType, string dataContext, JobInputType jobInputType, Uri uri, IDictionary columns, IDictionary serializedAdditionalRawData, DateTimeOffset windowStart, DateTimeOffset windowEnd, string preprocessingComponentId) : base(inputDataType, dataContext, jobInputType, uri, columns, serializedAdditionalRawData) { - PreprocessingComponentId = preprocessingComponentId; - WindowEnd = windowEnd; WindowStart = windowStart; + WindowEnd = windowEnd; + PreprocessingComponentId = preprocessingComponentId; InputDataType = inputDataType; } @@ -51,11 +51,11 @@ internal StaticInputData() { } - /// Reference to the component asset used to preprocess the data. - public string PreprocessingComponentId { get; set; } - /// [Required] The end date of the data window. - public DateTimeOffset WindowEnd { get; set; } /// [Required] The start date of the data window. public DateTimeOffset WindowStart { get; set; } + /// [Required] The end date of the data window. + public DateTimeOffset WindowEnd { get; set; } + /// Reference to the component asset used to preprocess the data. + public string PreprocessingComponentId { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalFeaturizationSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalFeaturizationSettings.Serialization.cs index da8eb9956c125..68beb3fef9446 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalFeaturizationSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalFeaturizationSettings.Serialization.cs @@ -26,6 +26,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } if (Optional.IsCollectionDefined(BlockedTransformers)) { if (BlockedTransformers != null) @@ -61,16 +66,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("columnNameAndTypes"); } } - if (Optional.IsDefined(EnableDnnFeaturization)) - { - writer.WritePropertyName("enableDnnFeaturization"u8); - writer.WriteBooleanValue(EnableDnnFeaturization.Value); - } - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"u8); - writer.WriteStringValue(Mode.Value.ToString()); - } if (Optional.IsCollectionDefined(TransformerParams)) { if (TransformerParams != null) @@ -99,6 +94,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("transformerParams"); } } + if (Optional.IsDefined(EnableDnnFeaturization)) + { + writer.WritePropertyName("enableDnnFeaturization"u8); + writer.WriteBooleanValue(EnableDnnFeaturization.Value); + } if (Optional.IsDefined(DatasetLanguage)) { if (DatasetLanguage != null) @@ -149,16 +149,25 @@ internal static TableVerticalFeaturizationSettings DeserializeTableVerticalFeatu { return null; } + MachineLearningFeaturizationMode? mode = default; IList blockedTransformers = default; IDictionary columnNameAndTypes = default; - bool? enableDnnFeaturization = default; - MachineLearningFeaturizationMode? mode = default; IDictionary> transformerParams = default; + bool? enableDnnFeaturization = default; string datasetLanguage = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new MachineLearningFeaturizationMode(property.Value.GetString()); + continue; + } if (property.NameEquals("blockedTransformers"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -189,24 +198,6 @@ internal static TableVerticalFeaturizationSettings DeserializeTableVerticalFeatu columnNameAndTypes = dictionary; continue; } - if (property.NameEquals("enableDnnFeaturization"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - enableDnnFeaturization = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("mode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - mode = new MachineLearningFeaturizationMode(property.Value.GetString()); - continue; - } if (property.NameEquals("transformerParams"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -234,6 +225,15 @@ internal static TableVerticalFeaturizationSettings DeserializeTableVerticalFeatu transformerParams = dictionary; continue; } + if (property.NameEquals("enableDnnFeaturization"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableDnnFeaturization = property.Value.GetBoolean(); + continue; + } if (property.NameEquals("datasetLanguage"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -253,11 +253,11 @@ internal static TableVerticalFeaturizationSettings DeserializeTableVerticalFeatu return new TableVerticalFeaturizationSettings( datasetLanguage, serializedAdditionalRawData, + mode, blockedTransformers ?? new ChangeTrackingList(), columnNameAndTypes ?? new ChangeTrackingDictionary(), - enableDnnFeaturization, - mode, - transformerParams ?? new ChangeTrackingDictionary>()); + transformerParams ?? new ChangeTrackingDictionary>(), + enableDnnFeaturization); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalFeaturizationSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalFeaturizationSettings.cs index d909b99c55f6c..4435fcc2fdffa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalFeaturizationSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalFeaturizationSettings.cs @@ -24,37 +24,37 @@ public TableVerticalFeaturizationSettings() /// Initializes a new instance of . /// Dataset language, useful for the text data. /// Keeps track of any properties unknown to the library. - /// These transformers shall not be used in featurization. - /// Dictionary of column name and its type (int, float, string, datetime etc). - /// Determines whether to use Dnn based featurizers for data featurization. /// /// Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation of the data in featurization phase. /// If 'Off' is selected then no featurization is done. /// If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. /// + /// These transformers shall not be used in featurization. + /// Dictionary of column name and its type (int, float, string, datetime etc). /// User can specify additional transformers to be used along with the columns to which it would be applied and parameters for the transformer constructor. - internal TableVerticalFeaturizationSettings(string datasetLanguage, IDictionary serializedAdditionalRawData, IList blockedTransformers, IDictionary columnNameAndTypes, bool? enableDnnFeaturization, MachineLearningFeaturizationMode? mode, IDictionary> transformerParams) : base(datasetLanguage, serializedAdditionalRawData) + /// Determines whether to use Dnn based featurizers for data featurization. + internal TableVerticalFeaturizationSettings(string datasetLanguage, IDictionary serializedAdditionalRawData, MachineLearningFeaturizationMode? mode, IList blockedTransformers, IDictionary columnNameAndTypes, IDictionary> transformerParams, bool? enableDnnFeaturization) : base(datasetLanguage, serializedAdditionalRawData) { + Mode = mode; BlockedTransformers = blockedTransformers; ColumnNameAndTypes = columnNameAndTypes; - EnableDnnFeaturization = enableDnnFeaturization; - Mode = mode; TransformerParams = transformerParams; + EnableDnnFeaturization = enableDnnFeaturization; } - /// These transformers shall not be used in featurization. - public IList BlockedTransformers { get; set; } - /// Dictionary of column name and its type (int, float, string, datetime etc). - public IDictionary ColumnNameAndTypes { get; set; } - /// Determines whether to use Dnn based featurizers for data featurization. - public bool? EnableDnnFeaturization { get; set; } /// /// Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation of the data in featurization phase. /// If 'Off' is selected then no featurization is done. /// If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. /// public MachineLearningFeaturizationMode? Mode { get; set; } + /// These transformers shall not be used in featurization. + public IList BlockedTransformers { get; set; } + /// Dictionary of column name and its type (int, float, string, datetime etc). + public IDictionary ColumnNameAndTypes { get; set; } /// User can specify additional transformers to be used along with the columns to which it would be applied and parameters for the transformer constructor. public IDictionary> TransformerParams { get; set; } + /// Determines whether to use Dnn based featurizers for data featurization. + public bool? EnableDnnFeaturization { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.Serialization.cs index 66488dcaf71da..e63f04611ab4a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.Serialization.cs @@ -26,22 +26,20 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteStartObject(); - if (Optional.IsDefined(EnableEarlyTermination)) + if (Optional.IsDefined(MaxTrials)) { - writer.WritePropertyName("enableEarlyTermination"u8); - writer.WriteBooleanValue(EnableEarlyTermination.Value); + writer.WritePropertyName("maxTrials"u8); + writer.WriteNumberValue(MaxTrials.Value); } - if (Optional.IsDefined(ExitScore)) + if (Optional.IsDefined(TrialTimeout)) { - if (ExitScore != null) - { - writer.WritePropertyName("exitScore"u8); - writer.WriteNumberValue(ExitScore.Value); - } - else - { - writer.WriteNull("exitScore"); - } + writer.WritePropertyName("trialTimeout"u8); + writer.WriteStringValue(TrialTimeout.Value, "P"); + } + if (Optional.IsDefined(Timeout)) + { + writer.WritePropertyName("timeout"u8); + writer.WriteStringValue(Timeout.Value, "P"); } if (Optional.IsDefined(MaxConcurrentTrials)) { @@ -53,20 +51,22 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("maxCoresPerTrial"u8); writer.WriteNumberValue(MaxCoresPerTrial.Value); } - if (Optional.IsDefined(MaxTrials)) - { - writer.WritePropertyName("maxTrials"u8); - writer.WriteNumberValue(MaxTrials.Value); - } - if (Optional.IsDefined(Timeout)) + if (Optional.IsDefined(ExitScore)) { - writer.WritePropertyName("timeout"u8); - writer.WriteStringValue(Timeout.Value, "P"); + if (ExitScore != null) + { + writer.WritePropertyName("exitScore"u8); + writer.WriteNumberValue(ExitScore.Value); + } + else + { + writer.WriteNull("exitScore"); + } } - if (Optional.IsDefined(TrialTimeout)) + if (Optional.IsDefined(EnableEarlyTermination)) { - writer.WritePropertyName("trialTimeout"u8); - writer.WriteStringValue(TrialTimeout.Value, "P"); + writer.WritePropertyName("enableEarlyTermination"u8); + writer.WriteBooleanValue(EnableEarlyTermination.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -106,79 +106,79 @@ internal static TableVerticalLimitSettings DeserializeTableVerticalLimitSettings { return null; } - bool? enableEarlyTermination = default; - double? exitScore = default; - int? maxConcurrentTrials = default; - int? maxCoresPerTrial = default; int? maxTrials = default; - TimeSpan? timeout = default; TimeSpan? trialTimeout = default; + TimeSpan? timeout = default; + int? maxConcurrentTrials = default; + int? maxCoresPerTrial = default; + double? exitScore = default; + bool? enableEarlyTermination = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("enableEarlyTermination"u8)) + if (property.NameEquals("maxTrials"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - enableEarlyTermination = property.Value.GetBoolean(); + maxTrials = property.Value.GetInt32(); continue; } - if (property.NameEquals("exitScore"u8)) + if (property.NameEquals("trialTimeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - exitScore = null; continue; } - exitScore = property.Value.GetDouble(); + trialTimeout = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("maxConcurrentTrials"u8)) + if (property.NameEquals("timeout"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - maxConcurrentTrials = property.Value.GetInt32(); + timeout = property.Value.GetTimeSpan("P"); continue; } - if (property.NameEquals("maxCoresPerTrial"u8)) + if (property.NameEquals("maxConcurrentTrials"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - maxCoresPerTrial = property.Value.GetInt32(); + maxConcurrentTrials = property.Value.GetInt32(); continue; } - if (property.NameEquals("maxTrials"u8)) + if (property.NameEquals("maxCoresPerTrial"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - maxTrials = property.Value.GetInt32(); + maxCoresPerTrial = property.Value.GetInt32(); continue; } - if (property.NameEquals("timeout"u8)) + if (property.NameEquals("exitScore"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + exitScore = null; continue; } - timeout = property.Value.GetTimeSpan("P"); + exitScore = property.Value.GetDouble(); continue; } - if (property.NameEquals("trialTimeout"u8)) + if (property.NameEquals("enableEarlyTermination"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - trialTimeout = property.Value.GetTimeSpan("P"); + enableEarlyTermination = property.Value.GetBoolean(); continue; } if (options.Format != "W") @@ -188,13 +188,13 @@ internal static TableVerticalLimitSettings DeserializeTableVerticalLimitSettings } serializedAdditionalRawData = rawDataDictionary; return new TableVerticalLimitSettings( - enableEarlyTermination, - exitScore, - maxConcurrentTrials, - maxCoresPerTrial, maxTrials, - timeout, trialTimeout, + timeout, + maxConcurrentTrials, + maxCoresPerTrial, + exitScore, + enableEarlyTermination, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.cs index f58865b884080..5bcabfae53759 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.cs @@ -51,39 +51,39 @@ public TableVerticalLimitSettings() } /// Initializes a new instance of . - /// Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations. - /// Exit score for the AutoML job. - /// Maximum Concurrent iterations. - /// Max cores per iteration. /// Number of iterations. - /// AutoML job timeout. /// Iteration timeout. + /// AutoML job timeout. + /// Maximum Concurrent iterations. + /// Max cores per iteration. + /// Exit score for the AutoML job. + /// Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations. /// Keeps track of any properties unknown to the library. - internal TableVerticalLimitSettings(bool? enableEarlyTermination, double? exitScore, int? maxConcurrentTrials, int? maxCoresPerTrial, int? maxTrials, TimeSpan? timeout, TimeSpan? trialTimeout, IDictionary serializedAdditionalRawData) + internal TableVerticalLimitSettings(int? maxTrials, TimeSpan? trialTimeout, TimeSpan? timeout, int? maxConcurrentTrials, int? maxCoresPerTrial, double? exitScore, bool? enableEarlyTermination, IDictionary serializedAdditionalRawData) { - EnableEarlyTermination = enableEarlyTermination; - ExitScore = exitScore; - MaxConcurrentTrials = maxConcurrentTrials; - MaxCoresPerTrial = maxCoresPerTrial; MaxTrials = maxTrials; - Timeout = timeout; TrialTimeout = trialTimeout; + Timeout = timeout; + MaxConcurrentTrials = maxConcurrentTrials; + MaxCoresPerTrial = maxCoresPerTrial; + ExitScore = exitScore; + EnableEarlyTermination = enableEarlyTermination; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations. - public bool? EnableEarlyTermination { get; set; } - /// Exit score for the AutoML job. - public double? ExitScore { get; set; } - /// Maximum Concurrent iterations. - public int? MaxConcurrentTrials { get; set; } - /// Max cores per iteration. - public int? MaxCoresPerTrial { get; set; } /// Number of iterations. public int? MaxTrials { get; set; } - /// AutoML job timeout. - public TimeSpan? Timeout { get; set; } /// Iteration timeout. public TimeSpan? TrialTimeout { get; set; } + /// AutoML job timeout. + public TimeSpan? Timeout { get; set; } + /// Maximum Concurrent iterations. + public int? MaxConcurrentTrials { get; set; } + /// Max cores per iteration. + public int? MaxCoresPerTrial { get; set; } + /// Exit score for the AutoML job. + public double? ExitScore { get; set; } + /// Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations. + public bool? EnableEarlyTermination { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlowDistributionConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlowDistributionConfiguration.Serialization.cs index 198875098bdf1..3f8562981f0eb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlowDistributionConfiguration.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlowDistributionConfiguration.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer } writer.WriteStartObject(); - if (Optional.IsDefined(ParameterServerCount)) - { - writer.WritePropertyName("parameterServerCount"u8); - writer.WriteNumberValue(ParameterServerCount.Value); - } if (Optional.IsDefined(WorkerCount)) { if (WorkerCount != null) @@ -43,6 +38,11 @@ void IJsonModel.Write(Utf8JsonWriter writer writer.WriteNull("workerCount"); } } + if (Optional.IsDefined(ParameterServerCount)) + { + writer.WritePropertyName("parameterServerCount"u8); + writer.WriteNumberValue(ParameterServerCount.Value); + } writer.WritePropertyName("distributionType"u8); writer.WriteStringValue(DistributionType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -83,30 +83,30 @@ internal static TensorFlowDistributionConfiguration DeserializeTensorFlowDistrib { return null; } - int? parameterServerCount = default; int? workerCount = default; + int? parameterServerCount = default; DistributionType distributionType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("parameterServerCount"u8)) + if (property.NameEquals("workerCount"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + workerCount = null; continue; } - parameterServerCount = property.Value.GetInt32(); + workerCount = property.Value.GetInt32(); continue; } - if (property.NameEquals("workerCount"u8)) + if (property.NameEquals("parameterServerCount"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - workerCount = null; continue; } - workerCount = property.Value.GetInt32(); + parameterServerCount = property.Value.GetInt32(); continue; } if (property.NameEquals("distributionType"u8)) @@ -120,7 +120,7 @@ internal static TensorFlowDistributionConfiguration DeserializeTensorFlowDistrib } } serializedAdditionalRawData = rawDataDictionary; - return new TensorFlowDistributionConfiguration(distributionType, serializedAdditionalRawData, parameterServerCount, workerCount); + return new TensorFlowDistributionConfiguration(distributionType, serializedAdditionalRawData, workerCount, parameterServerCount); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlowDistributionConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlowDistributionConfiguration.cs index d8f74653d7341..b5de414b86362 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlowDistributionConfiguration.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlowDistributionConfiguration.cs @@ -22,18 +22,18 @@ public TensorFlowDistributionConfiguration() /// Initializes a new instance of . /// [Required] Specifies the type of distribution framework. /// Keeps track of any properties unknown to the library. - /// Number of parameter server tasks. /// Number of workers. If not specified, will default to the instance count. - internal TensorFlowDistributionConfiguration(DistributionType distributionType, IDictionary serializedAdditionalRawData, int? parameterServerCount, int? workerCount) : base(distributionType, serializedAdditionalRawData) + /// Number of parameter server tasks. + internal TensorFlowDistributionConfiguration(DistributionType distributionType, IDictionary serializedAdditionalRawData, int? workerCount, int? parameterServerCount) : base(distributionType, serializedAdditionalRawData) { - ParameterServerCount = parameterServerCount; WorkerCount = workerCount; + ParameterServerCount = parameterServerCount; DistributionType = distributionType; } - /// Number of parameter server tasks. - public int? ParameterServerCount { get; set; } /// Number of workers. If not specified, will default to the instance count. public int? WorkerCount { get; set; } + /// Number of parameter server tasks. + public int? ParameterServerCount { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.Serialization.cs index 4a46ae7bc00da..75695c754769d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.Serialization.cs @@ -31,28 +31,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("primaryMetric"u8); writer.WriteStringValue(PrimaryMetric.Value.ToString()); } - if (Optional.IsDefined(FeaturizationSettings)) + if (Optional.IsDefined(LimitSettings)) { - if (FeaturizationSettings != null) + if (LimitSettings != null) { - writer.WritePropertyName("featurizationSettings"u8); - writer.WriteObjectValue(FeaturizationSettings, options); + writer.WritePropertyName("limitSettings"u8); + writer.WriteObjectValue(LimitSettings, options); } else { - writer.WriteNull("featurizationSettings"); + writer.WriteNull("limitSettings"); } } - if (Optional.IsDefined(LimitSettings)) + if (Optional.IsDefined(FeaturizationSettings)) { - if (LimitSettings != null) + if (FeaturizationSettings != null) { - writer.WritePropertyName("limitSettings"u8); - writer.WriteObjectValue(LimitSettings, options); + writer.WritePropertyName("featurizationSettings"u8); + writer.WriteObjectValue(FeaturizationSettings, options); } else { - writer.WriteNull("limitSettings"); + writer.WriteNull("featurizationSettings"); } } if (Optional.IsDefined(ValidationData)) @@ -67,11 +67,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("validationData"); } } + writer.WritePropertyName("taskType"u8); + writer.WriteStringValue(TaskType.ToString()); if (Optional.IsDefined(LogVerbosity)) { writer.WritePropertyName("logVerbosity"u8); writer.WriteStringValue(LogVerbosity.Value.ToString()); } + writer.WritePropertyName("trainingData"u8); + writer.WriteObjectValue(TrainingData, options); if (Optional.IsDefined(TargetColumnName)) { if (TargetColumnName != null) @@ -84,10 +88,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("targetColumnName"); } } - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -127,13 +127,13 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele return null; } ClassificationPrimaryMetric? primaryMetric = default; - NlpVerticalFeaturizationSettings featurizationSettings = default; NlpVerticalLimitSettings limitSettings = default; + NlpVerticalFeaturizationSettings featurizationSettings = default; MachineLearningTableJobInput validationData = default; - MachineLearningLogVerbosity? logVerbosity = default; - string targetColumnName = default; TaskType taskType = default; + MachineLearningLogVerbosity? logVerbosity = default; MachineLearningTableJobInput trainingData = default; + string targetColumnName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -147,24 +147,24 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele primaryMetric = new ClassificationPrimaryMetric(property.Value.GetString()); continue; } - if (property.NameEquals("featurizationSettings"u8)) + if (property.NameEquals("limitSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - featurizationSettings = null; + limitSettings = null; continue; } - featurizationSettings = NlpVerticalFeaturizationSettings.DeserializeNlpVerticalFeaturizationSettings(property.Value, options); + limitSettings = NlpVerticalLimitSettings.DeserializeNlpVerticalLimitSettings(property.Value, options); continue; } - if (property.NameEquals("limitSettings"u8)) + if (property.NameEquals("featurizationSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - limitSettings = null; + featurizationSettings = null; continue; } - limitSettings = NlpVerticalLimitSettings.DeserializeNlpVerticalLimitSettings(property.Value, options); + featurizationSettings = NlpVerticalFeaturizationSettings.DeserializeNlpVerticalFeaturizationSettings(property.Value, options); continue; } if (property.NameEquals("validationData"u8)) @@ -177,6 +177,11 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); continue; } + if (property.NameEquals("taskType"u8)) + { + taskType = new TaskType(property.Value.GetString()); + continue; + } if (property.NameEquals("logVerbosity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -186,6 +191,11 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } + if (property.NameEquals("trainingData"u8)) + { + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); + continue; + } if (property.NameEquals("targetColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -196,16 +206,6 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele targetColumnName = property.Value.GetString(); continue; } - if (property.NameEquals("taskType"u8)) - { - taskType = new TaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData"u8)) - { - trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -213,14 +213,14 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele } serializedAdditionalRawData = rawDataDictionary; return new TextClassification( - logVerbosity, - targetColumnName, taskType, + logVerbosity, trainingData, + targetColumnName, serializedAdditionalRawData, primaryMetric, - featurizationSettings, limitSettings, + featurizationSettings, validationData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.cs index 22cf9fcea45fb..fdb405d8ad8ff 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.cs @@ -27,23 +27,23 @@ public TextClassification(MachineLearningTableJobInput trainingData) : base(trai } /// Initializes a new instance of . + /// [Required] Task type for AutoMLJob. /// Log verbosity for the job. + /// [Required] Training data input. /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. /// Keeps track of any properties unknown to the library. /// Primary metric for Text-Classification task. - /// Featurization inputs needed for AutoML job. /// Execution constraints for AutoMLJob. + /// Featurization inputs needed for AutoML job. /// Validation data inputs. - internal TextClassification(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, IDictionary serializedAdditionalRawData, ClassificationPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpVerticalLimitSettings limitSettings, MachineLearningTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData, serializedAdditionalRawData) + internal TextClassification(TaskType taskType, MachineLearningLogVerbosity? logVerbosity, MachineLearningTableJobInput trainingData, string targetColumnName, IDictionary serializedAdditionalRawData, ClassificationPrimaryMetric? primaryMetric, NlpVerticalLimitSettings limitSettings, NlpVerticalFeaturizationSettings featurizationSettings, MachineLearningTableJobInput validationData) : base(taskType, logVerbosity, trainingData, targetColumnName, serializedAdditionalRawData) { PrimaryMetric = primaryMetric; - FeaturizationSettings = featurizationSettings; LimitSettings = limitSettings; + FeaturizationSettings = featurizationSettings; ValidationData = validationData; TaskType = taskType; } @@ -55,6 +55,8 @@ internal TextClassification() /// Primary metric for Text-Classification task. public ClassificationPrimaryMetric? PrimaryMetric { get; set; } + /// Execution constraints for AutoMLJob. + public NlpVerticalLimitSettings LimitSettings { get; set; } /// Featurization inputs needed for AutoML job. internal NlpVerticalFeaturizationSettings FeaturizationSettings { get; set; } /// Dataset language, useful for the text data. @@ -69,8 +71,6 @@ public string FeaturizationDatasetLanguage } } - /// Execution constraints for AutoMLJob. - public NlpVerticalLimitSettings LimitSettings { get; set; } /// Validation data inputs. public MachineLearningTableJobInput ValidationData { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.Serialization.cs index 2b00747058a1b..48f1de4884657 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.Serialization.cs @@ -31,28 +31,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WritePropertyName("primaryMetric"u8); writer.WriteStringValue(PrimaryMetric.Value.ToString()); } - if (Optional.IsDefined(FeaturizationSettings)) + if (Optional.IsDefined(LimitSettings)) { - if (FeaturizationSettings != null) + if (LimitSettings != null) { - writer.WritePropertyName("featurizationSettings"u8); - writer.WriteObjectValue(FeaturizationSettings, options); + writer.WritePropertyName("limitSettings"u8); + writer.WriteObjectValue(LimitSettings, options); } else { - writer.WriteNull("featurizationSettings"); + writer.WriteNull("limitSettings"); } } - if (Optional.IsDefined(LimitSettings)) + if (Optional.IsDefined(FeaturizationSettings)) { - if (LimitSettings != null) + if (FeaturizationSettings != null) { - writer.WritePropertyName("limitSettings"u8); - writer.WriteObjectValue(LimitSettings, options); + writer.WritePropertyName("featurizationSettings"u8); + writer.WriteObjectValue(FeaturizationSettings, options); } else { - writer.WriteNull("limitSettings"); + writer.WriteNull("featurizationSettings"); } } if (Optional.IsDefined(ValidationData)) @@ -67,11 +67,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteNull("validationData"); } } + writer.WritePropertyName("taskType"u8); + writer.WriteStringValue(TaskType.ToString()); if (Optional.IsDefined(LogVerbosity)) { writer.WritePropertyName("logVerbosity"u8); writer.WriteStringValue(LogVerbosity.Value.ToString()); } + writer.WritePropertyName("trainingData"u8); + writer.WriteObjectValue(TrainingData, options); if (Optional.IsDefined(TargetColumnName)) { if (TargetColumnName != null) @@ -84,10 +88,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteNull("targetColumnName"); } } - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -127,13 +127,13 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil return null; } ClassificationMultilabelPrimaryMetric? primaryMetric = default; - NlpVerticalFeaturizationSettings featurizationSettings = default; NlpVerticalLimitSettings limitSettings = default; + NlpVerticalFeaturizationSettings featurizationSettings = default; MachineLearningTableJobInput validationData = default; - MachineLearningLogVerbosity? logVerbosity = default; - string targetColumnName = default; TaskType taskType = default; + MachineLearningLogVerbosity? logVerbosity = default; MachineLearningTableJobInput trainingData = default; + string targetColumnName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -147,24 +147,24 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil primaryMetric = new ClassificationMultilabelPrimaryMetric(property.Value.GetString()); continue; } - if (property.NameEquals("featurizationSettings"u8)) + if (property.NameEquals("limitSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - featurizationSettings = null; + limitSettings = null; continue; } - featurizationSettings = NlpVerticalFeaturizationSettings.DeserializeNlpVerticalFeaturizationSettings(property.Value, options); + limitSettings = NlpVerticalLimitSettings.DeserializeNlpVerticalLimitSettings(property.Value, options); continue; } - if (property.NameEquals("limitSettings"u8)) + if (property.NameEquals("featurizationSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - limitSettings = null; + featurizationSettings = null; continue; } - limitSettings = NlpVerticalLimitSettings.DeserializeNlpVerticalLimitSettings(property.Value, options); + featurizationSettings = NlpVerticalFeaturizationSettings.DeserializeNlpVerticalFeaturizationSettings(property.Value, options); continue; } if (property.NameEquals("validationData"u8)) @@ -177,6 +177,11 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); continue; } + if (property.NameEquals("taskType"u8)) + { + taskType = new TaskType(property.Value.GetString()); + continue; + } if (property.NameEquals("logVerbosity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -186,6 +191,11 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } + if (property.NameEquals("trainingData"u8)) + { + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); + continue; + } if (property.NameEquals("targetColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -196,16 +206,6 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil targetColumnName = property.Value.GetString(); continue; } - if (property.NameEquals("taskType"u8)) - { - taskType = new TaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData"u8)) - { - trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -213,14 +213,14 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil } serializedAdditionalRawData = rawDataDictionary; return new TextClassificationMultilabel( - logVerbosity, - targetColumnName, taskType, + logVerbosity, trainingData, + targetColumnName, serializedAdditionalRawData, primaryMetric, - featurizationSettings, limitSettings, + featurizationSettings, validationData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.cs index 64180f34e8eb8..a9d41d0ad8e41 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.cs @@ -27,26 +27,26 @@ public TextClassificationMultilabel(MachineLearningTableJobInput trainingData) : } /// Initializes a new instance of . + /// [Required] Task type for AutoMLJob. /// Log verbosity for the job. + /// [Required] Training data input. /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. /// Keeps track of any properties unknown to the library. /// /// Primary metric for Text-Classification-Multilabel task. /// Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. /// - /// Featurization inputs needed for AutoML job. /// Execution constraints for AutoMLJob. + /// Featurization inputs needed for AutoML job. /// Validation data inputs. - internal TextClassificationMultilabel(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, IDictionary serializedAdditionalRawData, ClassificationMultilabelPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpVerticalLimitSettings limitSettings, MachineLearningTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData, serializedAdditionalRawData) + internal TextClassificationMultilabel(TaskType taskType, MachineLearningLogVerbosity? logVerbosity, MachineLearningTableJobInput trainingData, string targetColumnName, IDictionary serializedAdditionalRawData, ClassificationMultilabelPrimaryMetric? primaryMetric, NlpVerticalLimitSettings limitSettings, NlpVerticalFeaturizationSettings featurizationSettings, MachineLearningTableJobInput validationData) : base(taskType, logVerbosity, trainingData, targetColumnName, serializedAdditionalRawData) { PrimaryMetric = primaryMetric; - FeaturizationSettings = featurizationSettings; LimitSettings = limitSettings; + FeaturizationSettings = featurizationSettings; ValidationData = validationData; TaskType = taskType; } @@ -61,6 +61,8 @@ internal TextClassificationMultilabel() /// Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. /// public ClassificationMultilabelPrimaryMetric? PrimaryMetric { get; } + /// Execution constraints for AutoMLJob. + public NlpVerticalLimitSettings LimitSettings { get; set; } /// Featurization inputs needed for AutoML job. internal NlpVerticalFeaturizationSettings FeaturizationSettings { get; set; } /// Dataset language, useful for the text data. @@ -75,8 +77,6 @@ public string FeaturizationDatasetLanguage } } - /// Execution constraints for AutoMLJob. - public NlpVerticalLimitSettings LimitSettings { get; set; } /// Validation data inputs. public MachineLearningTableJobInput ValidationData { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.Serialization.cs index 8cf7134c1e389..4eacedae5bccb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.Serialization.cs @@ -31,28 +31,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o writer.WritePropertyName("primaryMetric"u8); writer.WriteStringValue(PrimaryMetric.Value.ToString()); } - if (Optional.IsDefined(FeaturizationSettings)) + if (Optional.IsDefined(LimitSettings)) { - if (FeaturizationSettings != null) + if (LimitSettings != null) { - writer.WritePropertyName("featurizationSettings"u8); - writer.WriteObjectValue(FeaturizationSettings, options); + writer.WritePropertyName("limitSettings"u8); + writer.WriteObjectValue(LimitSettings, options); } else { - writer.WriteNull("featurizationSettings"); + writer.WriteNull("limitSettings"); } } - if (Optional.IsDefined(LimitSettings)) + if (Optional.IsDefined(FeaturizationSettings)) { - if (LimitSettings != null) + if (FeaturizationSettings != null) { - writer.WritePropertyName("limitSettings"u8); - writer.WriteObjectValue(LimitSettings, options); + writer.WritePropertyName("featurizationSettings"u8); + writer.WriteObjectValue(FeaturizationSettings, options); } else { - writer.WriteNull("limitSettings"); + writer.WriteNull("featurizationSettings"); } } if (Optional.IsDefined(ValidationData)) @@ -67,11 +67,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o writer.WriteNull("validationData"); } } + writer.WritePropertyName("taskType"u8); + writer.WriteStringValue(TaskType.ToString()); if (Optional.IsDefined(LogVerbosity)) { writer.WritePropertyName("logVerbosity"u8); writer.WriteStringValue(LogVerbosity.Value.ToString()); } + writer.WritePropertyName("trainingData"u8); + writer.WriteObjectValue(TrainingData, options); if (Optional.IsDefined(TargetColumnName)) { if (TargetColumnName != null) @@ -84,10 +88,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions o writer.WriteNull("targetColumnName"); } } - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -127,13 +127,13 @@ internal static TextNer DeserializeTextNer(JsonElement element, ModelReaderWrite return null; } ClassificationPrimaryMetric? primaryMetric = default; - NlpVerticalFeaturizationSettings featurizationSettings = default; NlpVerticalLimitSettings limitSettings = default; + NlpVerticalFeaturizationSettings featurizationSettings = default; MachineLearningTableJobInput validationData = default; - MachineLearningLogVerbosity? logVerbosity = default; - string targetColumnName = default; TaskType taskType = default; + MachineLearningLogVerbosity? logVerbosity = default; MachineLearningTableJobInput trainingData = default; + string targetColumnName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -147,24 +147,24 @@ internal static TextNer DeserializeTextNer(JsonElement element, ModelReaderWrite primaryMetric = new ClassificationPrimaryMetric(property.Value.GetString()); continue; } - if (property.NameEquals("featurizationSettings"u8)) + if (property.NameEquals("limitSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - featurizationSettings = null; + limitSettings = null; continue; } - featurizationSettings = NlpVerticalFeaturizationSettings.DeserializeNlpVerticalFeaturizationSettings(property.Value, options); + limitSettings = NlpVerticalLimitSettings.DeserializeNlpVerticalLimitSettings(property.Value, options); continue; } - if (property.NameEquals("limitSettings"u8)) + if (property.NameEquals("featurizationSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - limitSettings = null; + featurizationSettings = null; continue; } - limitSettings = NlpVerticalLimitSettings.DeserializeNlpVerticalLimitSettings(property.Value, options); + featurizationSettings = NlpVerticalFeaturizationSettings.DeserializeNlpVerticalFeaturizationSettings(property.Value, options); continue; } if (property.NameEquals("validationData"u8)) @@ -177,6 +177,11 @@ internal static TextNer DeserializeTextNer(JsonElement element, ModelReaderWrite validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); continue; } + if (property.NameEquals("taskType"u8)) + { + taskType = new TaskType(property.Value.GetString()); + continue; + } if (property.NameEquals("logVerbosity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -186,6 +191,11 @@ internal static TextNer DeserializeTextNer(JsonElement element, ModelReaderWrite logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } + if (property.NameEquals("trainingData"u8)) + { + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); + continue; + } if (property.NameEquals("targetColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -196,16 +206,6 @@ internal static TextNer DeserializeTextNer(JsonElement element, ModelReaderWrite targetColumnName = property.Value.GetString(); continue; } - if (property.NameEquals("taskType"u8)) - { - taskType = new TaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData"u8)) - { - trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -213,14 +213,14 @@ internal static TextNer DeserializeTextNer(JsonElement element, ModelReaderWrite } serializedAdditionalRawData = rawDataDictionary; return new TextNer( - logVerbosity, - targetColumnName, taskType, + logVerbosity, trainingData, + targetColumnName, serializedAdditionalRawData, primaryMetric, - featurizationSettings, limitSettings, + featurizationSettings, validationData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.cs index 0e7a659de83fc..608e148911de2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.cs @@ -28,26 +28,26 @@ public TextNer(MachineLearningTableJobInput trainingData) : base(trainingData) } /// Initializes a new instance of . + /// [Required] Task type for AutoMLJob. /// Log verbosity for the job. + /// [Required] Training data input. /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. /// Keeps track of any properties unknown to the library. /// /// Primary metric for Text-NER task. /// Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. /// - /// Featurization inputs needed for AutoML job. /// Execution constraints for AutoMLJob. + /// Featurization inputs needed for AutoML job. /// Validation data inputs. - internal TextNer(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, IDictionary serializedAdditionalRawData, ClassificationPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpVerticalLimitSettings limitSettings, MachineLearningTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData, serializedAdditionalRawData) + internal TextNer(TaskType taskType, MachineLearningLogVerbosity? logVerbosity, MachineLearningTableJobInput trainingData, string targetColumnName, IDictionary serializedAdditionalRawData, ClassificationPrimaryMetric? primaryMetric, NlpVerticalLimitSettings limitSettings, NlpVerticalFeaturizationSettings featurizationSettings, MachineLearningTableJobInput validationData) : base(taskType, logVerbosity, trainingData, targetColumnName, serializedAdditionalRawData) { PrimaryMetric = primaryMetric; - FeaturizationSettings = featurizationSettings; LimitSettings = limitSettings; + FeaturizationSettings = featurizationSettings; ValidationData = validationData; TaskType = taskType; } @@ -62,6 +62,8 @@ internal TextNer() /// Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. /// public ClassificationPrimaryMetric? PrimaryMetric { get; } + /// Execution constraints for AutoMLJob. + public NlpVerticalLimitSettings LimitSettings { get; set; } /// Featurization inputs needed for AutoML job. internal NlpVerticalFeaturizationSettings FeaturizationSettings { get; set; } /// Dataset language, useful for the text data. @@ -76,8 +78,6 @@ public string FeaturizationDatasetLanguage } } - /// Execution constraints for AutoMLJob. - public NlpVerticalLimitSettings LimitSettings { get; set; } /// Validation data inputs. public MachineLearningTableJobInput ValidationData { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TmpfsOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TmpfsOptions.cs index 2db8055ce43e7..53dbb458bc21e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TmpfsOptions.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TmpfsOptions.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The TmpfsOptions. + /// Describes the tmpfs options for the container. internal partial class TmpfsOptions { /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TruncationSelectionPolicy.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TruncationSelectionPolicy.Serialization.cs index a0a47f48ece38..7c1ded0213838 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TruncationSelectionPolicy.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TruncationSelectionPolicy.Serialization.cs @@ -31,18 +31,18 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea writer.WritePropertyName("truncationPercentage"u8); writer.WriteNumberValue(TruncationPercentage.Value); } - if (Optional.IsDefined(DelayEvaluation)) - { - writer.WritePropertyName("delayEvaluation"u8); - writer.WriteNumberValue(DelayEvaluation.Value); - } + writer.WritePropertyName("policyType"u8); + writer.WriteStringValue(PolicyType.ToString()); if (Optional.IsDefined(EvaluationInterval)) { writer.WritePropertyName("evaluationInterval"u8); writer.WriteNumberValue(EvaluationInterval.Value); } - writer.WritePropertyName("policyType"u8); - writer.WriteStringValue(PolicyType.ToString()); + if (Optional.IsDefined(DelayEvaluation)) + { + writer.WritePropertyName("delayEvaluation"u8); + writer.WriteNumberValue(DelayEvaluation.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -82,9 +82,9 @@ internal static TruncationSelectionPolicy DeserializeTruncationSelectionPolicy(J return null; } int? truncationPercentage = default; - int? delayEvaluation = default; - int? evaluationInterval = default; EarlyTerminationPolicyType policyType = default; + int? evaluationInterval = default; + int? delayEvaluation = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -98,13 +98,9 @@ internal static TruncationSelectionPolicy DeserializeTruncationSelectionPolicy(J truncationPercentage = property.Value.GetInt32(); continue; } - if (property.NameEquals("delayEvaluation"u8)) + if (property.NameEquals("policyType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - delayEvaluation = property.Value.GetInt32(); + policyType = new EarlyTerminationPolicyType(property.Value.GetString()); continue; } if (property.NameEquals("evaluationInterval"u8)) @@ -116,9 +112,13 @@ internal static TruncationSelectionPolicy DeserializeTruncationSelectionPolicy(J evaluationInterval = property.Value.GetInt32(); continue; } - if (property.NameEquals("policyType"u8)) + if (property.NameEquals("delayEvaluation"u8)) { - policyType = new EarlyTerminationPolicyType(property.Value.GetString()); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delayEvaluation = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -127,7 +127,7 @@ internal static TruncationSelectionPolicy DeserializeTruncationSelectionPolicy(J } } serializedAdditionalRawData = rawDataDictionary; - return new TruncationSelectionPolicy(delayEvaluation, evaluationInterval, policyType, serializedAdditionalRawData, truncationPercentage); + return new TruncationSelectionPolicy(policyType, evaluationInterval, delayEvaluation, serializedAdditionalRawData, truncationPercentage); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TruncationSelectionPolicy.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TruncationSelectionPolicy.cs index 84e74ee3404f6..949efba965a51 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TruncationSelectionPolicy.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TruncationSelectionPolicy.cs @@ -20,12 +20,12 @@ public TruncationSelectionPolicy() } /// Initializes a new instance of . - /// Number of intervals by which to delay the first evaluation. - /// Interval (number of runs) between policy evaluations. /// [Required] Name of policy configuration. + /// Interval (number of runs) between policy evaluations. + /// Number of intervals by which to delay the first evaluation. /// Keeps track of any properties unknown to the library. /// The percentage of runs to cancel at each evaluation interval. - internal TruncationSelectionPolicy(int? delayEvaluation, int? evaluationInterval, EarlyTerminationPolicyType policyType, IDictionary serializedAdditionalRawData, int? truncationPercentage) : base(delayEvaluation, evaluationInterval, policyType, serializedAdditionalRawData) + internal TruncationSelectionPolicy(EarlyTerminationPolicyType policyType, int? evaluationInterval, int? delayEvaluation, IDictionary serializedAdditionalRawData, int? truncationPercentage) : base(policyType, evaluationInterval, delayEvaluation, serializedAdditionalRawData) { TruncationPercentage = truncationPercentage; PolicyType = policyType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAutoMLVertical.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAutoMLVertical.Serialization.cs index a0eb5e52273ea..b13e416020799 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAutoMLVertical.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAutoMLVertical.Serialization.cs @@ -26,11 +26,15 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp } writer.WriteStartObject(); + writer.WritePropertyName("taskType"u8); + writer.WriteStringValue(TaskType.ToString()); if (Optional.IsDefined(LogVerbosity)) { writer.WritePropertyName("logVerbosity"u8); writer.WriteStringValue(LogVerbosity.Value.ToString()); } + writer.WritePropertyName("trainingData"u8); + writer.WriteObjectValue(TrainingData, options); if (Optional.IsDefined(TargetColumnName)) { if (TargetColumnName != null) @@ -43,10 +47,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp writer.WriteNull("targetColumnName"); } } - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -85,14 +85,19 @@ internal static UnknownAutoMLVertical DeserializeUnknownAutoMLVertical(JsonEleme { return null; } - MachineLearningLogVerbosity? logVerbosity = default; - string targetColumnName = default; TaskType taskType = "Unknown"; + MachineLearningLogVerbosity? logVerbosity = default; MachineLearningTableJobInput trainingData = default; + string targetColumnName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("taskType"u8)) + { + taskType = new TaskType(property.Value.GetString()); + continue; + } if (property.NameEquals("logVerbosity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -102,6 +107,11 @@ internal static UnknownAutoMLVertical DeserializeUnknownAutoMLVertical(JsonEleme logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } + if (property.NameEquals("trainingData"u8)) + { + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); + continue; + } if (property.NameEquals("targetColumnName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -112,23 +122,13 @@ internal static UnknownAutoMLVertical DeserializeUnknownAutoMLVertical(JsonEleme targetColumnName = property.Value.GetString(); continue; } - if (property.NameEquals("taskType"u8)) - { - taskType = new TaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData"u8)) - { - trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value, options); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownAutoMLVertical(logVerbosity, targetColumnName, taskType, trainingData, serializedAdditionalRawData); + return new UnknownAutoMLVertical(taskType, logVerbosity, trainingData, targetColumnName, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAutoMLVertical.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAutoMLVertical.cs index 87d6896130327..e188291375275 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAutoMLVertical.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAutoMLVertical.cs @@ -14,15 +14,15 @@ namespace Azure.ResourceManager.MachineLearning.Models internal partial class UnknownAutoMLVertical : AutoMLVertical { /// Initializes a new instance of . + /// [Required] Task type for AutoMLJob. /// Log verbosity for the job. + /// [Required] Training data input. /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. /// Keeps track of any properties unknown to the library. - internal UnknownAutoMLVertical(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, IDictionary serializedAdditionalRawData) : base(logVerbosity, targetColumnName, taskType, trainingData, serializedAdditionalRawData) + internal UnknownAutoMLVertical(TaskType taskType, MachineLearningLogVerbosity? logVerbosity, MachineLearningTableJobInput trainingData, string targetColumnName, IDictionary serializedAdditionalRawData) : base(taskType, logVerbosity, trainingData, targetColumnName, serializedAdditionalRawData) { TaskType = taskType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataVersionBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataVersionBase.Serialization.cs index cebe9f2ce6ae7..264424615e97f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataVersionBase.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataVersionBase.Serialization.cs @@ -30,16 +30,16 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteStringValue(DataType.ToString()); writer.WritePropertyName("dataUri"u8); writer.WriteStringValue(DataUri.AbsoluteUri); - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"u8); - writer.WriteBooleanValue(IsAnonymous.Value); - } if (Optional.IsDefined(IsArchived)) { writer.WritePropertyName("isArchived"u8); writer.WriteBooleanValue(IsArchived.Value); } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"u8); + writer.WriteBooleanValue(IsAnonymous.Value); + } if (Optional.IsDefined(Description)) { if (Description != null) @@ -52,13 +52,13 @@ void IJsonModel.Write(Utf8JsonWriter write writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -67,16 +67,16 @@ void IJsonModel.Write(Utf8JsonWriter write } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -85,7 +85,7 @@ void IJsonModel.Write(Utf8JsonWriter write } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -128,11 +128,11 @@ internal static UnknownDataVersionBase DeserializeUnknownDataVersionBase(JsonEle } MachineLearningDataType dataType = "Unknown"; Uri dataUri = default; - bool? isAnonymous = default; bool? isArchived = default; + bool? isAnonymous = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -147,22 +147,22 @@ internal static UnknownDataVersionBase DeserializeUnknownDataVersionBase(JsonEle dataUri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("isAnonymous"u8)) + if (property.NameEquals("isArchived"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isAnonymous = property.Value.GetBoolean(); + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("isAnonymous"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - isArchived = property.Value.GetBoolean(); + isAnonymous = property.Value.GetBoolean(); continue; } if (property.NameEquals("description"u8)) @@ -175,11 +175,11 @@ internal static UnknownDataVersionBase DeserializeUnknownDataVersionBase(JsonEle description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -187,14 +187,14 @@ internal static UnknownDataVersionBase DeserializeUnknownDataVersionBase(JsonEle { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -202,7 +202,7 @@ internal static UnknownDataVersionBase DeserializeUnknownDataVersionBase(JsonEle { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -213,11 +213,11 @@ internal static UnknownDataVersionBase DeserializeUnknownDataVersionBase(JsonEle serializedAdditionalRawData = rawDataDictionary; return new UnknownDataVersionBase( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - isAnonymous, isArchived, + isAnonymous, dataType, dataUri); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataVersionBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataVersionBase.cs index c11919d2d430b..ecac608a1f539 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataVersionBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDataVersionBase.cs @@ -15,14 +15,14 @@ internal partial class UnknownDataVersionBase : MachineLearningDataVersionProper { /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// If the name version are system generated (anonymous registration). /// Is the asset archived?. + /// If the name version are system generated (anonymous registration). /// [Required] Specifies the type of data. /// [Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. - internal UnknownDataVersionBase(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri) : base(description, properties, tags, serializedAdditionalRawData, isAnonymous, isArchived, dataType, dataUri) + internal UnknownDataVersionBase(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, bool? isArchived, bool? isAnonymous, MachineLearningDataType dataType, Uri dataUri) : base(description, tags, properties, serializedAdditionalRawData, isArchived, isAnonymous, dataType, dataUri) { DataType = dataType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastore.Serialization.cs index ac882a7cc3643..ebc160f1029ba 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastore.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastore.Serialization.cs @@ -26,8 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, } writer.WriteStartObject(); - writer.WritePropertyName("credentials"u8); - writer.WriteObjectValue(Credentials, options); writer.WritePropertyName("datastoreType"u8); writer.WriteStringValue(DatastoreType.ToString()); if (options.Format != "W" && Optional.IsDefined(IsDefault)) @@ -35,6 +33,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WritePropertyName("isDefault"u8); writer.WriteBooleanValue(IsDefault.Value); } + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials, options); if (Optional.IsDefined(Description)) { if (Description != null) @@ -47,13 +47,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -62,16 +62,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -80,7 +80,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -121,21 +121,16 @@ internal static UnknownDatastore DeserializeUnknownDatastore(JsonElement element { return null; } - MachineLearningDatastoreCredentials credentials = default; DatastoreType datastoreType = "Unknown"; bool? isDefault = default; + MachineLearningDatastoreCredentials credentials = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("credentials"u8)) - { - credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value, options); - continue; - } if (property.NameEquals("datastoreType"u8)) { datastoreType = new DatastoreType(property.Value.GetString()); @@ -150,6 +145,11 @@ internal static UnknownDatastore DeserializeUnknownDatastore(JsonElement element isDefault = property.Value.GetBoolean(); continue; } + if (property.NameEquals("credentials"u8)) + { + credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value, options); + continue; + } if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -160,11 +160,11 @@ internal static UnknownDatastore DeserializeUnknownDatastore(JsonElement element description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -172,14 +172,14 @@ internal static UnknownDatastore DeserializeUnknownDatastore(JsonElement element { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -187,7 +187,7 @@ internal static UnknownDatastore DeserializeUnknownDatastore(JsonElement element { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -198,12 +198,12 @@ internal static UnknownDatastore DeserializeUnknownDatastore(JsonElement element serializedAdditionalRawData = rawDataDictionary; return new UnknownDatastore( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - credentials, datastoreType, - isDefault); + isDefault, + credentials); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastore.cs index bf51703a36caf..e88ecbd7ffce4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastore.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastore.cs @@ -15,17 +15,17 @@ internal partial class UnknownDatastore : MachineLearningDatastoreProperties { /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. + /// [Required] Storage type backing the datastore. + /// Readonly property to indicate if datastore is the workspace default datastore. /// /// [Required] Account credentials. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , and . /// - /// [Required] Storage type backing the datastore. - /// Readonly property to indicate if datastore is the workspace default datastore. - internal UnknownDatastore(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault) : base(description, properties, tags, serializedAdditionalRawData, credentials, datastoreType, isDefault) + internal UnknownDatastore(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, DatastoreType datastoreType, bool? isDefault, MachineLearningDatastoreCredentials credentials) : base(description, tags, properties, serializedAdditionalRawData, datastoreType, isDefault, credentials) { DatastoreType = datastoreType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEarlyTerminationPolicy.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEarlyTerminationPolicy.Serialization.cs index 55914e1251623..c2400fcd96cd3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEarlyTerminationPolicy.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEarlyTerminationPolicy.Serialization.cs @@ -26,18 +26,18 @@ void IJsonModel.Write(Utf8JsonWriter writ } writer.WriteStartObject(); - if (Optional.IsDefined(DelayEvaluation)) - { - writer.WritePropertyName("delayEvaluation"u8); - writer.WriteNumberValue(DelayEvaluation.Value); - } + writer.WritePropertyName("policyType"u8); + writer.WriteStringValue(PolicyType.ToString()); if (Optional.IsDefined(EvaluationInterval)) { writer.WritePropertyName("evaluationInterval"u8); writer.WriteNumberValue(EvaluationInterval.Value); } - writer.WritePropertyName("policyType"u8); - writer.WriteStringValue(PolicyType.ToString()); + if (Optional.IsDefined(DelayEvaluation)) + { + writer.WritePropertyName("delayEvaluation"u8); + writer.WriteNumberValue(DelayEvaluation.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -76,20 +76,16 @@ internal static UnknownEarlyTerminationPolicy DeserializeUnknownEarlyTermination { return null; } - int? delayEvaluation = default; - int? evaluationInterval = default; EarlyTerminationPolicyType policyType = "Unknown"; + int? evaluationInterval = default; + int? delayEvaluation = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("delayEvaluation"u8)) + if (property.NameEquals("policyType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - delayEvaluation = property.Value.GetInt32(); + policyType = new EarlyTerminationPolicyType(property.Value.GetString()); continue; } if (property.NameEquals("evaluationInterval"u8)) @@ -101,9 +97,13 @@ internal static UnknownEarlyTerminationPolicy DeserializeUnknownEarlyTermination evaluationInterval = property.Value.GetInt32(); continue; } - if (property.NameEquals("policyType"u8)) + if (property.NameEquals("delayEvaluation"u8)) { - policyType = new EarlyTerminationPolicyType(property.Value.GetString()); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delayEvaluation = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -112,7 +112,7 @@ internal static UnknownEarlyTerminationPolicy DeserializeUnknownEarlyTermination } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownEarlyTerminationPolicy(delayEvaluation, evaluationInterval, policyType, serializedAdditionalRawData); + return new UnknownEarlyTerminationPolicy(policyType, evaluationInterval, delayEvaluation, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEarlyTerminationPolicy.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEarlyTerminationPolicy.cs index 36bf661e34732..39ab32e443cd7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEarlyTerminationPolicy.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEarlyTerminationPolicy.cs @@ -14,11 +14,11 @@ namespace Azure.ResourceManager.MachineLearning.Models internal partial class UnknownEarlyTerminationPolicy : MachineLearningEarlyTerminationPolicy { /// Initializes a new instance of . - /// Number of intervals by which to delay the first evaluation. - /// Interval (number of runs) between policy evaluations. /// [Required] Name of policy configuration. + /// Interval (number of runs) between policy evaluations. + /// Number of intervals by which to delay the first evaluation. /// Keeps track of any properties unknown to the library. - internal UnknownEarlyTerminationPolicy(int? delayEvaluation, int? evaluationInterval, EarlyTerminationPolicyType policyType, IDictionary serializedAdditionalRawData) : base(delayEvaluation, evaluationInterval, policyType, serializedAdditionalRawData) + internal UnknownEarlyTerminationPolicy(EarlyTerminationPolicyType policyType, int? evaluationInterval, int? delayEvaluation, IDictionary serializedAdditionalRawData) : base(policyType, evaluationInterval, delayEvaluation, serializedAdditionalRawData) { PolicyType = policyType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEndpointDeploymentResourceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEndpointDeploymentResourceProperties.Serialization.cs deleted file mode 100644 index 559203e2f1ed6..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEndpointDeploymentResourceProperties.Serialization.cs +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class UnknownEndpointDeploymentResourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointDeploymentResourceProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(FailureReason)) - { - writer.WritePropertyName("failureReason"u8); - writer.WriteStringValue(FailureReason); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - writer.WritePropertyName("type"u8); - writer.WriteStringValue(EndpointDeploymentResourcePropertiesType); - 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 - } - } - writer.WriteEndObject(); - } - - EndpointDeploymentResourceProperties 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(EndpointDeploymentResourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointDeploymentResourceProperties(document.RootElement, options); - } - - internal static UnknownEndpointDeploymentResourceProperties DeserializeUnknownEndpointDeploymentResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string failureReason = default; - DefaultResourceProvisioningState? provisioningState = default; - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("failureReason"u8)) - { - failureReason = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new DefaultResourceProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownEndpointDeploymentResourceProperties(failureReason, provisioningState, type, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointDeploymentResourceProperties)} does not support writing '{options.Format}' format."); - } - } - - EndpointDeploymentResourceProperties 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 DeserializeEndpointDeploymentResourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointDeploymentResourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEndpointDeploymentResourceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEndpointDeploymentResourceProperties.cs deleted file mode 100644 index 24651ee23ad78..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEndpointDeploymentResourceProperties.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Unknown version of EndpointDeploymentResourceProperties. - internal partial class UnknownEndpointDeploymentResourceProperties : EndpointDeploymentResourceProperties - { - /// Initializes a new instance of . - /// The failure reason if the creation failed. - /// Read-only provision state status property. - /// Kind of the deployment. - /// Keeps track of any properties unknown to the library. - internal UnknownEndpointDeploymentResourceProperties(string failureReason, DefaultResourceProvisioningState? provisioningState, string endpointDeploymentResourcePropertiesType, IDictionary serializedAdditionalRawData) : base(failureReason, provisioningState, endpointDeploymentResourcePropertiesType, serializedAdditionalRawData) - { - EndpointDeploymentResourcePropertiesType = endpointDeploymentResourcePropertiesType ?? "Unknown"; - } - - /// Initializes a new instance of for deserialization. - internal UnknownEndpointDeploymentResourceProperties() - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEndpointResourceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEndpointResourceProperties.Serialization.cs deleted file mode 100644 index 83517db80a0ad..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEndpointResourceProperties.Serialization.cs +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class UnknownEndpointResourceProperties : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(EndpointResourceProperties)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - if (Optional.IsDefined(AssociatedResourceId)) - { - writer.WritePropertyName("associatedResourceId"u8); - writer.WriteStringValue(AssociatedResourceId); - } - if (Optional.IsCollectionDefined(Deployments)) - { - writer.WritePropertyName("deployments"u8); - writer.WriteStartArray(); - foreach (var item in Deployments) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - writer.WritePropertyName("endpointType"u8); - writer.WriteStringValue(EndpointType.ToString()); - if (Optional.IsDefined(EndpointUri)) - { - writer.WritePropertyName("endpointUri"u8); - writer.WriteStringValue(EndpointUri.AbsoluteUri); - } - if (Optional.IsDefined(FailureReason)) - { - writer.WritePropertyName("failureReason"u8); - writer.WriteStringValue(FailureReason); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(ShouldCreateAiServicesEndpoint)) - { - writer.WritePropertyName("shouldCreateAiServicesEndpoint"u8); - writer.WriteBooleanValue(ShouldCreateAiServicesEndpoint.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 - } - } - writer.WriteEndObject(); - } - - EndpointResourceProperties 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(EndpointResourceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEndpointResourceProperties(document.RootElement, options); - } - - internal static UnknownEndpointResourceProperties DeserializeUnknownEndpointResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResourceIdentifier associatedResourceId = default; - IList deployments = default; - EndpointType endpointType = "Unknown"; - Uri endpointUri = default; - string failureReason = default; - AzureLocation? location = default; - string name = default; - DefaultResourceProvisioningState? provisioningState = default; - bool? shouldCreateAiServicesEndpoint = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("associatedResourceId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - associatedResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("deployments"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(item, options)); - } - deployments = array; - continue; - } - if (property.NameEquals("endpointType"u8)) - { - endpointType = new EndpointType(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpointUri"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endpointUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("failureReason"u8)) - { - failureReason = property.Value.GetString(); - continue; - } - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - provisioningState = new DefaultResourceProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("shouldCreateAiServicesEndpoint"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - shouldCreateAiServicesEndpoint = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownEndpointResourceProperties( - associatedResourceId, - deployments ?? new ChangeTrackingList(), - endpointType, - endpointUri, - failureReason, - location, - name, - provisioningState, - shouldCreateAiServicesEndpoint, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(EndpointResourceProperties)} does not support writing '{options.Format}' format."); - } - } - - EndpointResourceProperties 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 DeserializeEndpointResourceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EndpointResourceProperties)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEndpointResourceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEndpointResourceProperties.cs deleted file mode 100644 index 834f1d27d801c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEndpointResourceProperties.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Unknown version of EndpointResourceProperties. - internal partial class UnknownEndpointResourceProperties : EndpointResourceProperties - { - /// Initializes a new instance of . - /// Byo resource id for creating the built-in model service endpoints. - /// Deployments info. - /// Type of the endpoint. - /// Uri of the endpoint. - /// The failure reason if the creation failed. - /// - /// Location of the endpoint. - /// Since input dto and when parse endpoint resource share the same contract - /// this Location field is just for parse the endpoint resource info - /// we won't let customer specify the endpoint resource location since we will create it the same location as workspace - /// - /// Name of the endpoint. - /// Read-only provision state status property. - /// Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. - /// Keeps track of any properties unknown to the library. - internal UnknownEndpointResourceProperties(ResourceIdentifier associatedResourceId, IList deployments, EndpointType endpointType, Uri endpointUri, string failureReason, AzureLocation? location, string name, DefaultResourceProvisioningState? provisioningState, bool? shouldCreateAiServicesEndpoint, IDictionary serializedAdditionalRawData) : base(associatedResourceId, deployments, endpointType, endpointUri, failureReason, location, name, provisioningState, shouldCreateAiServicesEndpoint, serializedAdditionalRawData) - { - EndpointType = endpointType; - } - - /// Initializes a new instance of for deserialization. - internal UnknownEndpointResourceProperties() - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownFineTuningVertical.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownFineTuningVertical.Serialization.cs deleted file mode 100644 index ab85d7c1c6d86..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownFineTuningVertical.Serialization.cs +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class UnknownFineTuningVertical : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(FineTuningVertical)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("modelProvider"u8); - writer.WriteStringValue(ModelProvider.ToString()); - writer.WritePropertyName("taskType"u8); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"u8); - writer.WriteObjectValue(TrainingData, options); - if (Optional.IsDefined(ValidationData)) - { - if (ValidationData != null) - { - writer.WritePropertyName("validationData"u8); - writer.WriteObjectValue(ValidationData, options); - } - else - { - writer.WriteNull("validationData"); - } - } - writer.WritePropertyName("model"u8); - writer.WriteObjectValue(Model, 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 - } - } - writer.WriteEndObject(); - } - - FineTuningVertical 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(FineTuningVertical)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFineTuningVertical(document.RootElement, options); - } - - internal static UnknownFineTuningVertical DeserializeUnknownFineTuningVertical(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ModelProvider modelProvider = "Unknown"; - FineTuningTaskType taskType = default; - MachineLearningJobInput trainingData = default; - MachineLearningJobInput validationData = default; - MachineLearningFlowModelJobInput model = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("modelProvider"u8)) - { - modelProvider = new ModelProvider(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskType"u8)) - { - taskType = new FineTuningTaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData"u8)) - { - trainingData = MachineLearningJobInput.DeserializeMachineLearningJobInput(property.Value, options); - continue; - } - if (property.NameEquals("validationData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - validationData = null; - continue; - } - validationData = MachineLearningJobInput.DeserializeMachineLearningJobInput(property.Value, options); - continue; - } - if (property.NameEquals("model"u8)) - { - model = MachineLearningFlowModelJobInput.DeserializeMachineLearningFlowModelJobInput(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownFineTuningVertical( - modelProvider, - taskType, - trainingData, - validationData, - model, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(FineTuningVertical)} does not support writing '{options.Format}' format."); - } - } - - FineTuningVertical 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 DeserializeFineTuningVertical(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(FineTuningVertical)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownFineTuningVertical.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownFineTuningVertical.cs deleted file mode 100644 index e33e8b3ad11a7..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownFineTuningVertical.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Unknown version of FineTuningVertical. - internal partial class UnknownFineTuningVertical : FineTuningVertical - { - /// Initializes a new instance of . - /// [Required] Enum to determine the type of fine tuning. - /// [Required] Fine tuning task type. - /// - /// [Required] Training data for fine tuning. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// - /// Validation data for fine tuning. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . - /// - /// [Required] Input model for fine tuning. - /// Keeps track of any properties unknown to the library. - internal UnknownFineTuningVertical(ModelProvider modelProvider, FineTuningTaskType taskType, MachineLearningJobInput trainingData, MachineLearningJobInput validationData, MachineLearningFlowModelJobInput model, IDictionary serializedAdditionalRawData) : base(modelProvider, taskType, trainingData, validationData, model, serializedAdditionalRawData) - { - ModelProvider = modelProvider; - } - - /// Initializes a new instance of for deserialization. - internal UnknownFineTuningVertical() - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobBase.Serialization.cs index fc6f6c9433706..2783c1d078f99 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobBase.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobBase.Serialization.cs @@ -26,46 +26,64 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } writer.WriteStartObject(); - if (Optional.IsDefined(ComponentId)) + writer.WritePropertyName("jobType"u8); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsDefined(DisplayName)) { - if (ComponentId != null) + if (DisplayName != null) { - writer.WritePropertyName("componentId"u8); - writer.WriteStringValue(ComponentId); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); } else { - writer.WriteNull("componentId"); + writer.WriteNull("displayName"); } } - if (Optional.IsDefined(ComputeId)) + if (options.Format != "W" && Optional.IsDefined(Status)) { - if (ComputeId != null) + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + } + if (Optional.IsCollectionDefined(Services)) + { + if (Services != null) { - writer.WritePropertyName("computeId"u8); - writer.WriteStringValue(ComputeId); + writer.WritePropertyName("services"u8); + writer.WriteStartObject(); + foreach (var item in Services) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); } else { - writer.WriteNull("computeId"); + writer.WriteNull("services"); } } - if (Optional.IsDefined(DisplayName)) + if (Optional.IsDefined(ComputeId)) { - if (DisplayName != null) + if (ComputeId != null) { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); + writer.WritePropertyName("computeId"u8); + writer.WriteStringValue(ComputeId); } else { - writer.WriteNull("displayName"); + writer.WriteNull("computeId"); } } - if (Optional.IsDefined(ExperimentName)) + if (Optional.IsDefined(IsArchived)) { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("isArchived"u8); + writer.WriteBooleanValue(IsArchived.Value); } if (Optional.IsDefined(Identity)) { @@ -79,48 +97,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteNull("identity"); } } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"u8); - writer.WriteBooleanValue(IsArchived.Value); - } - writer.WritePropertyName("jobType"u8); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsDefined(NotificationSetting)) + if (Optional.IsDefined(ComponentId)) { - if (NotificationSetting != null) + if (ComponentId != null) { - writer.WritePropertyName("notificationSetting"u8); - writer.WriteObjectValue(NotificationSetting, options); + writer.WritePropertyName("componentId"u8); + writer.WriteStringValue(ComponentId); } else { - writer.WriteNull("notificationSetting"); + writer.WriteNull("componentId"); } } - if (Optional.IsCollectionDefined(Services)) + if (Optional.IsDefined(NotificationSetting)) { - if (Services != null) + if (NotificationSetting != null) { - writer.WritePropertyName("services"u8); - writer.WriteStartObject(); - foreach (var item in Services) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); + writer.WritePropertyName("notificationSetting"u8); + writer.WriteObjectValue(NotificationSetting, options); } else { - writer.WriteNull("services"); + writer.WriteNull("notificationSetting"); } } - if (options.Format != "W" && Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } if (Optional.IsDefined(Description)) { if (Description != null) @@ -133,13 +133,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model writer.WriteNull("description"); } } - if (Optional.IsCollectionDefined(Properties)) + if (Optional.IsCollectionDefined(Tags)) { - if (Properties != null) + if (Tags != null) { - writer.WritePropertyName("properties"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartObject(); - foreach (var item in Properties) + foreach (var item in Tags) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -148,16 +148,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } else { - writer.WriteNull("properties"); + writer.WriteNull("tags"); } } - if (Optional.IsCollectionDefined(Tags)) + if (Optional.IsCollectionDefined(Properties)) { - if (Tags != null) + if (Properties != null) { - writer.WritePropertyName("tags"u8); + writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - foreach (var item in Tags) + foreach (var item in Properties) { writer.WritePropertyName(item.Key); writer.WriteStringValue(item.Value); @@ -166,7 +166,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Model } else { - writer.WriteNull("tags"); + writer.WriteNull("properties"); } } if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -207,51 +207,45 @@ internal static UnknownJobBase DeserializeUnknownJobBase(JsonElement element, Mo { return null; } - ResourceIdentifier componentId = default; - ResourceIdentifier computeId = default; + JobType jobType = "Unknown"; string displayName = default; + MachineLearningJobStatus? status = default; string experimentName = default; - MachineLearningIdentityConfiguration identity = default; + IDictionary services = default; + ResourceIdentifier computeId = default; bool? isArchived = default; - JobType jobType = "Unknown"; + MachineLearningIdentityConfiguration identity = default; + ResourceIdentifier componentId = default; NotificationSetting notificationSetting = default; - IDictionary services = default; - MachineLearningJobStatus? status = default; string description = default; - IDictionary properties = default; IDictionary tags = default; + IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("componentId"u8)) + if (property.NameEquals("jobType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - componentId = null; - continue; - } - componentId = new ResourceIdentifier(property.Value.GetString()); + jobType = new JobType(property.Value.GetString()); continue; } - if (property.NameEquals("computeId"u8)) + if (property.NameEquals("displayName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - computeId = null; + displayName = null; continue; } - computeId = new ResourceIdentifier(property.Value.GetString()); + displayName = property.Value.GetString(); continue; } - if (property.NameEquals("displayName"u8)) + if (property.NameEquals("status"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - displayName = null; continue; } - displayName = property.Value.GetString(); + status = new MachineLearningJobStatus(property.Value.GetString()); continue; } if (property.NameEquals("experimentName"u8)) @@ -259,62 +253,68 @@ internal static UnknownJobBase DeserializeUnknownJobBase(JsonElement element, Mo experimentName = property.Value.GetString(); continue; } - if (property.NameEquals("identity"u8)) + if (property.NameEquals("services"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - identity = null; + services = null; continue; } - identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value, options); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value, options)); + } + services = dictionary; continue; } - if (property.NameEquals("isArchived"u8)) + if (property.NameEquals("computeId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + computeId = null; continue; } - isArchived = property.Value.GetBoolean(); + computeId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("jobType"u8)) + if (property.NameEquals("isArchived"u8)) { - jobType = new JobType(property.Value.GetString()); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isArchived = property.Value.GetBoolean(); continue; } - if (property.NameEquals("notificationSetting"u8)) + if (property.NameEquals("identity"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - notificationSetting = null; + identity = null; continue; } - notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value, options); + identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value, options); continue; } - if (property.NameEquals("services"u8)) + if (property.NameEquals("componentId"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - services = null; + componentId = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value, options)); - } - services = dictionary; + componentId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("status"u8)) + if (property.NameEquals("notificationSetting"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + notificationSetting = null; continue; } - status = new MachineLearningJobStatus(property.Value.GetString()); + notificationSetting = NotificationSetting.DeserializeNotificationSetting(property.Value, options); continue; } if (property.NameEquals("description"u8)) @@ -327,11 +327,11 @@ internal static UnknownJobBase DeserializeUnknownJobBase(JsonElement element, Mo description = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + tags = null; continue; } Dictionary dictionary = new Dictionary(); @@ -339,14 +339,14 @@ internal static UnknownJobBase DeserializeUnknownJobBase(JsonElement element, Mo { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + tags = dictionary; continue; } - if (property.NameEquals("tags"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - tags = null; + properties = null; continue; } Dictionary dictionary = new Dictionary(); @@ -354,7 +354,7 @@ internal static UnknownJobBase DeserializeUnknownJobBase(JsonElement element, Mo { dictionary.Add(property0.Name, property0.Value.GetString()); } - tags = dictionary; + properties = dictionary; continue; } if (options.Format != "W") @@ -365,19 +365,19 @@ internal static UnknownJobBase DeserializeUnknownJobBase(JsonElement element, Mo serializedAdditionalRawData = rawDataDictionary; return new UnknownJobBase( description, - properties ?? new ChangeTrackingDictionary(), tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - componentId, - computeId, + jobType, displayName, + status, experimentName, - identity, - isArchived, - jobType, - notificationSetting, services ?? new ChangeTrackingDictionary(), - status); + computeId, + isArchived, + identity, + componentId, + notificationSetting); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobBase.cs index 468a345f2b3d9..620b6cfddf63d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobBase.cs @@ -16,28 +16,28 @@ internal partial class UnknownJobBase : MachineLearningJobProperties { /// Initializes a new instance of . /// The asset description text. - /// The asset property dictionary. /// Tag dictionary. Tags can be added, removed, and updated. + /// The asset property dictionary. /// Keeps track of any properties unknown to the library. - /// ARM resource ID of the component resource. - /// ARM resource ID of the compute resource. + /// [Required] Specifies the type of job. /// Display name of job. + /// Status of the job. /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// + /// ARM resource ID of the compute resource. + /// Is the asset archived?. /// /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. /// Defaults to AmlToken if null. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// - /// Is the asset archived?. - /// [Required] Specifies the type of job. + /// ARM resource ID of the component resource. /// Notification setting for the job. - /// - /// List of JobEndpoints. - /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. - /// - /// Status of the job. - internal UnknownJobBase(string description, IDictionary properties, IDictionary tags, IDictionary serializedAdditionalRawData, ResourceIdentifier componentId, ResourceIdentifier computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, NotificationSetting notificationSetting, IDictionary services, MachineLearningJobStatus? status) : base(description, properties, tags, serializedAdditionalRawData, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, notificationSetting, services, status) + internal UnknownJobBase(string description, IDictionary tags, IDictionary properties, IDictionary serializedAdditionalRawData, JobType jobType, string displayName, MachineLearningJobStatus? status, string experimentName, IDictionary services, ResourceIdentifier computeId, bool? isArchived, MachineLearningIdentityConfiguration identity, ResourceIdentifier componentId, NotificationSetting notificationSetting) : base(description, tags, properties, serializedAdditionalRawData, jobType, displayName, status, experimentName, services, computeId, isArchived, identity, componentId, notificationSetting) { JobType = jobType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobInput.Serialization.cs index 71233da3b53d2..90db3c1fd59d8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobInput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobInput.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteStartObject(); + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -38,8 +40,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNull("description"); } } - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,12 +78,17 @@ internal static UnknownJobInput DeserializeUnknownJobInput(JsonElement element, { return null; } - string description = default; JobInputType jobInputType = "Unknown"; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("jobInputType"u8)) + { + jobInputType = new JobInputType(property.Value.GetString()); + continue; + } if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -94,18 +99,13 @@ internal static UnknownJobInput DeserializeUnknownJobInput(JsonElement element, description = property.Value.GetString(); continue; } - if (property.NameEquals("jobInputType"u8)) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownJobInput(description, jobInputType, serializedAdditionalRawData); + return new UnknownJobInput(jobInputType, description, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobInput.cs index 242cb1565945a..dd5cf3eca5e24 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobInput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobInput.cs @@ -14,10 +14,10 @@ namespace Azure.ResourceManager.MachineLearning.Models internal partial class UnknownJobInput : MachineLearningJobInput { /// Initializes a new instance of . - /// Description for the input. /// [Required] Specifies the type of job. + /// Description for the input. /// Keeps track of any properties unknown to the library. - internal UnknownJobInput(string description, JobInputType jobInputType, IDictionary serializedAdditionalRawData) : base(description, jobInputType, serializedAdditionalRawData) + internal UnknownJobInput(JobInputType jobInputType, string description, IDictionary serializedAdditionalRawData) : base(jobInputType, description, serializedAdditionalRawData) { JobInputType = jobInputType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobOutput.Serialization.cs index 9cf17ae4ce4a7..aed03fac4ee09 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobOutput.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobOutput.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead } writer.WriteStartObject(); + writer.WritePropertyName("jobOutputType"u8); + writer.WriteStringValue(JobOutputType.ToString()); if (Optional.IsDefined(Description)) { if (Description != null) @@ -38,8 +40,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead writer.WriteNull("description"); } } - writer.WritePropertyName("jobOutputType"u8); - writer.WriteStringValue(JobOutputType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,12 +78,17 @@ internal static UnknownJobOutput DeserializeUnknownJobOutput(JsonElement element { return null; } - string description = default; JobOutputType jobOutputType = "Unknown"; + string description = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("jobOutputType"u8)) + { + jobOutputType = new JobOutputType(property.Value.GetString()); + continue; + } if (property.NameEquals("description"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -94,18 +99,13 @@ internal static UnknownJobOutput DeserializeUnknownJobOutput(JsonElement element description = property.Value.GetString(); continue; } - if (property.NameEquals("jobOutputType"u8)) - { - jobOutputType = new JobOutputType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownJobOutput(description, jobOutputType, serializedAdditionalRawData); + return new UnknownJobOutput(jobOutputType, description, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobOutput.cs index 8a3d4772f2c61..708e2a811b86e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobOutput.cs @@ -14,10 +14,10 @@ namespace Azure.ResourceManager.MachineLearning.Models internal partial class UnknownJobOutput : MachineLearningJobOutput { /// Initializes a new instance of . - /// Description for the output. /// [Required] Specifies the type of job. + /// Description for the output. /// Keeps track of any properties unknown to the library. - internal UnknownJobOutput(string description, JobOutputType jobOutputType, IDictionary serializedAdditionalRawData) : base(description, jobOutputType, serializedAdditionalRawData) + internal UnknownJobOutput(JobOutputType jobOutputType, string description, IDictionary serializedAdditionalRawData) : base(jobOutputType, description, serializedAdditionalRawData) { JobOutputType = jobOutputType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.Serialization.cs index c5047acfeb354..4226fbdada25c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.Serialization.cs @@ -26,6 +26,24 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteStartObject(); + writer.WritePropertyName("inputDataType"u8); + writer.WriteStringValue(InputDataType.ToString()); + if (Optional.IsDefined(DataContext)) + { + if (DataContext != null) + { + writer.WritePropertyName("dataContext"u8); + writer.WriteStringValue(DataContext); + } + else + { + writer.WriteNull("dataContext"); + } + } + writer.WritePropertyName("jobInputType"u8); + writer.WriteStringValue(JobInputType.ToString()); + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri.AbsoluteUri); if (Optional.IsCollectionDefined(Columns)) { if (Columns != null) @@ -44,24 +62,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade writer.WriteNull("columns"); } } - if (Optional.IsDefined(DataContext)) - { - if (DataContext != null) - { - writer.WritePropertyName("dataContext"u8); - writer.WriteStringValue(DataContext); - } - else - { - writer.WriteNull("dataContext"); - } - } - writer.WritePropertyName("inputDataType"u8); - writer.WriteStringValue(InputDataType.ToString()); - writer.WritePropertyName("jobInputType"u8); - writer.WriteStringValue(JobInputType.ToString()); - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(Uri.AbsoluteUri); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -100,28 +100,18 @@ internal static UnknownMonitoringInputDataBase DeserializeUnknownMonitoringInput { return null; } - IDictionary columns = default; - string dataContext = default; MonitoringInputDataType inputDataType = "Unknown"; + string dataContext = default; JobInputType jobInputType = default; Uri uri = default; + IDictionary columns = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("columns"u8)) + if (property.NameEquals("inputDataType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - columns = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - columns = dictionary; + inputDataType = new MonitoringInputDataType(property.Value.GetString()); continue; } if (property.NameEquals("dataContext"u8)) @@ -134,11 +124,6 @@ internal static UnknownMonitoringInputDataBase DeserializeUnknownMonitoringInput dataContext = property.Value.GetString(); continue; } - if (property.NameEquals("inputDataType"u8)) - { - inputDataType = new MonitoringInputDataType(property.Value.GetString()); - continue; - } if (property.NameEquals("jobInputType"u8)) { jobInputType = new JobInputType(property.Value.GetString()); @@ -149,6 +134,21 @@ internal static UnknownMonitoringInputDataBase DeserializeUnknownMonitoringInput uri = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("columns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + columns = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + columns = dictionary; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -156,11 +156,11 @@ internal static UnknownMonitoringInputDataBase DeserializeUnknownMonitoringInput } serializedAdditionalRawData = rawDataDictionary; return new UnknownMonitoringInputDataBase( - columns ?? new ChangeTrackingDictionary(), - dataContext, inputDataType, + dataContext, jobInputType, uri, + columns ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.cs index 142189c0fe9b5..7b24299bf6f6e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringInputDataBase.cs @@ -14,13 +14,13 @@ namespace Azure.ResourceManager.MachineLearning.Models internal partial class UnknownMonitoringInputDataBase : MonitoringInputDataBase { /// Initializes a new instance of . - /// Mapping of column names to special uses. - /// The context metadata of the data source. /// [Required] Specifies the type of signal to monitor. + /// The context metadata of the data source. /// [Required] Specifies the type of job. /// [Required] Input Asset URI. + /// Mapping of column names to special uses. /// Keeps track of any properties unknown to the library. - internal UnknownMonitoringInputDataBase(IDictionary columns, string dataContext, MonitoringInputDataType inputDataType, JobInputType jobInputType, Uri uri, IDictionary serializedAdditionalRawData) : base(columns, dataContext, inputDataType, jobInputType, uri, serializedAdditionalRawData) + internal UnknownMonitoringInputDataBase(MonitoringInputDataType inputDataType, string dataContext, JobInputType jobInputType, Uri uri, IDictionary columns, IDictionary serializedAdditionalRawData) : base(inputDataType, dataContext, jobInputType, uri, columns, serializedAdditionalRawData) { InputDataType = inputDataType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.Serialization.cs index 7283f86884741..68c90197c6a71 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr } writer.WriteStartObject(); + writer.WritePropertyName("signalType"u8); + writer.WriteStringValue(SignalType.ToString()); if (Optional.IsCollectionDefined(NotificationTypes)) { if (NotificationTypes != null) @@ -61,8 +63,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr writer.WriteNull("properties"); } } - writer.WritePropertyName("signalType"u8); - writer.WriteStringValue(SignalType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -101,13 +101,18 @@ internal static UnknownMonitoringSignalBase DeserializeUnknownMonitoringSignalBa { return null; } + MonitoringSignalType signalType = "Unknown"; IList notificationTypes = default; IDictionary properties = default; - MonitoringSignalType signalType = "Unknown"; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("signalType"u8)) + { + signalType = new MonitoringSignalType(property.Value.GetString()); + continue; + } if (property.NameEquals("notificationTypes"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -138,18 +143,13 @@ internal static UnknownMonitoringSignalBase DeserializeUnknownMonitoringSignalBa properties = dictionary; continue; } - if (property.NameEquals("signalType"u8)) - { - signalType = new MonitoringSignalType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownMonitoringSignalBase(notificationTypes ?? new ChangeTrackingList(), properties ?? new ChangeTrackingDictionary(), signalType, serializedAdditionalRawData); + return new UnknownMonitoringSignalBase(signalType, notificationTypes ?? new ChangeTrackingList(), properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.cs index 319fa731c4231..254ff9abf6439 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownMonitoringSignalBase.cs @@ -14,11 +14,11 @@ namespace Azure.ResourceManager.MachineLearning.Models internal partial class UnknownMonitoringSignalBase : MonitoringSignalBase { /// Initializes a new instance of . + /// [Required] Specifies the type of signal to monitor. /// The current notification mode for this signal. /// Property dictionary. Properties can be added, but not removed or altered. - /// [Required] Specifies the type of signal to monitor. /// Keeps track of any properties unknown to the library. - internal UnknownMonitoringSignalBase(IList notificationTypes, IDictionary properties, MonitoringSignalType signalType, IDictionary serializedAdditionalRawData) : base(notificationTypes, properties, signalType, serializedAdditionalRawData) + internal UnknownMonitoringSignalBase(MonitoringSignalType signalType, IList notificationTypes, IDictionary properties, IDictionary serializedAdditionalRawData) : base(signalType, notificationTypes, properties, serializedAdditionalRawData) { SignalType = signalType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.Serialization.cs index 64a079d7a59fe..55bf6743dc628 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.Serialization.cs @@ -26,10 +26,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO } writer.WriteStartObject(); - writer.WritePropertyName("artifactName"u8); - writer.WriteStringValue(ArtifactName); writer.WritePropertyName("artifactType"u8); writer.WriteStringValue(ArtifactType.ToString()); + writer.WritePropertyName("artifactName"u8); + writer.WriteStringValue(ArtifactName); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -68,20 +68,20 @@ internal static UnknownOneLakeArtifact DeserializeUnknownOneLakeArtifact(JsonEle { return null; } - string artifactName = default; OneLakeArtifactType artifactType = "Unknown"; + string artifactName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("artifactName"u8)) + if (property.NameEquals("artifactType"u8)) { - artifactName = property.Value.GetString(); + artifactType = new OneLakeArtifactType(property.Value.GetString()); continue; } - if (property.NameEquals("artifactType"u8)) + if (property.NameEquals("artifactName"u8)) { - artifactType = new OneLakeArtifactType(property.Value.GetString()); + artifactName = property.Value.GetString(); continue; } if (options.Format != "W") @@ -90,7 +90,7 @@ internal static UnknownOneLakeArtifact DeserializeUnknownOneLakeArtifact(JsonEle } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownOneLakeArtifact(artifactName, artifactType, serializedAdditionalRawData); + return new UnknownOneLakeArtifact(artifactType, artifactName, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.cs index dbcfa8d5095a1..7f17dee71ec84 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOneLakeArtifact.cs @@ -14,10 +14,10 @@ namespace Azure.ResourceManager.MachineLearning.Models internal partial class UnknownOneLakeArtifact : OneLakeArtifact { /// Initializes a new instance of . - /// [Required] OneLake artifact name. /// [Required] OneLake artifact type. + /// [Required] OneLake artifact name. /// Keeps track of any properties unknown to the library. - internal UnknownOneLakeArtifact(string artifactName, OneLakeArtifactType artifactType, IDictionary serializedAdditionalRawData) : base(artifactName, artifactType, serializedAdditionalRawData) + internal UnknownOneLakeArtifact(OneLakeArtifactType artifactType, string artifactName, IDictionary serializedAdditionalRawData) : base(artifactType, artifactName, serializedAdditionalRawData) { ArtifactType = artifactType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOnlineDeployment.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOnlineDeployment.Serialization.cs index 7bcdaed31b7c9..6dda9335d510f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOnlineDeployment.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOnlineDeployment.Serialization.cs @@ -26,42 +26,49 @@ void IJsonModel.Write(Utf8JsonWriter } writer.WriteStartObject(); - if (Optional.IsDefined(AppInsightsEnabled)) - { - writer.WritePropertyName("appInsightsEnabled"u8); - writer.WriteBooleanValue(AppInsightsEnabled.Value); - } - if (Optional.IsDefined(DataCollector)) + writer.WritePropertyName("endpointComputeType"u8); + writer.WriteStringValue(EndpointComputeType.ToString()); + if (Optional.IsDefined(ScaleSettings)) { - if (DataCollector != null) + if (ScaleSettings != null) { - writer.WritePropertyName("dataCollector"u8); - writer.WriteObjectValue(DataCollector, options); + writer.WritePropertyName("scaleSettings"u8); + writer.WriteObjectValue(ScaleSettings, options); } else { - writer.WriteNull("dataCollector"); + writer.WriteNull("scaleSettings"); } } - if (Optional.IsDefined(EgressPublicNetworkAccess)) + if (Optional.IsDefined(RequestSettings)) { - writer.WritePropertyName("egressPublicNetworkAccess"u8); - writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); + if (RequestSettings != null) + { + writer.WritePropertyName("requestSettings"u8); + writer.WriteObjectValue(RequestSettings, options); + } + else + { + writer.WriteNull("requestSettings"); + } } - writer.WritePropertyName("endpointComputeType"u8); - writer.WriteStringValue(EndpointComputeType.ToString()); - if (Optional.IsDefined(InstanceType)) + if (Optional.IsDefined(ModelMountPath)) { - if (InstanceType != null) + if (ModelMountPath != null) { - writer.WritePropertyName("instanceType"u8); - writer.WriteStringValue(InstanceType); + writer.WritePropertyName("modelMountPath"u8); + writer.WriteStringValue(ModelMountPath); } else { - writer.WriteNull("instanceType"); + writer.WriteNull("modelMountPath"); } } + if (Optional.IsDefined(AppInsightsEnabled)) + { + writer.WritePropertyName("appInsightsEnabled"u8); + writer.WriteBooleanValue(AppInsightsEnabled.Value); + } if (Optional.IsDefined(LivenessProbe)) { if (LivenessProbe != null) @@ -74,93 +81,104 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteNull("livenessProbe"); } } - if (Optional.IsDefined(Model)) + if (Optional.IsDefined(ReadinessProbe)) { - if (Model != null) + if (ReadinessProbe != null) { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); + writer.WritePropertyName("readinessProbe"u8); + writer.WriteObjectValue(ReadinessProbe, options); } else { - writer.WriteNull("model"); + writer.WriteNull("readinessProbe"); } } - if (Optional.IsDefined(ModelMountPath)) + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { - if (ModelMountPath != null) + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(InstanceType)) + { + if (InstanceType != null) { - writer.WritePropertyName("modelMountPath"u8); - writer.WriteStringValue(ModelMountPath); + writer.WritePropertyName("instanceType"u8); + writer.WriteStringValue(InstanceType); } else { - writer.WriteNull("modelMountPath"); + writer.WriteNull("instanceType"); } } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState.Value.ToString()); - } - if (Optional.IsDefined(ReadinessProbe)) + if (Optional.IsDefined(Model)) { - if (ReadinessProbe != null) + if (Model != null) { - writer.WritePropertyName("readinessProbe"u8); - writer.WriteObjectValue(ReadinessProbe, options); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); } else { - writer.WriteNull("readinessProbe"); + writer.WriteNull("model"); } } - if (Optional.IsDefined(RequestSettings)) + if (Optional.IsDefined(EgressPublicNetworkAccess)) { - if (RequestSettings != null) + writer.WritePropertyName("egressPublicNetworkAccess"u8); + writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); + } + if (Optional.IsDefined(DataCollector)) + { + if (DataCollector != null) { - writer.WritePropertyName("requestSettings"u8); - writer.WriteObjectValue(RequestSettings, options); + writer.WritePropertyName("dataCollector"u8); + writer.WriteObjectValue(DataCollector, options); } else { - writer.WriteNull("requestSettings"); + writer.WriteNull("dataCollector"); } } - if (Optional.IsDefined(ScaleSettings)) + if (Optional.IsDefined(Description)) { - if (ScaleSettings != null) + if (Description != null) { - writer.WritePropertyName("scaleSettings"u8); - writer.WriteObjectValue(ScaleSettings, options); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); } else { - writer.WriteNull("scaleSettings"); + writer.WriteNull("description"); } } - if (Optional.IsDefined(CodeConfiguration)) + if (Optional.IsCollectionDefined(Properties)) { - if (CodeConfiguration != null) + if (Properties != null) { - writer.WritePropertyName("codeConfiguration"u8); - writer.WriteObjectValue(CodeConfiguration, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } else { - writer.WriteNull("codeConfiguration"); + writer.WriteNull("properties"); } } - if (Optional.IsDefined(Description)) + if (Optional.IsDefined(CodeConfiguration)) { - if (Description != null) + if (CodeConfiguration != null) { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); + writer.WritePropertyName("codeConfiguration"u8); + writer.WriteObjectValue(CodeConfiguration, options); } else { - writer.WriteNull("description"); + writer.WriteNull("codeConfiguration"); } } if (Optional.IsDefined(EnvironmentId)) @@ -193,24 +211,6 @@ void IJsonModel.Write(Utf8JsonWriter writer.WriteNull("environmentVariables"); } } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -249,98 +249,89 @@ internal static UnknownOnlineDeployment DeserializeUnknownOnlineDeployment(JsonE { return null; } - bool? appInsightsEnabled = default; - DataCollector dataCollector = default; - MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default; MachineLearningEndpointComputeType endpointComputeType = "Unknown"; - string instanceType = default; - MachineLearningProbeSettings livenessProbe = default; - string model = default; + MachineLearningOnlineScaleSettings scaleSettings = default; + MachineLearningOnlineRequestSettings requestSettings = default; string modelMountPath = default; - MachineLearningDeploymentProvisioningState? provisioningState = default; + bool? appInsightsEnabled = default; + MachineLearningProbeSettings livenessProbe = default; MachineLearningProbeSettings readinessProbe = default; - MachineLearningOnlineRequestSettings requestSettings = default; - MachineLearningOnlineScaleSettings scaleSettings = default; - MachineLearningCodeConfiguration codeConfiguration = default; + MachineLearningDeploymentProvisioningState? provisioningState = default; + string instanceType = default; + string model = default; + MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess = default; + DataCollector dataCollector = default; string description = default; + IDictionary properties = default; + MachineLearningCodeConfiguration codeConfiguration = default; string environmentId = default; IDictionary environmentVariables = default; - IDictionary properties = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("appInsightsEnabled"u8)) + if (property.NameEquals("endpointComputeType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - appInsightsEnabled = property.Value.GetBoolean(); + endpointComputeType = new MachineLearningEndpointComputeType(property.Value.GetString()); continue; } - if (property.NameEquals("dataCollector"u8)) + if (property.NameEquals("scaleSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - dataCollector = null; + scaleSettings = null; continue; } - dataCollector = DataCollector.DeserializeDataCollector(property.Value, options); + scaleSettings = MachineLearningOnlineScaleSettings.DeserializeMachineLearningOnlineScaleSettings(property.Value, options); continue; } - if (property.NameEquals("egressPublicNetworkAccess"u8)) + if (property.NameEquals("requestSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { + requestSettings = null; continue; } - egressPublicNetworkAccess = new MachineLearningEgressPublicNetworkAccessType(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpointComputeType"u8)) - { - endpointComputeType = new MachineLearningEndpointComputeType(property.Value.GetString()); + requestSettings = MachineLearningOnlineRequestSettings.DeserializeMachineLearningOnlineRequestSettings(property.Value, options); continue; } - if (property.NameEquals("instanceType"u8)) + if (property.NameEquals("modelMountPath"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - instanceType = null; + modelMountPath = null; continue; } - instanceType = property.Value.GetString(); + modelMountPath = property.Value.GetString(); continue; } - if (property.NameEquals("livenessProbe"u8)) + if (property.NameEquals("appInsightsEnabled"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - livenessProbe = null; continue; } - livenessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value, options); + appInsightsEnabled = property.Value.GetBoolean(); continue; } - if (property.NameEquals("model"u8)) + if (property.NameEquals("livenessProbe"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - model = null; + livenessProbe = null; continue; } - model = property.Value.GetString(); + livenessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value, options); continue; } - if (property.NameEquals("modelMountPath"u8)) + if (property.NameEquals("readinessProbe"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - modelMountPath = null; + readinessProbe = null; continue; } - modelMountPath = property.Value.GetString(); + readinessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value, options); continue; } if (property.NameEquals("provisioningState"u8)) @@ -352,44 +343,43 @@ internal static UnknownOnlineDeployment DeserializeUnknownOnlineDeployment(JsonE provisioningState = new MachineLearningDeploymentProvisioningState(property.Value.GetString()); continue; } - if (property.NameEquals("readinessProbe"u8)) + if (property.NameEquals("instanceType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - readinessProbe = null; + instanceType = null; continue; } - readinessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value, options); + instanceType = property.Value.GetString(); continue; } - if (property.NameEquals("requestSettings"u8)) + if (property.NameEquals("model"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - requestSettings = null; + model = null; continue; } - requestSettings = MachineLearningOnlineRequestSettings.DeserializeMachineLearningOnlineRequestSettings(property.Value, options); + model = property.Value.GetString(); continue; } - if (property.NameEquals("scaleSettings"u8)) + if (property.NameEquals("egressPublicNetworkAccess"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - scaleSettings = null; continue; } - scaleSettings = MachineLearningOnlineScaleSettings.DeserializeMachineLearningOnlineScaleSettings(property.Value, options); + egressPublicNetworkAccess = new MachineLearningEgressPublicNetworkAccessType(property.Value.GetString()); continue; } - if (property.NameEquals("codeConfiguration"u8)) + if (property.NameEquals("dataCollector"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - codeConfiguration = null; + dataCollector = null; continue; } - codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value, options); + dataCollector = DataCollector.DeserializeDataCollector(property.Value, options); continue; } if (property.NameEquals("description"u8)) @@ -402,36 +392,46 @@ internal static UnknownOnlineDeployment DeserializeUnknownOnlineDeployment(JsonE description = property.Value.GetString(); continue; } - if (property.NameEquals("environmentId"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - environmentId = null; + properties = null; continue; } - environmentId = property.Value.GetString(); + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + properties = dictionary; continue; } - if (property.NameEquals("environmentVariables"u8)) + if (property.NameEquals("codeConfiguration"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - environmentVariables = null; + codeConfiguration = null; continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("environmentId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) { - dictionary.Add(property0.Name, property0.Value.GetString()); + environmentId = null; + continue; } - environmentVariables = dictionary; + environmentId = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("environmentVariables"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { - properties = null; + environmentVariables = null; continue; } Dictionary dictionary = new Dictionary(); @@ -439,7 +439,7 @@ internal static UnknownOnlineDeployment DeserializeUnknownOnlineDeployment(JsonE { dictionary.Add(property0.Name, property0.Value.GetString()); } - properties = dictionary; + environmentVariables = dictionary; continue; } if (options.Format != "W") @@ -449,24 +449,24 @@ internal static UnknownOnlineDeployment DeserializeUnknownOnlineDeployment(JsonE } serializedAdditionalRawData = rawDataDictionary; return new UnknownOnlineDeployment( - codeConfiguration, description, + properties ?? new ChangeTrackingDictionary(), + codeConfiguration, environmentId, environmentVariables ?? new ChangeTrackingDictionary(), - properties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData, - appInsightsEnabled, - dataCollector, - egressPublicNetworkAccess, endpointComputeType, - instanceType, - livenessProbe, - model, + scaleSettings, + requestSettings, modelMountPath, - provisioningState, + appInsightsEnabled, + livenessProbe, readinessProbe, - requestSettings, - scaleSettings); + provisioningState, + instanceType, + model, + egressPublicNetworkAccess, + dataCollector); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOnlineDeployment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOnlineDeployment.cs index 118f2aec2ec1a..4b42fdbd979b9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOnlineDeployment.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOnlineDeployment.cs @@ -14,23 +14,13 @@ namespace Azure.ResourceManager.MachineLearning.Models internal partial class UnknownOnlineDeployment : MachineLearningOnlineDeploymentProperties { /// Initializes a new instance of . - /// Code configuration for the endpoint deployment. /// Description of the endpoint deployment. + /// Property dictionary. Properties can be added, but not removed or altered. + /// Code configuration for the endpoint deployment. /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. /// Environment variables configuration for the deployment. - /// Property dictionary. Properties can be added, but not removed or altered. /// Keeps track of any properties unknown to the library. - /// If true, enables Application Insights logging. - /// The mdc configuration, we disable mdc when it's null. - /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. /// [Required] The compute type of the endpoint. - /// Compute instance type. - /// Liveness probe monitors the health of the container regularly. - /// The URI path to the model. - /// The path to mount the model in custom container. - /// Provisioning state for the endpoint deployment. - /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. - /// Request settings for the deployment. /// /// Scale settings for the deployment. /// If it is null or not provided, @@ -39,7 +29,17 @@ internal partial class UnknownOnlineDeployment : MachineLearningOnlineDeployment /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include and . /// - internal UnknownOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, IDictionary serializedAdditionalRawData, bool? appInsightsEnabled, DataCollector dataCollector, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, MachineLearningEndpointComputeType endpointComputeType, string instanceType, MachineLearningProbeSettings livenessProbe, string model, string modelMountPath, MachineLearningDeploymentProvisioningState? provisioningState, MachineLearningProbeSettings readinessProbe, MachineLearningOnlineRequestSettings requestSettings, MachineLearningOnlineScaleSettings scaleSettings) : base(codeConfiguration, description, environmentId, environmentVariables, properties, serializedAdditionalRawData, appInsightsEnabled, dataCollector, egressPublicNetworkAccess, endpointComputeType, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings) + /// Request settings for the deployment. + /// The path to mount the model in custom container. + /// If true, enables Application Insights logging. + /// Liveness probe monitors the health of the container regularly. + /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. + /// Provisioning state for the endpoint deployment. + /// Compute instance type. + /// The URI path to the model. + /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + /// The mdc configuration, we disable mdc when it's null. + internal UnknownOnlineDeployment(string description, IDictionary properties, MachineLearningCodeConfiguration codeConfiguration, string environmentId, IDictionary environmentVariables, IDictionary serializedAdditionalRawData, MachineLearningEndpointComputeType endpointComputeType, MachineLearningOnlineScaleSettings scaleSettings, MachineLearningOnlineRequestSettings requestSettings, string modelMountPath, bool? appInsightsEnabled, MachineLearningProbeSettings livenessProbe, MachineLearningProbeSettings readinessProbe, MachineLearningDeploymentProvisioningState? provisioningState, string instanceType, string model, MachineLearningEgressPublicNetworkAccessType? egressPublicNetworkAccess, DataCollector dataCollector) : base(description, properties, codeConfiguration, environmentId, environmentVariables, serializedAdditionalRawData, endpointComputeType, scaleSettings, requestSettings, modelMountPath, appInsightsEnabled, livenessProbe, readinessProbe, provisioningState, instanceType, model, egressPublicNetworkAccess, dataCollector) { EndpointComputeType = endpointComputeType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.Serialization.cs index f37a5172caa1e..40ff3b3f96601 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.Serialization.cs @@ -31,16 +31,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR writer.WritePropertyName("category"u8); writer.WriteStringValue(Category.Value.ToString()); } - if (options.Format != "W" && Optional.IsCollectionDefined(ParentRuleNames)) - { - writer.WritePropertyName("parentRuleNames"u8); - writer.WriteStartArray(); - foreach (var item in ParentRuleNames) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } if (Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -87,7 +77,6 @@ internal static UnknownOutboundRule DeserializeUnknownOutboundRule(JsonElement e return null; } OutboundRuleCategory? category = default; - IReadOnlyList parentRuleNames = default; OutboundRuleStatus? status = default; OutboundRuleType type = "Unknown"; IDictionary serializedAdditionalRawData = default; @@ -103,20 +92,6 @@ internal static UnknownOutboundRule DeserializeUnknownOutboundRule(JsonElement e category = new OutboundRuleCategory(property.Value.GetString()); continue; } - if (property.NameEquals("parentRuleNames"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - parentRuleNames = array; - continue; - } if (property.NameEquals("status"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -137,7 +112,7 @@ internal static UnknownOutboundRule DeserializeUnknownOutboundRule(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownOutboundRule(category, parentRuleNames ?? new ChangeTrackingList(), status, type, serializedAdditionalRawData); + return new UnknownOutboundRule(category, status, type, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.cs index 0299ae72a728f..57fa4aa447f2a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOutboundRule.cs @@ -15,11 +15,10 @@ internal partial class UnknownOutboundRule : MachineLearningOutboundRule { /// Initializes a new instance of . /// Category of a managed network Outbound Rule of a machine learning workspace. - /// /// Type of a managed network Outbound Rule of a machine learning workspace. /// Type of a managed network Outbound Rule of a machine learning workspace. /// Keeps track of any properties unknown to the library. - internal UnknownOutboundRule(OutboundRuleCategory? category, IReadOnlyList parentRuleNames, OutboundRuleStatus? status, OutboundRuleType outboundRuleType, IDictionary serializedAdditionalRawData) : base(category, parentRuleNames, status, outboundRuleType, serializedAdditionalRawData) + internal UnknownOutboundRule(OutboundRuleCategory? category, OutboundRuleStatus? status, OutboundRuleType outboundRuleType, IDictionary serializedAdditionalRawData) : base(category, status, outboundRuleType, serializedAdditionalRawData) { OutboundRuleType = outboundRuleType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTriggerBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTriggerBase.Serialization.cs index 8c2686f5181e7..fc19463c071f6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTriggerBase.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTriggerBase.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe } writer.WriteStartObject(); + writer.WritePropertyName("triggerType"u8); + writer.WriteStringValue(TriggerType.ToString()); if (Optional.IsDefined(EndTime)) { if (EndTime != null) @@ -55,8 +57,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe writer.WritePropertyName("timeZone"u8); writer.WriteStringValue(TimeZone); } - writer.WritePropertyName("triggerType"u8); - writer.WriteStringValue(TriggerType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -95,14 +95,19 @@ internal static UnknownTriggerBase DeserializeUnknownTriggerBase(JsonElement ele { return null; } + TriggerType triggerType = "Unknown"; string endTime = default; string startTime = default; string timeZone = default; - TriggerType triggerType = "Unknown"; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("triggerType"u8)) + { + triggerType = new TriggerType(property.Value.GetString()); + continue; + } if (property.NameEquals("endTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -128,18 +133,13 @@ internal static UnknownTriggerBase DeserializeUnknownTriggerBase(JsonElement ele timeZone = property.Value.GetString(); continue; } - if (property.NameEquals("triggerType"u8)) - { - triggerType = new TriggerType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownTriggerBase(endTime, startTime, timeZone, triggerType, serializedAdditionalRawData); + return new UnknownTriggerBase(triggerType, endTime, startTime, timeZone, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTriggerBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTriggerBase.cs index 68db0c2269c13..3268b7ef6bb8d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTriggerBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTriggerBase.cs @@ -14,6 +14,7 @@ namespace Azure.ResourceManager.MachineLearning.Models internal partial class UnknownTriggerBase : MachineLearningTriggerBase { /// Initializes a new instance of . + /// [Required]. /// /// Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. /// Recommented format would be "2022-06-01T00:00:01" @@ -24,9 +25,8 @@ internal partial class UnknownTriggerBase : MachineLearningTriggerBase /// Specifies time zone in which the schedule runs. /// TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 /// - /// [Required]. /// Keeps track of any properties unknown to the library. - internal UnknownTriggerBase(string endTime, string startTime, string timeZone, TriggerType triggerType, IDictionary serializedAdditionalRawData) : base(endTime, startTime, timeZone, triggerType, serializedAdditionalRawData) + internal UnknownTriggerBase(TriggerType triggerType, string endTime, string startTime, string timeZone, IDictionary serializedAdditionalRawData) : base(triggerType, endTime, startTime, timeZone, serializedAdditionalRawData) { TriggerType = triggerType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.Serialization.cs index 02b51fb5a2a3a..a520b9ad3587b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.Serialization.cs @@ -26,6 +26,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteStartObject(); + writer.WritePropertyName("webhookType"u8); + writer.WriteStringValue(WebhookType.ToString()); if (Optional.IsDefined(EventType)) { if (EventType != null) @@ -38,8 +40,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader writer.WriteNull("eventType"); } } - writer.WritePropertyName("webhookType"u8); - writer.WriteStringValue(WebhookType.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -78,12 +78,17 @@ internal static UnknownWebhook DeserializeUnknownWebhook(JsonElement element, Mo { return null; } - string eventType = default; MachineLearningWebhookType webhookType = "Unknown"; + string eventType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("webhookType"u8)) + { + webhookType = new MachineLearningWebhookType(property.Value.GetString()); + continue; + } if (property.NameEquals("eventType"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -94,18 +99,13 @@ internal static UnknownWebhook DeserializeUnknownWebhook(JsonElement element, Mo eventType = property.Value.GetString(); continue; } - if (property.NameEquals("webhookType"u8)) - { - webhookType = new MachineLearningWebhookType(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownWebhook(eventType, webhookType, serializedAdditionalRawData); + return new UnknownWebhook(webhookType, eventType, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.cs index fed9408de5269..ca553b156dcf9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWebhook.cs @@ -14,10 +14,10 @@ namespace Azure.ResourceManager.MachineLearning.Models internal partial class UnknownWebhook : MachineLearningWebhook { /// Initializes a new instance of . - /// Send callback on a specified notification event. /// [Required] Specifies the type of service to send a callback. + /// Send callback on a specified notification event. /// Keeps track of any properties unknown to the library. - internal UnknownWebhook(string eventType, MachineLearningWebhookType webhookType, IDictionary serializedAdditionalRawData) : base(eventType, webhookType, serializedAdditionalRawData) + internal UnknownWebhook(MachineLearningWebhookType webhookType, string eventType, IDictionary serializedAdditionalRawData) : base(webhookType, eventType, serializedAdditionalRawData) { WebhookType = webhookType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.Serialization.cs index 9f33a19c96dff..beb707d9b0f14 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.Serialization.cs @@ -38,11 +38,6 @@ void IJsonModel.Write(Utf8JsonWrit writer.WritePropertyName("createdByWorkspaceArmId"u8); writer.WriteStringValue(CreatedByWorkspaceArmId); } - if (Optional.IsDefined(Error)) - { - writer.WritePropertyName("error"u8); - writer.WriteStringValue(Error); - } if (Optional.IsDefined(ExpiryOn)) { writer.WritePropertyName("expiryTime"u8); @@ -58,6 +53,11 @@ void IJsonModel.Write(Utf8JsonWrit writer.WritePropertyName("isSharedToAll"u8); writer.WriteBooleanValue(IsSharedToAll.Value); } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -69,16 +69,6 @@ void IJsonModel.Write(Utf8JsonWrit } writer.WriteEndObject(); } - if (Optional.IsDefined(PeRequirement)) - { - writer.WritePropertyName("peRequirement"u8); - writer.WriteStringValue(PeRequirement.Value.ToString()); - } - if (Optional.IsDefined(PeStatus)) - { - writer.WritePropertyName("peStatus"u8); - writer.WriteStringValue(PeStatus.Value.ToString()); - } if (Optional.IsCollectionDefined(SharedUserList)) { writer.WritePropertyName("sharedUserList"u8); @@ -89,15 +79,15 @@ void IJsonModel.Write(Utf8JsonWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(Target)) + if (Optional.IsDefined(Value)) { - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); } - if (Optional.IsDefined(UseWorkspaceManagedIdentity)) + if (Optional.IsDefined(ValueFormat)) { - writer.WritePropertyName("useWorkspaceManagedIdentity"u8); - writer.WriteBooleanValue(UseWorkspaceManagedIdentity.Value); + writer.WritePropertyName("valueFormat"u8); + writer.WriteStringValue(ValueFormat.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -140,16 +130,14 @@ internal static UnknownWorkspaceConnectionPropertiesV2 DeserializeUnknownWorkspa MachineLearningConnectionAuthType authType = "Unknown"; MachineLearningConnectionCategory? category = default; ResourceIdentifier createdByWorkspaceArmId = default; - string error = default; DateTimeOffset? expiryTime = default; ConnectionGroup? group = default; bool? isSharedToAll = default; + string target = default; IDictionary metadata = default; - ManagedPERequirement? peRequirement = default; - ManagedPEStatus? peStatus = default; IList sharedUserList = default; - string target = default; - bool? useWorkspaceManagedIdentity = default; + string value = default; + MachineLearningValueFormat? valueFormat = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -177,11 +165,6 @@ internal static UnknownWorkspaceConnectionPropertiesV2 DeserializeUnknownWorkspa createdByWorkspaceArmId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("error"u8)) - { - error = property.Value.GetString(); - continue; - } if (property.NameEquals("expiryTime"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -209,6 +192,11 @@ internal static UnknownWorkspaceConnectionPropertiesV2 DeserializeUnknownWorkspa isSharedToAll = property.Value.GetBoolean(); continue; } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } if (property.NameEquals("metadata"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -223,24 +211,6 @@ internal static UnknownWorkspaceConnectionPropertiesV2 DeserializeUnknownWorkspa metadata = dictionary; continue; } - if (property.NameEquals("peRequirement"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peRequirement = new ManagedPERequirement(property.Value.GetString()); - continue; - } - if (property.NameEquals("peStatus"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - peStatus = new ManagedPEStatus(property.Value.GetString()); - continue; - } if (property.NameEquals("sharedUserList"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -255,18 +225,18 @@ internal static UnknownWorkspaceConnectionPropertiesV2 DeserializeUnknownWorkspa sharedUserList = array; continue; } - if (property.NameEquals("target"u8)) + if (property.NameEquals("value"u8)) { - target = property.Value.GetString(); + value = property.Value.GetString(); continue; } - if (property.NameEquals("useWorkspaceManagedIdentity"u8)) + if (property.NameEquals("valueFormat"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - useWorkspaceManagedIdentity = property.Value.GetBoolean(); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } if (options.Format != "W") @@ -279,16 +249,14 @@ internal static UnknownWorkspaceConnectionPropertiesV2 DeserializeUnknownWorkspa authType, category, createdByWorkspaceArmId, - error, expiryTime, group, isSharedToAll, + target, metadata ?? new ChangeTrackingDictionary(), - peRequirement, - peStatus, sharedUserList ?? new ChangeTrackingList(), - target, - useWorkspaceManagedIdentity, + value, + valueFormat, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.cs index f7dd7a5f8e686..73a24c1e62235 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.cs @@ -18,18 +18,16 @@ internal partial class UnknownWorkspaceConnectionPropertiesV2 : MachineLearningW /// Authentication type of the connection target. /// Category of the connection. /// - /// /// /// Group based on connection category. /// + /// /// Store user metadata for this connection. - /// - /// /// - /// - /// + /// Value details of the workspace connection. + /// format for the workspace connection value. /// Keeps track of any properties unknown to the library. - internal UnknownWorkspaceConnectionPropertiesV2(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, string error, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, IDictionary metadata, ManagedPERequirement? peRequirement, ManagedPEStatus? peStatus, IList sharedUserList, string target, bool? useWorkspaceManagedIdentity, IDictionary serializedAdditionalRawData) : base(authType, category, createdByWorkspaceArmId, error, expiryOn, group, isSharedToAll, metadata, peRequirement, peStatus, sharedUserList, target, useWorkspaceManagedIdentity, serializedAdditionalRawData) + internal UnknownWorkspaceConnectionPropertiesV2(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, ResourceIdentifier createdByWorkspaceArmId, DateTimeOffset? expiryOn, ConnectionGroup? group, bool? isSharedToAll, string target, IDictionary metadata, IList sharedUserList, string value, MachineLearningValueFormat? valueFormat, IDictionary serializedAdditionalRawData) : base(authType, category, createdByWorkspaceArmId, expiryOn, group, isSharedToAll, target, metadata, sharedUserList, value, valueFormat, serializedAdditionalRawData) { AuthType = authType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.Serialization.cs index d249f9d344ab8..9d976719c0fbc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.Serialization.cs @@ -55,51 +55,23 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter } if (Optional.IsDefined(Consistency)) { - if (Consistency != null) - { - writer.WritePropertyName("consistency"u8); - writer.WriteStringValue(Consistency); - } - else - { - writer.WriteNull("consistency"); - } + writer.WritePropertyName("consistency"u8); + writer.WriteStringValue(Consistency); } if (Optional.IsDefined(Bind)) { - if (Bind != null) - { - writer.WritePropertyName("bind"u8); - writer.WriteObjectValue(Bind, options); - } - else - { - writer.WriteNull("bind"); - } + writer.WritePropertyName("bind"u8); + writer.WriteObjectValue(Bind, options); } if (Optional.IsDefined(Volume)) { - if (Volume != null) - { - writer.WritePropertyName("volume"u8); - writer.WriteObjectValue(Volume, options); - } - else - { - writer.WriteNull("volume"); - } + writer.WritePropertyName("volume"u8); + writer.WriteObjectValue(Volume, options); } if (Optional.IsDefined(Tmpfs)) { - if (Tmpfs != null) - { - writer.WritePropertyName("tmpfs"u8); - writer.WriteObjectValue(Tmpfs, options); - } - else - { - writer.WriteNull("tmpfs"); - } + writer.WritePropertyName("tmpfs"u8); + writer.WriteObjectValue(Tmpfs, options); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -182,11 +154,6 @@ internal static VolumeDefinition DeserializeVolumeDefinition(JsonElement element } if (property.NameEquals("consistency"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - consistency = null; - continue; - } consistency = property.Value.GetString(); continue; } @@ -194,7 +161,6 @@ internal static VolumeDefinition DeserializeVolumeDefinition(JsonElement element { if (property.Value.ValueKind == JsonValueKind.Null) { - bind = null; continue; } bind = MountBindOptions.DeserializeMountBindOptions(property.Value, options); @@ -204,7 +170,6 @@ internal static VolumeDefinition DeserializeVolumeDefinition(JsonElement element { if (property.Value.ValueKind == JsonValueKind.Null) { - volume = null; continue; } volume = VolumeOptions.DeserializeVolumeOptions(property.Value, options); @@ -214,7 +179,6 @@ internal static VolumeDefinition DeserializeVolumeDefinition(JsonElement element { if (property.Value.ValueKind == JsonValueKind.Null) { - tmpfs = null; continue; } tmpfs = TmpfsOptions.DeserializeTmpfsOptions(property.Value, options); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.cs index 2ed2aeb387386..12fe189004108 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeDefinition.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The VolumeDefinition. + /// Describes the volume configuration for the container. public partial class VolumeDefinition { /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeOptions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeOptions.cs index c9f6c37f91b30..9e708fad6c689 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeOptions.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VolumeOptions.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The VolumeOptions. + /// Describes the volume options for the container. internal partial class VolumeOptions { /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionAccountKey.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionAccountKey.cs index 62cebdd9c425a..12db9be11b3f5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionAccountKey.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionAccountKey.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Account key object for workspace connection credential. + /// The WorkspaceConnectionAccountKey. internal partial class WorkspaceConnectionAccountKey { /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.Serialization.cs index be19be7c601f3..02ed6839c3050 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel. } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel. } 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) @@ -79,17 +79,12 @@ internal static WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult D { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult D 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 WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.cs index 018c2c7472202..bb782d4bcbad5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.cs @@ -52,19 +52,19 @@ internal WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult() } /// Initializes a new instance of . - /// /// + /// /// Keeps track of any properties unknown to the library. - internal WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the next link. - public string NextLink { get; } /// Gets the value. public IReadOnlyList Value { get; } + /// Gets the next link. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.Serialization.cs index 2e913f0f267a7..a85204dadd8aa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.Serialization.cs @@ -26,11 +26,6 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteStartObject(); - if (Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } if (Optional.IsCollectionDefined(Value)) { writer.WritePropertyName("value"u8); @@ -41,6 +36,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -79,17 +79,12 @@ internal static WorkspaceListResult DeserializeWorkspaceListResult(JsonElement e { return null; } - string nextLink = default; IReadOnlyList value = default; + string nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } if (property.NameEquals("value"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -104,13 +99,18 @@ internal static WorkspaceListResult DeserializeWorkspaceListResult(JsonElement e 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 WorkspaceListResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new WorkspaceListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.cs index aec5327f299b6..2b39c937433c1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.cs @@ -52,19 +52,19 @@ internal WorkspaceListResult() } /// Initializes a new instance of . - /// The link to the next page constructed using the continuationToken. If null, there are no additional pages. /// The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to request the next list of machine learning workspaces. + /// The URI that can be used to request the next list of machine learning workspaces. /// Keeps track of any properties unknown to the library. - internal WorkspaceListResult(string nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal WorkspaceListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The link to the next page constructed using the continuationToken. If null, there are no additional pages. - public string NextLink { get; } /// The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to request the next list of machine learning workspaces. public IReadOnlyList Value { get; } + /// The URI that can be used to request the next list of machine learning workspaces. + public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResource.Serialization.cs deleted file mode 100644 index 36027b868ed6f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class RaiBlocklistItemPropertiesBasicResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - RaiBlocklistItemPropertiesBasicResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - RaiBlocklistItemPropertiesBasicResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResource.cs deleted file mode 100644 index b1a592d930f99..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResource.cs +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a RaiBlocklistItemPropertiesBasicResource along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetRaiBlocklistItemPropertiesBasicResource method. - /// Otherwise you can get one from its parent resource using the GetRaiBlocklistItemPropertiesBasicResource method. - /// - public partial class RaiBlocklistItemPropertiesBasicResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The workspaceName. - /// The connectionName. - /// The raiBlocklistName. - /// The raiBlocklistItemName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics; - private readonly ConnectionRaiBlocklistItemRestOperations _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient; - private readonly RaiBlocklistItemPropertiesBasicResourceData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/connections/raiBlocklists/raiBlocklistItems"; - - /// Initializes a new instance of the class for mocking. - protected RaiBlocklistItemPropertiesBasicResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal RaiBlocklistItemPropertiesBasicResource(ArmClient client, RaiBlocklistItemPropertiesBasicResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal RaiBlocklistItemPropertiesBasicResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemApiVersion); - _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient = new ConnectionRaiBlocklistItemRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual RaiBlocklistItemPropertiesBasicResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets the specified custom blocklist item associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResource.Get"); - scope.Start(); - try - { - var response = await _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RaiBlocklistItemPropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specified custom blocklist item associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResource.Get"); - scope.Start(); - try - { - var response = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RaiBlocklistItemPropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the specified custom blocklist item associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Delete - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResource.Delete"); - scope.Start(); - try - { - var response = await _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics, Pipeline, _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the specified custom blocklist item associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Delete - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResource.Delete"); - scope.Start(); - try - { - var response = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics, Pipeline, _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified blocklist item associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, RaiBlocklistItemPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResource.Update"); - scope.Start(); - try - { - var response = await _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new RaiBlocklistItemPropertiesBasicResourceOperationSource(Client), _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics, Pipeline, _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified blocklist item associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, RaiBlocklistItemPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResource.Update"); - scope.Start(); - try - { - var response = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(new RaiBlocklistItemPropertiesBasicResourceOperationSource(Client), _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics, Pipeline, _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResourceCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResourceCollection.cs deleted file mode 100644 index 1d8680cc1a58e..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResourceCollection.cs +++ /dev/null @@ -1,498 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetRaiBlocklistItemPropertiesBasicResources method from an instance of . - /// - public partial class RaiBlocklistItemPropertiesBasicResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics; - private readonly ConnectionRaiBlocklistItemRestOperations _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient; - private readonly ClientDiagnostics _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemsClientDiagnostics; - private readonly ConnectionRaiBlocklistItemsRestOperations _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemsRestClient; - - /// Initializes a new instance of the class for mocking. - protected RaiBlocklistItemPropertiesBasicResourceCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal RaiBlocklistItemPropertiesBasicResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", RaiBlocklistItemPropertiesBasicResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(RaiBlocklistItemPropertiesBasicResource.ResourceType, out string raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemApiVersion); - _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient = new ConnectionRaiBlocklistItemRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemApiVersion); - _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", RaiBlocklistItemPropertiesBasicResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(RaiBlocklistItemPropertiesBasicResource.ResourceType, out string raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemsApiVersion); - _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemsRestClient = new ConnectionRaiBlocklistItemsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != RaiBlocklistPropertiesBasicResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, RaiBlocklistPropertiesBasicResource.ResourceType), nameof(id)); - } - - /// - /// Update the state of specified blocklist item associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the RaiBlocklist Item. - /// The to use. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, raiBlocklistItemName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new RaiBlocklistItemPropertiesBasicResourceOperationSource(Client), _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics, Pipeline, _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, raiBlocklistItemName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified blocklist item associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the RaiBlocklist Item. - /// The to use. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, raiBlocklistItemName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new RaiBlocklistItemPropertiesBasicResourceOperationSource(Client), _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics, Pipeline, _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, raiBlocklistItemName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specified custom blocklist item associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the RaiBlocklist Item. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string raiBlocklistItemName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResourceCollection.Get"); - scope.Start(); - try - { - var response = await _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, raiBlocklistItemName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RaiBlocklistItemPropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specified custom blocklist item associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the RaiBlocklist Item. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string raiBlocklistItemName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResourceCollection.Get"); - scope.Start(); - try - { - var response = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, raiBlocklistItemName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RaiBlocklistItemPropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the custom blocklist items associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItems_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new RaiBlocklistItemPropertiesBasicResource(Client, RaiBlocklistItemPropertiesBasicResourceData.DeserializeRaiBlocklistItemPropertiesBasicResourceData(e)), _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemsClientDiagnostics, Pipeline, "RaiBlocklistItemPropertiesBasicResourceCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Gets the custom blocklist items associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItems_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RaiBlocklistItemPropertiesBasicResource(Client, RaiBlocklistItemPropertiesBasicResourceData.DeserializeRaiBlocklistItemPropertiesBasicResourceData(e)), _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemsClientDiagnostics, Pipeline, "RaiBlocklistItemPropertiesBasicResourceCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the RaiBlocklist Item. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string raiBlocklistItemName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResourceCollection.Exists"); - scope.Start(); - try - { - var response = await _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, raiBlocklistItemName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the RaiBlocklist Item. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string raiBlocklistItemName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResourceCollection.Exists"); - scope.Start(); - try - { - var response = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, raiBlocklistItemName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the RaiBlocklist Item. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string raiBlocklistItemName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, raiBlocklistItemName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new RaiBlocklistItemPropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the RaiBlocklist Item. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string raiBlocklistItemName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistItemPropertiesBasicResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, raiBlocklistItemName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new RaiBlocklistItemPropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResourceData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResourceData.Serialization.cs deleted file mode 100644 index 27ad8f63407d1..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResourceData.Serialization.cs +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class RaiBlocklistItemPropertiesBasicResourceData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RaiBlocklistItemPropertiesBasicResourceData)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - 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 - } - } - writer.WriteEndObject(); - } - - RaiBlocklistItemPropertiesBasicResourceData 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(RaiBlocklistItemPropertiesBasicResourceData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRaiBlocklistItemPropertiesBasicResourceData(document.RootElement, options); - } - - internal static RaiBlocklistItemPropertiesBasicResourceData DeserializeRaiBlocklistItemPropertiesBasicResourceData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RaiBlocklistItemProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = RaiBlocklistItemProperties.DeserializeRaiBlocklistItemProperties(property.Value, options); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RaiBlocklistItemPropertiesBasicResourceData( - id, - name, - type, - systemData, - properties, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RaiBlocklistItemPropertiesBasicResourceData)} does not support writing '{options.Format}' format."); - } - } - - RaiBlocklistItemPropertiesBasicResourceData 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 DeserializeRaiBlocklistItemPropertiesBasicResourceData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RaiBlocklistItemPropertiesBasicResourceData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResourceData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResourceData.cs deleted file mode 100644 index 00a0b7a6f4a45..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistItemPropertiesBasicResourceData.cs +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the RaiBlocklistItemPropertiesBasicResource data model. - public partial class RaiBlocklistItemPropertiesBasicResourceData : ResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// RAI Custom Blocklist Item properties. - /// is null. - public RaiBlocklistItemPropertiesBasicResourceData(RaiBlocklistItemProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// RAI Custom Blocklist Item properties. - /// Keeps track of any properties unknown to the library. - internal RaiBlocklistItemPropertiesBasicResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RaiBlocklistItemProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RaiBlocklistItemPropertiesBasicResourceData() - { - } - - /// RAI Custom Blocklist Item properties. - public RaiBlocklistItemProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResource.Serialization.cs deleted file mode 100644 index c51c34454ba5a..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class RaiBlocklistPropertiesBasicResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - RaiBlocklistPropertiesBasicResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - RaiBlocklistPropertiesBasicResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResource.cs deleted file mode 100644 index 4d08a466b7332..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResource.cs +++ /dev/null @@ -1,608 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a RaiBlocklistPropertiesBasicResource along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetRaiBlocklistPropertiesBasicResource method. - /// Otherwise you can get one from its parent resource using the GetRaiBlocklistPropertiesBasicResource method. - /// - public partial class RaiBlocklistPropertiesBasicResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The workspaceName. - /// The connectionName. - /// The raiBlocklistName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics; - private readonly ConnectionRaiBlocklistRestOperations _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient; - private readonly ClientDiagnostics _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics; - private readonly ConnectionRaiBlocklistItemRestOperations _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient; - private readonly RaiBlocklistPropertiesBasicResourceData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/connections/raiBlocklists"; - - /// Initializes a new instance of the class for mocking. - protected RaiBlocklistPropertiesBasicResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal RaiBlocklistPropertiesBasicResource(ArmClient client, RaiBlocklistPropertiesBasicResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal RaiBlocklistPropertiesBasicResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistApiVersion); - _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient = new ConnectionRaiBlocklistRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistApiVersion); - _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", RaiBlocklistItemPropertiesBasicResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(RaiBlocklistItemPropertiesBasicResource.ResourceType, out string raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemApiVersion); - _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient = new ConnectionRaiBlocklistItemRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual RaiBlocklistPropertiesBasicResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// Gets a collection of RaiBlocklistItemPropertiesBasicResources in the RaiBlocklistPropertiesBasicResource. - /// An object representing collection of RaiBlocklistItemPropertiesBasicResources and their operations over a RaiBlocklistItemPropertiesBasicResource. - public virtual RaiBlocklistItemPropertiesBasicResourceCollection GetRaiBlocklistItemPropertiesBasicResources() - { - return GetCachedClient(client => new RaiBlocklistItemPropertiesBasicResourceCollection(client, Id)); - } - - /// - /// Gets the specified custom blocklist item associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the RaiBlocklist Item. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetRaiBlocklistItemPropertiesBasicResourceAsync(string raiBlocklistItemName, CancellationToken cancellationToken = default) - { - return await GetRaiBlocklistItemPropertiesBasicResources().GetAsync(raiBlocklistItemName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the specified custom blocklist item associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the RaiBlocklist Item. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetRaiBlocklistItemPropertiesBasicResource(string raiBlocklistItemName, CancellationToken cancellationToken = default) - { - return GetRaiBlocklistItemPropertiesBasicResources().Get(raiBlocklistItemName, cancellationToken); - } - - /// - /// Gets the specified custom blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResource.Get"); - scope.Start(); - try - { - var response = await _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RaiBlocklistPropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specified custom blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResource.Get"); - scope.Start(); - try - { - var response = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RaiBlocklistPropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the specified custom blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Delete - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResource.Delete"); - scope.Start(); - try - { - var response = await _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics, Pipeline, _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the specified custom blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Delete - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResource.Delete"); - scope.Start(); - try - { - var response = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics, Pipeline, _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, RaiBlocklistPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResource.Update"); - scope.Start(); - try - { - var response = await _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new RaiBlocklistPropertiesBasicResourceOperationSource(Client), _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics, Pipeline, _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, RaiBlocklistPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResource.Update"); - scope.Start(); - try - { - var response = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(new RaiBlocklistPropertiesBasicResourceOperationSource(Client), _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics, Pipeline, _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/addRaiBlocklistItems - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_AddBulk - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Properties describing the custom blocklist items. - /// The cancellation token to use. - /// is null. - public virtual async Task>> AddBulkConnectionRaiBlocklistItemAsync(WaitUntil waitUntil, IEnumerable content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResource.AddBulkConnectionRaiBlocklistItem"); - scope.Start(); - try - { - var response = await _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.AddBulkAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation>(new IListOperationSource(), _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics, Pipeline, _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.CreateAddBulkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/addRaiBlocklistItems - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_AddBulk - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Properties describing the custom blocklist items. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation> AddBulkConnectionRaiBlocklistItem(WaitUntil waitUntil, IEnumerable content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResource.AddBulkConnectionRaiBlocklistItem"); - scope.Start(); - try - { - var response = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.AddBulk(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new MachineLearningArmOperation>(new IListOperationSource(), _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics, Pipeline, _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.CreateAddBulkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/deleteRaiBlocklistItems - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_DeleteBulk - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// List of RAI Blocklist Items Names. - /// The cancellation token to use. - /// is null. - public virtual async Task DeleteBulkConnectionRaiBlocklistItemAsync(WaitUntil waitUntil, BinaryData body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResource.DeleteBulkConnectionRaiBlocklistItem"); - scope.Start(); - try - { - var response = await _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.DeleteBulkAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics, Pipeline, _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.CreateDeleteBulkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/deleteRaiBlocklistItems - /// - /// - /// Operation Id - /// ConnectionRaiBlocklistItem_DeleteBulk - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// List of RAI Blocklist Items Names. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation DeleteBulkConnectionRaiBlocklistItem(WaitUntil waitUntil, BinaryData body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResource.DeleteBulkConnectionRaiBlocklistItem"); - scope.Start(); - try - { - var response = _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.DeleteBulk(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new MachineLearningArmOperation(_raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemClientDiagnostics, Pipeline, _raiBlocklistItemPropertiesBasicResourceConnectionRaiBlocklistItemRestClient.CreateDeleteBulkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResourceCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResourceCollection.cs deleted file mode 100644 index 48406f8e6acb2..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResourceCollection.cs +++ /dev/null @@ -1,498 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetRaiBlocklistPropertiesBasicResources method from an instance of . - /// - public partial class RaiBlocklistPropertiesBasicResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics; - private readonly ConnectionRaiBlocklistRestOperations _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient; - private readonly ClientDiagnostics _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistsClientDiagnostics; - private readonly ConnectionRaiBlocklistsRestOperations _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistsRestClient; - - /// Initializes a new instance of the class for mocking. - protected RaiBlocklistPropertiesBasicResourceCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal RaiBlocklistPropertiesBasicResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", RaiBlocklistPropertiesBasicResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(RaiBlocklistPropertiesBasicResource.ResourceType, out string raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistApiVersion); - _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient = new ConnectionRaiBlocklistRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistApiVersion); - _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", RaiBlocklistPropertiesBasicResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(RaiBlocklistPropertiesBasicResource.ResourceType, out string raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistsApiVersion); - _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistsRestClient = new ConnectionRaiBlocklistsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != MachineLearningWorkspaceConnectionResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningWorkspaceConnectionResource.ResourceType), nameof(id)); - } - - /// - /// Update the state of specified blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the RaiBlocklist. - /// The to use. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string raiBlocklistName, RaiBlocklistPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiBlocklistName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new RaiBlocklistPropertiesBasicResourceOperationSource(Client), _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics, Pipeline, _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiBlocklistName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the RaiBlocklist. - /// The to use. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string raiBlocklistName, RaiBlocklistPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiBlocklistName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new RaiBlocklistPropertiesBasicResourceOperationSource(Client), _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics, Pipeline, _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiBlocklistName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specified custom blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResourceCollection.Get"); - scope.Start(); - try - { - var response = await _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiBlocklistName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RaiBlocklistPropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specified custom blocklist associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResourceCollection.Get"); - scope.Start(); - try - { - var response = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiBlocklistName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new RaiBlocklistPropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the custom blocklists associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists - /// - /// - /// Operation Id - /// ConnectionRaiBlocklists_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new RaiBlocklistPropertiesBasicResource(Client, RaiBlocklistPropertiesBasicResourceData.DeserializeRaiBlocklistPropertiesBasicResourceData(e)), _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistsClientDiagnostics, Pipeline, "RaiBlocklistPropertiesBasicResourceCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Gets the custom blocklists associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists - /// - /// - /// Operation Id - /// ConnectionRaiBlocklists_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RaiBlocklistPropertiesBasicResource(Client, RaiBlocklistPropertiesBasicResourceData.DeserializeRaiBlocklistPropertiesBasicResourceData(e)), _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistsClientDiagnostics, Pipeline, "RaiBlocklistPropertiesBasicResourceCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResourceCollection.Exists"); - scope.Start(); - try - { - var response = await _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiBlocklistName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResourceCollection.Exists"); - scope.Start(); - try - { - var response = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiBlocklistName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiBlocklistName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new RaiBlocklistPropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName} - /// - /// - /// Operation Id - /// ConnectionRaiBlocklist_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var scope = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistClientDiagnostics.CreateScope("RaiBlocklistPropertiesBasicResourceCollection.GetIfExists"); - scope.Start(); - try - { - var response = _raiBlocklistPropertiesBasicResourceConnectionRaiBlocklistRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiBlocklistName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new RaiBlocklistPropertiesBasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResourceData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResourceData.Serialization.cs deleted file mode 100644 index f8ec2150e080d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResourceData.Serialization.cs +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class RaiBlocklistPropertiesBasicResourceData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RaiBlocklistPropertiesBasicResourceData)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - 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 - } - } - writer.WriteEndObject(); - } - - RaiBlocklistPropertiesBasicResourceData 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(RaiBlocklistPropertiesBasicResourceData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRaiBlocklistPropertiesBasicResourceData(document.RootElement, options); - } - - internal static RaiBlocklistPropertiesBasicResourceData DeserializeRaiBlocklistPropertiesBasicResourceData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RaiBlocklistProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = RaiBlocklistProperties.DeserializeRaiBlocklistProperties(property.Value, options); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RaiBlocklistPropertiesBasicResourceData( - id, - name, - type, - systemData, - properties, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RaiBlocklistPropertiesBasicResourceData)} does not support writing '{options.Format}' format."); - } - } - - RaiBlocklistPropertiesBasicResourceData 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 DeserializeRaiBlocklistPropertiesBasicResourceData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RaiBlocklistPropertiesBasicResourceData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResourceData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResourceData.cs deleted file mode 100644 index 02321fa00384d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiBlocklistPropertiesBasicResourceData.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the RaiBlocklistPropertiesBasicResource data model. - public partial class RaiBlocklistPropertiesBasicResourceData : ResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// RAI Custom Blocklist properties. - /// is null. - public RaiBlocklistPropertiesBasicResourceData(RaiBlocklistProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// RAI Custom Blocklist properties. - /// Keeps track of any properties unknown to the library. - internal RaiBlocklistPropertiesBasicResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RaiBlocklistProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RaiBlocklistPropertiesBasicResourceData() - { - } - - /// RAI Custom Blocklist properties. - internal RaiBlocklistProperties Properties { get; set; } - /// Description of the block list. - public string RaiBlocklistDescription - { - get => Properties is null ? default : Properties.Description; - set - { - if (Properties is null) - Properties = new RaiBlocklistProperties(); - Properties.Description = value; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiPolicyPropertiesBasicResourceData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiPolicyPropertiesBasicResourceData.Serialization.cs deleted file mode 100644 index 575935991f15d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiPolicyPropertiesBasicResourceData.Serialization.cs +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class RaiPolicyPropertiesBasicResourceData : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RaiPolicyPropertiesBasicResourceData)} does not support writing '{format}' format."); - } - - writer.WriteStartObject(); - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - if (options.Format != "W") - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W") - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - JsonSerializer.Serialize(writer, SystemData); - } - 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 - } - } - writer.WriteEndObject(); - } - - RaiPolicyPropertiesBasicResourceData 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(RaiPolicyPropertiesBasicResourceData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRaiPolicyPropertiesBasicResourceData(document.RootElement, options); - } - - internal static RaiPolicyPropertiesBasicResourceData DeserializeRaiPolicyPropertiesBasicResourceData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RaiPolicyProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - SystemData systemData = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - properties = RaiPolicyProperties.DeserializeRaiPolicyProperties(property.Value, options); - continue; - } - if (property.NameEquals("id"u8)) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RaiPolicyPropertiesBasicResourceData( - id, - name, - type, - systemData, - properties, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(RaiPolicyPropertiesBasicResourceData)} does not support writing '{options.Format}' format."); - } - } - - RaiPolicyPropertiesBasicResourceData 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 DeserializeRaiPolicyPropertiesBasicResourceData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RaiPolicyPropertiesBasicResourceData)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiPolicyPropertiesBasicResourceData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiPolicyPropertiesBasicResourceData.cs deleted file mode 100644 index e54e633289d48..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RaiPolicyPropertiesBasicResourceData.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A class representing the RaiPolicyPropertiesBasicResource data model. - /// Azure OpenAI Content Filters resource. - /// - public partial class RaiPolicyPropertiesBasicResourceData : ResourceData - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// Azure OpenAI Content Filters properties. - /// is null. - public RaiPolicyPropertiesBasicResourceData(RaiPolicyProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Azure OpenAI Content Filters properties. - /// Keeps track of any properties unknown to the library. - internal RaiPolicyPropertiesBasicResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RaiPolicyProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) - { - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RaiPolicyPropertiesBasicResourceData() - { - } - - /// Azure OpenAI Content Filters properties. - public RaiPolicyProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchDeploymentsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchDeploymentsRestOperations.cs index 2d37db873e5aa..35519ef5772d3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchDeploymentsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchDeploymentsRestOperations.cs @@ -32,7 +32,7 @@ public BatchDeploymentsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchEndpointsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchEndpointsRestOperations.cs index 6973a0ed69716..925739d2c42fd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchEndpointsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public BatchEndpointsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeContainersRestOperations.cs index cf88c9fb923cd..9fb6434b62a9c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeContainersRestOperations.cs @@ -32,7 +32,7 @@ public CodeContainersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeVersionsRestOperations.cs index cbdf1b1fbdbca..f9f566a802b40 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeVersionsRestOperations.cs @@ -32,7 +32,7 @@ public CodeVersionsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentContainersRestOperations.cs index b29ddc95a602e..7e0d0cb7cb15b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentContainersRestOperations.cs @@ -32,7 +32,7 @@ public ComponentContainersRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentVersionsRestOperations.cs index f29c4bf365399..04bedb3176158 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentVersionsRestOperations.cs @@ -32,7 +32,7 @@ public ComponentVersionsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComputeRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComputeRestOperations.cs index 6be3cfe65d703..0ef8ef68b3112 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComputeRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComputeRestOperations.cs @@ -6,7 +6,6 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -33,7 +32,7 @@ public ComputeRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -541,111 +540,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string w } } - internal RequestUriBuilder CreateUpdateCustomServicesRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IEnumerable customServices) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/computes/", false); - uri.AppendPath(computeName, true); - uri.AppendPath("/customServices", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateCustomServicesRequest(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IEnumerable customServices) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/computes/", false); - uri.AppendPath(computeName, true); - uri.AppendPath("/customServices", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStartArray(); - foreach (var item in customServices) - { - content.JsonWriter.WriteObjectValue(item, ModelSerializationExtensions.WireOptions); - } - content.JsonWriter.WriteEndArray(); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Updates the custom services list. The list of custom services provided shall be overwritten. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// New list of Custom Services. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateCustomServicesAsync(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IEnumerable customServices, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); - Argument.AssertNotNull(customServices, nameof(customServices)); - - using var message = CreateUpdateCustomServicesRequest(subscriptionId, resourceGroupName, workspaceName, computeName, customServices); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates the custom services list. The list of custom services provided shall be overwritten. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// New list of Custom Services. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response UpdateCustomServices(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IEnumerable customServices, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); - Argument.AssertNotNull(customServices, nameof(customServices)); - - using var message = CreateUpdateCustomServicesRequest(subscriptionId, resourceGroupName, workspaceName, computeName, customServices); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateListNodesRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string computeName) { var uri = new RawRequestUriBuilder(); @@ -850,111 +744,6 @@ public Response ListKeys(string subscriptionId, s } } - internal RequestUriBuilder CreateUpdateDataMountsRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IEnumerable dataMounts) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/computes/", false); - uri.AppendPath(computeName, true); - uri.AppendPath("/updateDataMounts", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateDataMountsRequest(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IEnumerable dataMounts) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/computes/", false); - uri.AppendPath(computeName, true); - uri.AppendPath("/updateDataMounts", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteStartArray(); - foreach (var item in dataMounts) - { - content.JsonWriter.WriteObjectValue(item, ModelSerializationExtensions.WireOptions); - } - content.JsonWriter.WriteEndArray(); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update Data Mounts of a Machine Learning compute. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// The parameters for creating or updating a machine learning workspace. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateDataMountsAsync(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IEnumerable dataMounts, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); - Argument.AssertNotNull(dataMounts, nameof(dataMounts)); - - using var message = CreateUpdateDataMountsRequest(subscriptionId, resourceGroupName, workspaceName, computeName, dataMounts); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update Data Mounts of a Machine Learning compute. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// The parameters for creating or updating a machine learning workspace. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response UpdateDataMounts(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IEnumerable dataMounts, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); - Argument.AssertNotNull(dataMounts, nameof(dataMounts)); - - using var message = CreateUpdateDataMountsRequest(subscriptionId, resourceGroupName, workspaceName, computeName, dataMounts); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string computeName) { var uri = new RawRequestUriBuilder(); @@ -1231,308 +1020,6 @@ public Response Restart(string subscriptionId, string resourceGroupName, string } } - internal RequestUriBuilder CreateUpdateIdleShutdownSettingRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IdleShutdownSetting idleShutdownSetting) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/computes/", false); - uri.AppendPath(computeName, true); - uri.AppendPath("/updateIdleShutdownSetting", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateIdleShutdownSettingRequest(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IdleShutdownSetting idleShutdownSetting) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/computes/", false); - uri.AppendPath(computeName, true); - uri.AppendPath("/updateIdleShutdownSetting", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(idleShutdownSetting, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Updates the idle shutdown setting of a compute instance. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// The object for updating idle shutdown setting of specified ComputeInstance. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateIdleShutdownSettingAsync(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IdleShutdownSetting idleShutdownSetting, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); - Argument.AssertNotNull(idleShutdownSetting, nameof(idleShutdownSetting)); - - using var message = CreateUpdateIdleShutdownSettingRequest(subscriptionId, resourceGroupName, workspaceName, computeName, idleShutdownSetting); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates the idle shutdown setting of a compute instance. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// The object for updating idle shutdown setting of specified ComputeInstance. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response UpdateIdleShutdownSetting(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, IdleShutdownSetting idleShutdownSetting, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); - Argument.AssertNotNull(idleShutdownSetting, nameof(idleShutdownSetting)); - - using var message = CreateUpdateIdleShutdownSettingRequest(subscriptionId, resourceGroupName, workspaceName, computeName, idleShutdownSetting); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetAllowedResizeSizesRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string computeName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/computes/", false); - uri.AppendPath(computeName, true); - uri.AppendPath("/getAllowedVmSizesForResize", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetAllowedResizeSizesRequest(string subscriptionId, string resourceGroupName, string workspaceName, string computeName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/computes/", false); - uri.AppendPath(computeName, true); - uri.AppendPath("/getAllowedVmSizesForResize", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Returns supported virtual machine sizes for resize. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAllowedResizeSizesAsync(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); - - using var message = CreateGetAllowedResizeSizesRequest(subscriptionId, resourceGroupName, workspaceName, computeName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - VirtualMachineSizeListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = VirtualMachineSizeListResult.DeserializeVirtualMachineSizeListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Returns supported virtual machine sizes for resize. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetAllowedResizeSizes(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); - - using var message = CreateGetAllowedResizeSizesRequest(subscriptionId, resourceGroupName, workspaceName, computeName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - VirtualMachineSizeListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = VirtualMachineSizeListResult.DeserializeVirtualMachineSizeListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateResizeRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, ResizeSchema resizeSchema) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/computes/", false); - uri.AppendPath(computeName, true); - uri.AppendPath("/resize", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateResizeRequest(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, ResizeSchema resizeSchema) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/computes/", false); - uri.AppendPath(computeName, true); - uri.AppendPath("/resize", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(resizeSchema, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Updates the size of a Compute Instance. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// The object for updating VM size setting of specified Compute Instance. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task ResizeAsync(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, ResizeSchema resizeSchema, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); - Argument.AssertNotNull(resizeSchema, nameof(resizeSchema)); - - using var message = CreateResizeRequest(subscriptionId, resourceGroupName, workspaceName, computeName, resizeSchema); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates the size of a Compute Instance. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Name of Azure Machine Learning workspace. - /// Name of the Azure Machine Learning compute. - /// The object for updating VM size setting of specified Compute Instance. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Resize(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, ResizeSchema resizeSchema, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(computeName, nameof(computeName)); - Argument.AssertNotNull(resizeSchema, nameof(resizeSchema)); - - using var message = CreateResizeRequest(subscriptionId, resourceGroupName, workspaceName, computeName, resizeSchema); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiBlocklistItemRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiBlocklistItemRestOperations.cs deleted file mode 100644 index 3c147dc255bd9..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiBlocklistItemRestOperations.cs +++ /dev/null @@ -1,614 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - internal partial class ConnectionRaiBlocklistItemRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ConnectionRaiBlocklistItemRestOperations. - /// 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 ConnectionRaiBlocklistItemRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateAddBulkRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, IEnumerable content) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendPath("/addRaiBlocklistItems", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateAddBulkRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, IEnumerable content) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendPath("/addRaiBlocklistItems", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteStartArray(); - foreach (var item in content) - { - content0.JsonWriter.WriteObjectValue(item, ModelSerializationExtensions.WireOptions); - } - content0.JsonWriter.WriteEndArray(); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// Properties describing the custom blocklist items. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task AddBulkAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, IEnumerable content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateAddBulkRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// Properties describing the custom blocklist items. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response AddBulk(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, IEnumerable content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateAddBulkRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteBulkRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, BinaryData body) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendPath("/deleteRaiBlocklistItems", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteBulkRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, BinaryData body) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendPath("/deleteRaiBlocklistItems", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); -#if NET6_0_OR_GREATER - content.JsonWriter.WriteRawValue(body); -#else - using (JsonDocument document = JsonDocument.Parse(body)) - { - JsonSerializer.Serialize(content.JsonWriter, document.RootElement); - } -#endif - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// List of RAI Blocklist Items Names. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task DeleteBulkAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, BinaryData body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateDeleteBulkRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// List of RAI Blocklist Items Names. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response DeleteBulk(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, BinaryData body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNull(body, nameof(body)); - - using var message = CreateDeleteBulkRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendPath("/raiBlocklistItems/", false); - uri.AppendPath(raiBlocklistItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendPath("/raiBlocklistItems/", false); - uri.AppendPath(raiBlocklistItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes the specified custom blocklist item associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// Name of the RaiBlocklist Item. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes the specified custom blocklist item associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// Name of the RaiBlocklist Item. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendPath("/raiBlocklistItems/", false); - uri.AppendPath(raiBlocklistItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendPath("/raiBlocklistItems/", false); - uri.AppendPath(raiBlocklistItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the specified custom blocklist item associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// Name of the RaiBlocklist Item. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RaiBlocklistItemPropertiesBasicResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RaiBlocklistItemPropertiesBasicResourceData.DeserializeRaiBlocklistItemPropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RaiBlocklistItemPropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the specified custom blocklist item associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// Name of the RaiBlocklist Item. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RaiBlocklistItemPropertiesBasicResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RaiBlocklistItemPropertiesBasicResourceData.DeserializeRaiBlocklistItemPropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RaiBlocklistItemPropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceData data) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendPath("/raiBlocklistItems/", false); - uri.AppendPath(raiBlocklistItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendPath("/raiBlocklistItems/", false); - uri.AppendPath(raiBlocklistItemName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update the state of specified blocklist item associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// Name of the RaiBlocklist Item. - /// The to use. - /// The cancellation token to use. - /// , , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update the state of specified blocklist item associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// Name of the RaiBlocklist Item. - /// The to use. - /// The cancellation token to use. - /// , , , , , or is null. - /// , , , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, string raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNullOrEmpty(raiBlocklistItemName, nameof(raiBlocklistItemName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiBlocklistItemsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiBlocklistItemsRestOperations.cs deleted file mode 100644 index adfea5970ca98..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiBlocklistItemsRestOperations.cs +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - internal partial class ConnectionRaiBlocklistItemsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ConnectionRaiBlocklistItemsRestOperations. - /// 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 ConnectionRaiBlocklistItemsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendPath("/raiBlocklistItems", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendPath("/raiBlocklistItems", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the custom blocklist items associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.DeserializeRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the custom blocklist items associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.DeserializeRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the custom blocklist items associated with the Azure OpenAI connection. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.DeserializeRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the custom blocklist items associated with the Azure OpenAI connection. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.DeserializeRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiBlocklistRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiBlocklistRestOperations.cs deleted file mode 100644 index e864bf0736a3c..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiBlocklistRestOperations.cs +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - internal partial class ConnectionRaiBlocklistRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ConnectionRaiBlocklistRestOperations. - /// 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 ConnectionRaiBlocklistRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes the specified custom blocklist associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes the specified custom blocklist associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the specified custom blocklist associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RaiBlocklistPropertiesBasicResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RaiBlocklistPropertiesBasicResourceData.DeserializeRaiBlocklistPropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RaiBlocklistPropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the specified custom blocklist associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RaiBlocklistPropertiesBasicResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RaiBlocklistPropertiesBasicResourceData.DeserializeRaiBlocklistPropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RaiBlocklistPropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, RaiBlocklistPropertiesBasicResourceData data) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, RaiBlocklistPropertiesBasicResourceData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists/", false); - uri.AppendPath(raiBlocklistName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update the state of specified blocklist associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// The to use. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, RaiBlocklistPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update the state of specified blocklist associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The name of the RaiBlocklist. - /// The to use. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiBlocklistName, RaiBlocklistPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiBlocklistName, nameof(raiBlocklistName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiBlocklistName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiBlocklistsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiBlocklistsRestOperations.cs deleted file mode 100644 index f095c94a47739..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiBlocklistsRestOperations.cs +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - internal partial class ConnectionRaiBlocklistsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ConnectionRaiBlocklistsRestOperations. - /// 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 ConnectionRaiBlocklistsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiBlocklists", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the custom blocklists associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RaiBlocklistPropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RaiBlocklistPropertiesBasicResourceArmPaginatedResult.DeserializeRaiBlocklistPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the custom blocklists associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RaiBlocklistPropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RaiBlocklistPropertiesBasicResourceArmPaginatedResult.DeserializeRaiBlocklistPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the custom blocklists associated with the Azure OpenAI connection. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, connectionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RaiBlocklistPropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RaiBlocklistPropertiesBasicResourceArmPaginatedResult.DeserializeRaiBlocklistPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the custom blocklists associated with the Azure OpenAI connection. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, connectionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RaiBlocklistPropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RaiBlocklistPropertiesBasicResourceArmPaginatedResult.DeserializeRaiBlocklistPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiPoliciesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiPoliciesRestOperations.cs deleted file mode 100644 index d5e783d43501f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiPoliciesRestOperations.cs +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - internal partial class ConnectionRaiPoliciesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ConnectionRaiPoliciesRestOperations. - /// 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 ConnectionRaiPoliciesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiPolicies", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiPolicies", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List the specified Content Filters associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RaiPolicyPropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RaiPolicyPropertiesBasicResourceArmPaginatedResult.DeserializeRaiPolicyPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List the specified Content Filters associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RaiPolicyPropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RaiPolicyPropertiesBasicResourceArmPaginatedResult.DeserializeRaiPolicyPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List the specified Content Filters associated with the Azure OpenAI connection. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, connectionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RaiPolicyPropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RaiPolicyPropertiesBasicResourceArmPaginatedResult.DeserializeRaiPolicyPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List the specified Content Filters associated with the Azure OpenAI connection. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, connectionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RaiPolicyPropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RaiPolicyPropertiesBasicResourceArmPaginatedResult.DeserializeRaiPolicyPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiPolicyRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiPolicyRestOperations.cs deleted file mode 100644 index d885c9356a506..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRaiPolicyRestOperations.cs +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - internal partial class ConnectionRaiPolicyRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ConnectionRaiPolicyRestOperations. - /// 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 ConnectionRaiPolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiPolicies/", false); - uri.AppendPath(raiPolicyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiPolicies/", false); - uri.AppendPath(raiPolicyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes the specified Content Filters associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Name of the Rai Policy. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiPolicyName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes the specified Content Filters associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Name of the Rai Policy. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiPolicyName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiPolicies/", false); - uri.AppendPath(raiPolicyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiPolicies/", false); - uri.AppendPath(raiPolicyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the specified Content Filters associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Name of the Rai Policy. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiPolicyName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RaiPolicyPropertiesBasicResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RaiPolicyPropertiesBasicResourceData.DeserializeRaiPolicyPropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RaiPolicyPropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the specified Content Filters associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Name of the Rai Policy. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiPolicyName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RaiPolicyPropertiesBasicResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RaiPolicyPropertiesBasicResourceData.DeserializeRaiPolicyPropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RaiPolicyPropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName, RaiPolicyPropertiesBasicResourceData data) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiPolicies/", false); - uri.AppendPath(raiPolicyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName, RaiPolicyPropertiesBasicResourceData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/raiPolicies/", false); - uri.AppendPath(raiPolicyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update the state of specified Content Filters associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Name of the Rai Policy. - /// The to use. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName, RaiPolicyPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiPolicyName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update the state of specified Content Filters associated with the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Name of the Rai Policy. - /// The to use. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName, RaiPolicyPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, raiPolicyName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRestOperations.cs deleted file mode 100644 index 31f2b45cf56ee..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ConnectionRestOperations.cs +++ /dev/null @@ -1,833 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - internal partial class ConnectionRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of ConnectionRestOperations. - /// 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 ConnectionRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListDeploymentsRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/deployments", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListDeploymentsRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/deployments", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get all the deployments under the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListDeploymentsAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateListDeploymentsRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all the deployments under the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListDeployments(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateListDeploymentsRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteDeploymentRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/deployments/", false); - uri.AppendPath(deploymentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteDeploymentRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/deployments/", false); - uri.AppendPath(deploymentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Delete Azure OpenAI connection deployment resource by name. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Name of the deployment resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task DeleteDeploymentAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var message = CreateDeleteDeploymentRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, deploymentName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete Azure OpenAI connection deployment resource by name. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Name of the deployment resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response DeleteDeployment(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var message = CreateDeleteDeploymentRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, deploymentName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetDeploymentRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/deployments/", false); - uri.AppendPath(deploymentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetDeploymentRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/deployments/", false); - uri.AppendPath(deploymentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get deployments under the Azure OpenAI connection by name. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Name of the deployment resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetDeploymentAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var message = CreateGetDeploymentRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, deploymentName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((EndpointDeploymentResourcePropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get deployments under the Azure OpenAI connection by name. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Name of the deployment resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response GetDeployment(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var message = CreateGetDeploymentRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, deploymentName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((EndpointDeploymentResourcePropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateOrUpdateDeploymentRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName, EndpointDeploymentResourcePropertiesBasicResourceData data) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/deployments/", false); - uri.AppendPath(deploymentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateOrUpdateDeploymentRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName, EndpointDeploymentResourcePropertiesBasicResourceData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/deployments/", false); - uri.AppendPath(deploymentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Create or update Azure OpenAI connection deployment resource with the specified parameters. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Name of the deployment resource. - /// deployment object. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateDeploymentAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName, EndpointDeploymentResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateDeploymentRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, deploymentName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create or update Azure OpenAI connection deployment resource with the specified parameters. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Name of the deployment resource. - /// deployment object. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdateDeployment(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName, EndpointDeploymentResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateDeploymentRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, deploymentName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetModelsRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/models", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetModelsRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/models", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get available models under the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetModelsAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateGetModelsRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointModels value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointModels.DeserializeEndpointModels(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get available models under the Azure OpenAI connection. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetModels(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateGetModelsRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointModels value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointModels.DeserializeEndpointModels(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListModelsRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/listConnectionModels", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListModelsRequest(string subscriptionId, string resourceGroupName, string workspaceName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/listConnectionModels", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListModelsAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateListModelsRequest(subscriptionId, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointModels value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointModels.DeserializeEndpointModels(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListModels(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateListModelsRequest(subscriptionId, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointModels value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointModels.DeserializeEndpointModels(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListDeploymentsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListDeploymentsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get all the deployments under the Azure OpenAI connection. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListDeploymentsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateListDeploymentsNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, connectionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all the deployments under the Azure OpenAI connection. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListDeploymentsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateListDeploymentsNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, connectionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetModelsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateGetModelsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get available models under the Azure OpenAI connection. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetModelsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateGetModelsNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, connectionName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointModels value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointModels.DeserializeEndpointModels(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get available models under the Azure OpenAI connection. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetModelsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateGetModelsNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, connectionName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointModels value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointModels.DeserializeEndpointModels(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataContainersRestOperations.cs index 0ea15c14eac33..75a692b8cd39d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataContainersRestOperations.cs @@ -32,7 +32,7 @@ public DataContainersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs index 6c47b332208e8..7022c7f9e5092 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs @@ -32,7 +32,7 @@ public DataVersionsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DatastoresRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DatastoresRestOperations.cs index e4ba7194d7c36..57ac90766ce44 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DatastoresRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DatastoresRestOperations.cs @@ -33,7 +33,7 @@ public DatastoresRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -517,7 +517,7 @@ public Response CreateOrUpdate(string subscription } } - internal RequestUriBuilder CreateListSecretsRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string name, SecretExpiry body) + internal RequestUriBuilder CreateListSecretsRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string name) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -534,7 +534,7 @@ internal RequestUriBuilder CreateListSecretsRequestUri(string subscriptionId, st return uri; } - internal HttpMessage CreateListSecretsRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, SecretExpiry body) + internal HttpMessage CreateListSecretsRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -553,13 +553,6 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - if (body != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(body, ModelSerializationExtensions.WireOptions); - request.Content = content; - } _userAgent.Apply(message); return message; } @@ -569,18 +562,17 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Datastore name. - /// Secret expiry information. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListSecretsAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, SecretExpiry body = null, CancellationToken cancellationToken = default) + public async Task> ListSecretsAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListSecretsRequest(subscriptionId, resourceGroupName, workspaceName, name, body); + using var message = CreateListSecretsRequest(subscriptionId, resourceGroupName, workspaceName, name); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -601,18 +593,17 @@ public async Task> ListSecretsAsync(st /// The name of the resource group. The name is case insensitive. /// Name of Azure Machine Learning workspace. /// Datastore name. - /// Secret expiry information. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListSecrets(string subscriptionId, string resourceGroupName, string workspaceName, string name, SecretExpiry body = null, CancellationToken cancellationToken = default) + public Response ListSecrets(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(name, nameof(name)); - using var message = CreateListSecretsRequest(subscriptionId, resourceGroupName, workspaceName, name, body); + using var message = CreateListSecretsRequest(subscriptionId, resourceGroupName, workspaceName, name); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EndpointDeploymentRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EndpointDeploymentRestOperations.cs deleted file mode 100644 index ee46457e483b3..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EndpointDeploymentRestOperations.cs +++ /dev/null @@ -1,751 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - internal partial class EndpointDeploymentRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of EndpointDeploymentRestOperations. - /// 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 EndpointDeploymentRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateGetInWorkspaceRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType, string skip) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/deployments", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (endpointType != null) - { - uri.AppendQuery("endpointType", endpointType.Value.ToString(), true); - } - if (skip != null) - { - uri.AppendQuery("$skip", skip, true); - } - return uri; - } - - internal HttpMessage CreateGetInWorkspaceRequest(string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType, string skip) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/deployments", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (endpointType != null) - { - uri.AppendQuery("endpointType", endpointType.Value.ToString(), true); - } - if (skip != null) - { - uri.AppendQuery("$skip", skip, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get all the deployments under the workspace scope. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Endpoint type filter. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetInWorkspaceAsync(string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType = null, string skip = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateGetInWorkspaceRequest(subscriptionId, resourceGroupName, workspaceName, endpointType, skip); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all the deployments under the workspace scope. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Endpoint type filter. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetInWorkspace(string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType = null, string skip = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateGetInWorkspaceRequest(subscriptionId, resourceGroupName, workspaceName, endpointType, skip); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/deployments", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/deployments", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get all the deployments under the endpoint resource scope. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, endpointName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all the deployments under the endpoint resource scope. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, endpointName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/deployments/", false); - uri.AppendPath(deploymentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/deployments/", false); - uri.AppendPath(deploymentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Delete endpoint deployment resource by name. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Name of the deployment resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, deploymentName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete endpoint deployment resource by name. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Name of the deployment resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, deploymentName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/deployments/", false); - uri.AppendPath(deploymentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/deployments/", false); - uri.AppendPath(deploymentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get deployments under endpoint resource by name. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Name of the deployment resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, deploymentName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((EndpointDeploymentResourcePropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get deployments under endpoint resource by name. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Name of the deployment resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, deploymentName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((EndpointDeploymentResourcePropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, EndpointDeploymentResourcePropertiesBasicResourceData data) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/deployments/", false); - uri.AppendPath(deploymentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, EndpointDeploymentResourcePropertiesBasicResourceData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/deployments/", false); - uri.AppendPath(deploymentName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Create or update endpoint deployment resource with the specified parameters. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Name of the deployment resource. - /// deployment object. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, EndpointDeploymentResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, deploymentName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create or update endpoint deployment resource with the specified parameters. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Name of the deployment resource. - /// deployment object. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, EndpointDeploymentResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, deploymentName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetInWorkspaceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType, string skip) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateGetInWorkspaceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType, string skip) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get all the deployments under the workspace scope. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Endpoint type filter. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetInWorkspaceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType = null, string skip = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateGetInWorkspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, endpointType, skip); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all the deployments under the workspace scope. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Endpoint type filter. - /// Continuation token for pagination. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetInWorkspaceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType = null, string skip = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateGetInWorkspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, endpointType, skip); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get all the deployments under the endpoint resource scope. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, endpointName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all the deployments under the endpoint resource scope. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, endpointName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EndpointRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EndpointRestOperations.cs deleted file mode 100644 index 2d7a12da48292..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EndpointRestOperations.cs +++ /dev/null @@ -1,871 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - internal partial class EndpointRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of EndpointRestOperations. - /// 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 EndpointRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType, bool? includeInferenceEndpoints, string skip, string expand) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (endpointType != null) - { - uri.AppendQuery("endpointType", endpointType.Value.ToString(), true); - } - if (includeInferenceEndpoints != null) - { - uri.AppendQuery("includeInferenceEndpoints", includeInferenceEndpoints.Value, true); - } - if (skip != null) - { - uri.AppendQuery("$skip", skip, true); - } - if (expand != null) - { - uri.AppendQuery("$expand", expand, true); - } - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType, bool? includeInferenceEndpoints, string skip, string expand) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (endpointType != null) - { - uri.AppendQuery("endpointType", endpointType.Value.ToString(), true); - } - if (includeInferenceEndpoints != null) - { - uri.AppendQuery("includeInferenceEndpoints", includeInferenceEndpoints.Value, true); - } - if (skip != null) - { - uri.AppendQuery("$skip", skip, true); - } - if (expand != null) - { - uri.AppendQuery("$expand", expand, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List All the endpoints under this workspace. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Endpoint type filter. - /// The ? to use. - /// Continuation token for pagination. - /// Whether the endpoint resource will be expand to include deployment information, e.g. $expand=deployments. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType = null, bool? includeInferenceEndpoints = null, string skip = null, string expand = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, endpointType, includeInferenceEndpoints, skip, expand); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List All the endpoints under this workspace. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Endpoint type filter. - /// The ? to use. - /// Continuation token for pagination. - /// Whether the endpoint resource will be expand to include deployment information, e.g. $expand=deployments. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType = null, bool? includeInferenceEndpoints = null, string skip = null, string expand = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, endpointType, includeInferenceEndpoints, skip, expand); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets endpoint resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, endpointName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointResourcePropertiesBasicResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointResourcePropertiesBasicResourceData.DeserializeEndpointResourcePropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((EndpointResourcePropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets endpoint resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, endpointName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointResourcePropertiesBasicResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointResourcePropertiesBasicResourceData.DeserializeEndpointResourcePropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((EndpointResourcePropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, EndpointResourcePropertiesBasicResourceData data) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, EndpointResourcePropertiesBasicResourceData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Create or update endpoint resource with the specified parameters. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Endpoint resource object. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, EndpointResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create or update endpoint resource with the specified parameters. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Endpoint resource object. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, EndpointResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListKeysRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/listKeys", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/listKeys", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List keys for the endpoint resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateListKeysRequest(subscriptionId, resourceGroupName, workspaceName, endpointName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointKeys value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointKeys.DeserializeEndpointKeys(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List keys for the endpoint resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListKeys(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateListKeysRequest(subscriptionId, resourceGroupName, workspaceName, endpointName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointKeys value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointKeys.DeserializeEndpointKeys(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetModelsRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/models", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetModelsRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/models", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get available models under the endpoint resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetModelsAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateGetModelsRequest(subscriptionId, resourceGroupName, workspaceName, endpointName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointModels value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointModels.DeserializeEndpointModels(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get available models under the endpoint resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetModels(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateGetModelsRequest(subscriptionId, resourceGroupName, workspaceName, endpointName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointModels value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointModels.DeserializeEndpointModels(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateRegenerateKeysRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, RegenerateServiceAccountKeyContent content) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/regenerateKey", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateRegenerateKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, RegenerateServiceAccountKeyContent content) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/regenerateKey", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - _userAgent.Apply(message); - return message; - } - - /// Regenerate account keys. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The to use. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> RegenerateKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, RegenerateServiceAccountKeyContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateRegenerateKeysRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, content); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AccountApiKeys value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = AccountApiKeys.DeserializeAccountApiKeys(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Regenerate account keys. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The to use. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response RegenerateKeys(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, RegenerateServiceAccountKeyContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNull(content, nameof(content)); - - using var message = CreateRegenerateKeysRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, content); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AccountApiKeys value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = AccountApiKeys.DeserializeAccountApiKeys(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType, bool? includeInferenceEndpoints, string skip, string expand) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType, bool? includeInferenceEndpoints, string skip, string expand) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List All the endpoints under this workspace. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Endpoint type filter. - /// The ? to use. - /// Continuation token for pagination. - /// Whether the endpoint resource will be expand to include deployment information, e.g. $expand=deployments. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType = null, bool? includeInferenceEndpoints = null, string skip = null, string expand = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, endpointType, includeInferenceEndpoints, skip, expand); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List All the endpoints under this workspace. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Endpoint type filter. - /// The ? to use. - /// Continuation token for pagination. - /// Whether the endpoint resource will be expand to include deployment information, e.g. $expand=deployments. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, EndpointType? endpointType = null, bool? includeInferenceEndpoints = null, string skip = null, string expand = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, endpointType, includeInferenceEndpoints, skip, expand); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointResourcePropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointResourcePropertiesBasicResourceArmPaginatedResult.DeserializeEndpointResourcePropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetModelsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateGetModelsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get available models under the endpoint resource. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetModelsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateGetModelsNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, endpointName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - EndpointModels value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointModels.DeserializeEndpointModels(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get available models under the endpoint resource. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetModelsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateGetModelsNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, endpointName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - EndpointModels value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointModels.DeserializeEndpointModels(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentContainersRestOperations.cs index 0509cbc13d5ea..3d750c1a85132 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentContainersRestOperations.cs @@ -32,7 +32,7 @@ public EnvironmentContainersRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentVersionsRestOperations.cs index 4a5b721fe16cb..04be5571e6286 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentVersionsRestOperations.cs @@ -32,7 +32,7 @@ public EnvironmentVersionsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesRestOperations.cs index cf7a5baef317d..92c50d85f52e1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesRestOperations.cs @@ -32,7 +32,7 @@ public FeaturesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetContainersRestOperations.cs index a3934ce5090a5..641b78d5942ca 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetContainersRestOperations.cs @@ -32,7 +32,7 @@ public FeaturesetContainersRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetVersionsRestOperations.cs index 8b592ad345354..e4967143d2e04 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturesetVersionsRestOperations.cs @@ -32,7 +32,7 @@ public FeaturesetVersionsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityContainersRestOperations.cs index 305be332776e1..f408fe7919c38 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityContainersRestOperations.cs @@ -32,7 +32,7 @@ public FeaturestoreEntityContainersRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityVersionsRestOperations.cs index 199128b1f32a9..fe1961c7bd816 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/FeaturestoreEntityVersionsRestOperations.cs @@ -32,7 +32,7 @@ public FeaturestoreEntityVersionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/JobsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/JobsRestOperations.cs index b56f1ee67a77e..348efcee55893 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/JobsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/JobsRestOperations.cs @@ -32,7 +32,7 @@ public JobsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkProvisionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkProvisionsRestOperations.cs index d389a0c83a172..1b4cd4263c3c5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkProvisionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkProvisionsRestOperations.cs @@ -31,7 +31,7 @@ public ManagedNetworkProvisionsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -81,7 +81,7 @@ internal HttpMessage CreateProvisionManagedNetworkRequest(string subscriptionId, /// Provisions the managed network of a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Managed Network Provisioning Options for a machine learning workspace. /// The cancellation token to use. /// , or is null. @@ -107,7 +107,7 @@ public async Task ProvisionManagedNetworkAsync(string subscriptionId, /// Provisions the managed network of a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Managed Network Provisioning Options for a machine learning workspace. /// The cancellation token to use. /// , or is null. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkSettingsRuleRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkSettingsRuleRestOperations.cs index 7aaa61bc59659..ffbc98a389360 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkSettingsRuleRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ManagedNetworkSettingsRuleRestOperations.cs @@ -32,7 +32,7 @@ public ManagedNetworkSettingsRuleRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,7 +75,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// Lists the managed network outbound rules for a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -104,7 +104,7 @@ public async Task> ListAsync(string subscriptio /// Lists the managed network outbound rules for a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -171,7 +171,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Deletes an outbound rule from the managed network of a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Name of the workspace managed network outbound rule. /// The cancellation token to use. /// , , or is null. @@ -199,7 +199,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Deletes an outbound rule from the managed network of a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Name of the workspace managed network outbound rule. /// The cancellation token to use. /// , , or is null. @@ -265,7 +265,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets an outbound rule from the managed network of a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Name of the workspace managed network outbound rule. /// The cancellation token to use. /// , , or is null. @@ -298,7 +298,7 @@ public async Task> GetAsync(strin /// Gets an outbound rule from the managed network of a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Name of the workspace managed network outbound rule. /// The cancellation token to use. /// , , or is null. @@ -373,7 +373,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// Creates or updates an outbound rule in the managed network of a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Name of the workspace managed network outbound rule. /// Outbound Rule to be created or updated in the managed network of a machine learning workspace. /// The cancellation token to use. @@ -402,7 +402,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// Creates or updates an outbound rule in the managed network of a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Name of the workspace managed network outbound rule. /// Outbound Rule to be created or updated in the managed network of a machine learning workspace. /// The cancellation token to use. @@ -454,7 +454,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -485,7 +485,7 @@ public async Task> ListNextPageAsync(string nex /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/MarketplaceSubscriptionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/MarketplaceSubscriptionsRestOperations.cs index c788de18a5075..675e7780ec393 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/MarketplaceSubscriptionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/MarketplaceSubscriptionsRestOperations.cs @@ -32,7 +32,7 @@ public MarketplaceSubscriptionsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelContainersRestOperations.cs index ef9a86e6da526..9e3d9ba623682 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelContainersRestOperations.cs @@ -32,7 +32,7 @@ public ModelContainersRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelVersionsRestOperations.cs index 3c988c369e69e..43f22dd291ce7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelVersionsRestOperations.cs @@ -32,7 +32,7 @@ public ModelVersionsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineDeploymentsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineDeploymentsRestOperations.cs index efc960363ce7b..3f8deff4034ac 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineDeploymentsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineDeploymentsRestOperations.cs @@ -32,7 +32,7 @@ public OnlineDeploymentsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineEndpointsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineEndpointsRestOperations.cs index 2032e2e15b54e..e6f3c51ea7a7b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineEndpointsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public OnlineEndpointsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 62d77cdeab566..2e995693b2abc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/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-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,10 +72,10 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// Called by end-users to get all PE connections. + /// List all the private endpoint connections associated with the workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -101,10 +101,10 @@ public async Task> } } - /// Called by end-users to get all PE connections. + /// List all the private endpoint connections associated with the workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -130,7 +130,7 @@ public Response List(string } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,11 +146,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -168,61 +168,73 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Called by end-users to delete a PE connection. + /// Gets the specified private endpoint connection associated with the workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// NRP Private Endpoint Connection Name. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + MachineLearningPrivateEndpointConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningPrivateEndpointConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Called by end-users to delete a PE connection. + /// Gets the specified private endpoint connection associated with the workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// NRP Private Endpoint Connection Name. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + MachineLearningPrivateEndpointConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MachineLearningPrivateEndpointConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -238,11 +250,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -256,26 +268,32 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Called by end-users to get a PE connection. + /// Update the state of specified private endpoint connection associated with the workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// NRP Private Endpoint Connection Name. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The private endpoint connection properties. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -286,29 +304,29 @@ public async Task> GetAsy value = MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MachineLearningPrivateEndpointConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Called by end-users to get a PE connection. + /// Update the state of specified private endpoint connection associated with the workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// NRP Private Endpoint Connection Name. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. + /// The private endpoint connection properties. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -319,14 +337,12 @@ public Response Get(string subscri value = MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MachineLearningPrivateEndpointConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -342,11 +358,11 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -360,81 +376,59 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// - /// Called by end-users to approve or reject a PE connection. - /// This method must validate and forward the call to NRP. - /// + /// Deletes the specified private endpoint connection associated with the workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// NRP Private Endpoint Connection Name. - /// PrivateEndpointConnection object. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MachineLearningPrivateEndpointConnectionData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// - /// Called by end-users to approve or reject a PE connection. - /// This method must validate and forward the call to NRP. - /// + /// Deletes the specified private endpoint connection associated with the workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// NRP Private Endpoint Connection Name. - /// PrivateEndpointConnection object. + /// Name of Azure Machine Learning workspace. + /// The name of the private endpoint connection associated with the workspace. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, MachineLearningPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, privateEndpointConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MachineLearningPrivateEndpointConnectionData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineLearningPrivateEndpointConnectionData.DeserializeMachineLearningPrivateEndpointConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index e3be97d200637..6f1675a5ecb0c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/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-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -72,16 +72,10 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// - /// Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. - /// Each "private link resource" is a connection endpoint (IP address) to the resource. - /// Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. - /// Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. - /// Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". - /// + /// Gets the private link resources that need to be created for a workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -107,16 +101,10 @@ public async Task> ListAs } } - /// - /// Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. - /// Each "private link resource" is a connection endpoint (IP address) to the resource. - /// Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. - /// Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. - /// Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". - /// + /// Gets the private link resources that need to be created for a workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/QuotasRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/QuotasRestOperations.cs index 3b84970373776..0b742113cdb1c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/QuotasRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/QuotasRestOperations.cs @@ -32,7 +32,7 @@ public QuotasRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RaiPoliciesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RaiPoliciesRestOperations.cs deleted file mode 100644 index 3fbdb27bde442..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RaiPoliciesRestOperations.cs +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - internal partial class RaiPoliciesRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of RaiPoliciesRestOperations. - /// 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 RaiPoliciesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/raiPolicies", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/raiPolicies", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List the specified Content Filters associated with the Azure OpenAI account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, endpointName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RaiPolicyPropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RaiPolicyPropertiesBasicResourceArmPaginatedResult.DeserializeRaiPolicyPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List the specified Content Filters associated with the Azure OpenAI account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, endpointName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RaiPolicyPropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RaiPolicyPropertiesBasicResourceArmPaginatedResult.DeserializeRaiPolicyPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// List the specified Content Filters associated with the Azure OpenAI account. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, endpointName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RaiPolicyPropertiesBasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RaiPolicyPropertiesBasicResourceArmPaginatedResult.DeserializeRaiPolicyPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// List the specified Content Filters associated with the Azure OpenAI account. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, endpointName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RaiPolicyPropertiesBasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RaiPolicyPropertiesBasicResourceArmPaginatedResult.DeserializeRaiPolicyPropertiesBasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RaiPolicyRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RaiPolicyRestOperations.cs deleted file mode 100644 index 2b32aab3386ee..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RaiPolicyRestOperations.cs +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - internal partial class RaiPolicyRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of RaiPolicyRestOperations. - /// 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 RaiPolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/raiPolicies/", false); - uri.AppendPath(raiPolicyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/raiPolicies/", false); - uri.AppendPath(raiPolicyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Deletes the specified Content Filters associated with the Azure OpenAI account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Name of the Rai Policy. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, raiPolicyName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes the specified Content Filters associated with the Azure OpenAI account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Name of the Rai Policy. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, raiPolicyName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/raiPolicies/", false); - uri.AppendPath(raiPolicyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/raiPolicies/", false); - uri.AppendPath(raiPolicyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the specified Content Filters associated with the Azure OpenAI account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Name of the Rai Policy. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, raiPolicyName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - RaiPolicyPropertiesBasicResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RaiPolicyPropertiesBasicResourceData.DeserializeRaiPolicyPropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RaiPolicyPropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the specified Content Filters associated with the Azure OpenAI account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Name of the Rai Policy. - /// The cancellation token to use. - /// , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, raiPolicyName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - RaiPolicyPropertiesBasicResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RaiPolicyPropertiesBasicResourceData.DeserializeRaiPolicyPropertiesBasicResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((RaiPolicyPropertiesBasicResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName, RaiPolicyPropertiesBasicResourceData data) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/raiPolicies/", false); - uri.AppendPath(raiPolicyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName, RaiPolicyPropertiesBasicResourceData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/endpoints/", false); - uri.AppendPath(endpointName, true); - uri.AppendPath("/raiPolicies/", false); - uri.AppendPath(raiPolicyName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update the state of specified Content Filters associated with the Azure OpenAI account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Name of the Rai Policy. - /// The to use. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public async Task CreateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName, RaiPolicyPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, raiPolicyName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update the state of specified Content Filters associated with the Azure OpenAI account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Name of the endpoint resource. - /// Name of the Rai Policy. - /// The to use. - /// The cancellation token to use. - /// , , , , or is null. - /// , , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName, RaiPolicyPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, endpointName, raiPolicyName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistriesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistriesRestOperations.cs index 74e28be3d5d39..95747240e26c9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistriesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistriesRestOperations.cs @@ -32,7 +32,7 @@ public RegistriesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeContainersRestOperations.cs index c2b468dde977b..c6bcbd9f560e9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeContainersRestOperations.cs @@ -32,7 +32,7 @@ public RegistryCodeContainersRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeVersionsRestOperations.cs index d2496481ed04f..216962b755845 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryCodeVersionsRestOperations.cs @@ -32,7 +32,7 @@ public RegistryCodeVersionsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentContainersRestOperations.cs index e4248c3771b89..8ea1ade9e26a6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentContainersRestOperations.cs @@ -32,7 +32,7 @@ public RegistryComponentContainersRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentVersionsRestOperations.cs index 98303bbecb47e..66af309b30266 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryComponentVersionsRestOperations.cs @@ -32,7 +32,7 @@ public RegistryComponentVersionsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataContainersRestOperations.cs index 992cbcbf1e01f..e744ebe86ba43 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataContainersRestOperations.cs @@ -32,7 +32,7 @@ public RegistryDataContainersRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataReferencesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataReferencesRestOperations.cs index 2ad243eb61c67..f666e9b470554 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataReferencesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataReferencesRestOperations.cs @@ -32,7 +32,7 @@ public RegistryDataReferencesRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataVersionsRestOperations.cs index a27b998e9bde2..c01d05f88a74b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryDataVersionsRestOperations.cs @@ -32,7 +32,7 @@ public RegistryDataVersionsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentContainersRestOperations.cs index 98e0095504bdc..a3e599fc83aeb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentContainersRestOperations.cs @@ -32,7 +32,7 @@ public RegistryEnvironmentContainersRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentVersionsRestOperations.cs index c032646c5d459..19a383ed1819f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryEnvironmentVersionsRestOperations.cs @@ -32,7 +32,7 @@ public RegistryEnvironmentVersionsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelContainersRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelContainersRestOperations.cs index 2478e84d6ef78..bed95bd3956f0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelContainersRestOperations.cs @@ -32,7 +32,7 @@ public RegistryModelContainersRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelVersionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelVersionsRestOperations.cs index fa93048ebed83..0a36e44a451b1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/RegistryModelVersionsRestOperations.cs @@ -32,7 +32,7 @@ public RegistryModelVersionsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/SchedulesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/SchedulesRestOperations.cs index 14a013fc6bacc..d74ed700ffb87 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/SchedulesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/SchedulesRestOperations.cs @@ -32,7 +32,7 @@ public SchedulesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ServerlessEndpointsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ServerlessEndpointsRestOperations.cs index 81413ded766a9..880f018774449 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ServerlessEndpointsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ServerlessEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public ServerlessEndpointsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/UsagesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/UsagesRestOperations.cs index 9e87eb46a663c..8066fa7fc95e8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/UsagesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/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-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs index 003f864f03c22..2e54d4f9d7968 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/VirtualMachineSizesRestOperations.cs @@ -32,7 +32,7 @@ public VirtualMachineSizesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceConnectionsRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceConnectionsRestOperations.cs index a10bb2895787a..1bb3d0a9d1c9d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceConnectionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceConnectionsRestOperations.cs @@ -32,135 +32,11 @@ public WorkspaceConnectionsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string target, string category, bool? includeAll) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections", false); - if (target != null) - { - uri.AppendQuery("target", target, true); - } - if (category != null) - { - uri.AppendQuery("category", category, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - if (includeAll != null) - { - uri.AppendQuery("includeAll", includeAll.Value, true); - } - return uri; - } - - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string target, string category, bool? includeAll) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections", false); - if (target != null) - { - uri.AppendQuery("target", target, true); - } - if (category != null) - { - uri.AppendQuery("category", category, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - if (includeAll != null) - { - uri.AppendQuery("includeAll", includeAll.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all the available machine learning workspaces connections under the specified workspace. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Target of the workspace connection. - /// Category of the workspace connection. - /// query parameter that indicates if get connection call should return both connections and datastores. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string target = null, string category = null, bool? includeAll = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, target, category, includeAll); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.DeserializeWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all the available machine learning workspaces connections under the specified workspace. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Target of the workspace connection. - /// Category of the workspace connection. - /// query parameter that indicates if get connection call should return both connections and datastores. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string target = null, string category = null, bool? includeAll = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, target, category, includeAll); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.DeserializeWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -176,11 +52,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -194,59 +70,73 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Delete machine learning workspaces connections by name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. + /// The object for creating or updating a new workspace connection. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + MachineLearningWorkspaceConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Delete machine learning workspaces connections by name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. + /// The object for creating or updating a new workspace connection. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) + public Response Create(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + MachineLearningWorkspaceConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -290,10 +180,9 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Lists machine learning workspaces connections by name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The cancellation token to use. /// , , or is null. @@ -323,10 +212,9 @@ public async Task> GetAsync(str } } - /// Lists machine learning workspaces connections by name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The cancellation token to use. /// , , or is null. @@ -356,7 +244,7 @@ public Response Get(string subscriptionI } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionPatch patch) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -372,11 +260,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -390,81 +278,63 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Update machine learning workspaces connections under the specified workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. - /// Parameters for workspace connection update. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionPatch patch, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MachineLearningWorkspaceConnectionData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Update machine learning workspaces connections under the specified workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. - /// Parameters for workspace connection update. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionPatch patch, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, workspaceName, connectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MachineLearningWorkspaceConnectionData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string target, string category) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -474,17 +344,24 @@ internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); + uri.AppendPath("/connections", false); + if (target != null) + { + uri.AppendQuery("target", target, true); + } + if (category != null) + { + uri.AppendQuery("category", category, true); + } uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string target, string category) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -493,45 +370,45 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); + uri.AppendPath("/connections", false); + if (target != null) + { + uri.AppendQuery("target", target, true); + } + if (category != null) + { + uri.AppendQuery("category", category, true); + } uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Create or update machine learning workspaces connections under the specified workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The object for creating or updating a new workspace connection. + /// Name of Azure Machine Learning workspace. + /// Target of the workspace connection. + /// Category of the workspace connection. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string target = null, string category = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, data); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, target, category); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceConnectionData value = default; + WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); + value = WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.DeserializeWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -539,32 +416,29 @@ public async Task> CreateAsync( } } - /// Create or update machine learning workspaces connections under the specified workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// The object for creating or updating a new workspace connection. + /// Name of Azure Machine Learning workspace. + /// Target of the workspace connection. + /// Category of the workspace connection. /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Create(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string target = null, string category = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, data); + using var message = CreateListRequest(subscriptionId, resourceGroupName, workspaceName, target, category); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceConnectionData value = default; + WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); + value = WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.DeserializeWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -615,7 +489,7 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso /// List all the secrets of a machine learning workspaces connections. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The cancellation token to use. /// , , or is null. @@ -646,7 +520,7 @@ public async Task> ListSecretsA /// List all the secrets of a machine learning workspaces connections. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Friendly name of the workspace connection. /// The cancellation token to use. /// , , or is null. @@ -674,108 +548,7 @@ public Response ListSecrets(string subsc } } - internal RequestUriBuilder CreateTestConnectionRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/testconnection", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateTestConnectionRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/testconnection", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - if (data != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; - } - _userAgent.Apply(message); - return message; - } - - /// Test machine learning workspaces connections under the specified workspace. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Workspace Connection object. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task TestConnectionAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateTestConnectionRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Test machine learning workspaces connections under the specified workspace. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// Friendly name of the workspace connection. - /// Workspace Connection object. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response TestConnection(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var message = CreateTestConnectionRequest(subscriptionId, resourceGroupName, workspaceName, connectionName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string target, string category, bool? includeAll) + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string target, string category) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -783,7 +556,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string target, string category, bool? includeAll) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string target, string category) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -797,25 +570,23 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// Lists all the available machine learning workspaces connections under the specified workspace. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Target of the workspace connection. /// Category of the workspace connection. - /// query parameter that indicates if get connection call should return both connections and datastores. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string target = null, string category = null, bool? includeAll = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string target = null, string category = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, target, category, includeAll); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, target, category); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -831,25 +602,23 @@ public async Task Lists all the available machine learning workspaces connections under the specified workspace. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Target of the workspace connection. /// Category of the workspace connection. - /// query parameter that indicates if get connection call should return both connections and datastores. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string target = null, string category = null, bool? includeAll = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string target = null, string category = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, target, category, includeAll); + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, workspaceName, target, category); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceFeaturesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceFeaturesRestOperations.cs index 254f7a0408cba..12175ae6fdab5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceFeaturesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceFeaturesRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceFeaturesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspacesRestOperations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspacesRestOperations.cs index ae26b9fc03302..a78fdbdf71fa9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspacesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspacesRestOperations.cs @@ -32,34 +32,25 @@ public WorkspacesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-07-01-preview"; + _apiVersion = apiVersion ?? "2024-04-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId, string kind, string skip, string aiCapabilities) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); uri.AppendQuery("api-version", _apiVersion, true); - if (kind != null) - { - uri.AppendQuery("kind", kind, true); - } - if (skip != null) - { - uri.AppendQuery("$skip", skip, true); - } - if (aiCapabilities != null) - { - uri.AppendQuery("aiCapabilities", aiCapabilities, true); - } return uri; } - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string kind, string skip, string aiCapabilities) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -68,83 +59,80 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, stri uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); uri.AppendQuery("api-version", _apiVersion, true); - if (kind != null) - { - uri.AppendQuery("kind", kind, true); - } - if (skip != null) - { - uri.AppendQuery("$skip", skip, true); - } - if (aiCapabilities != null) - { - uri.AppendQuery("aiCapabilities", aiCapabilities, true); - } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Lists all the available machine learning workspaces under the specified subscription. + /// Gets the properties of the specified machine learning workspace. /// The ID of the target subscription. - /// Kind of workspace. - /// Continuation token for pagination. - /// The to use. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListBySubscriptionRequest(subscriptionId, kind, skip, aiCapabilities); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WorkspaceListResult value = default; + MachineLearningWorkspaceData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); + value = MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MachineLearningWorkspaceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Lists all the available machine learning workspaces under the specified subscription. + /// Gets the properties of the specified machine learning workspace. /// The ID of the target subscription. - /// Kind of workspace. - /// Continuation token for pagination. - /// The to use. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListBySubscriptionRequest(subscriptionId, kind, skip, aiCapabilities); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WorkspaceListResult value = default; + MachineLearningWorkspaceData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); + value = MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MachineLearningWorkspaceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName, string kind, string skip, string aiCapabilities) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -152,109 +140,85 @@ internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscripti uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); uri.AppendQuery("api-version", _apiVersion, true); - if (kind != null) - { - uri.AppendQuery("kind", kind, true); - } - if (skip != null) - { - uri.AppendQuery("$skip", skip, true); - } - if (aiCapabilities != null) - { - uri.AppendQuery("aiCapabilities", aiCapabilities, true); - } return uri; } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName, string kind, string skip, string aiCapabilities) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; 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.MachineLearningServices/workspaces", false); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); + uri.AppendPath(workspaceName, true); uri.AppendQuery("api-version", _apiVersion, true); - if (kind != null) - { - uri.AppendQuery("kind", kind, true); - } - if (skip != null) - { - uri.AppendQuery("$skip", skip, true); - } - if (aiCapabilities != null) - { - uri.AppendQuery("aiCapabilities", aiCapabilities, true); - } request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Lists all the available machine learning workspaces under the specified resource group. + /// Creates or updates a workspace with the specified parameters. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Kind of workspace. - /// Continuation token for pagination. - /// The to use. + /// Name of Azure Machine Learning workspace. + /// The parameters for creating or updating a machine learning workspace. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, kind, skip, aiCapabilities); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - WorkspaceListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Lists all the available machine learning workspaces under the specified resource group. + /// Creates or updates a workspace with the specified parameters. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Kind of workspace. - /// Continuation token for pagination. - /// The to use. + /// Name of Azure Machine Learning workspace. + /// The parameters for creating or updating a machine learning workspace. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, kind, skip, aiCapabilities); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - WorkspaceListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -305,7 +269,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Deletes a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Flag to indicate delete is a purge request. /// The cancellation token to use. /// , or is null. @@ -332,7 +296,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Deletes a machine learning workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// Flag to indicate delete is a purge request. /// The cancellation token to use. /// , or is null. @@ -356,7 +320,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string w } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspacePatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -370,11 +334,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspacePatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -386,73 +350,165 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets the properties of the specified machine learning workspace. + /// Updates a machine learning workspace with the specified parameters. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. + /// The parameters for updating a machine learning workspace. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspacePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates a machine learning workspace with the specified parameters. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Name of Azure Machine Learning workspace. + /// The parameters for updating a machine learning workspace. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspacePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName, string skip) + { + 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.MachineLearningServices/workspaces", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName, string skip) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all the available machine learning workspaces under the specified resource group. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// Continuation token for pagination. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, skip); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceData value = default; + WorkspaceListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(document.RootElement); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MachineLearningWorkspaceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets the properties of the specified machine learning workspace. + /// Lists all the available machine learning workspaces under the specified resource group. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Continuation token for pagination. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, skip); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceData value = default; + WorkspaceListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineLearningWorkspaceData.DeserializeMachineLearningWorkspaceData(document.RootElement); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((MachineLearningWorkspaceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspacePatch patch) + internal RequestUriBuilder CreateDiagnoseRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceDiagnoseContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -462,15 +518,16 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); + uri.AppendPath("/diagnose", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspacePatch patch) + internal HttpMessage CreateDiagnoseRequest(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceDiagnoseContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -479,33 +536,36 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); + uri.AppendPath("/diagnose", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; + if (content != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + } _userAgent.Apply(message); return message; } - /// Updates a machine learning workspace with the specified parameters. + /// Diagnose workspace setup issue. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// The parameters for updating a machine learning workspace. + /// Name of Azure Machine Learning workspace. + /// The parameter of diagnosing workspace health. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspacePatch patch, CancellationToken cancellationToken = default) + public async Task DiagnoseAsync(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceDiagnoseContent content = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, patch); + using var message = CreateDiagnoseRequest(subscriptionId, resourceGroupName, workspaceName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -517,22 +577,21 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } } - /// Updates a machine learning workspace with the specified parameters. + /// Diagnose workspace setup issue. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// The parameters for updating a machine learning workspace. + /// Name of Azure Machine Learning workspace. + /// The parameter of diagnosing workspace health. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspacePatch patch, CancellationToken cancellationToken = default) + public Response Diagnose(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceDiagnoseContent content = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, workspaceName, patch); + using var message = CreateDiagnoseRequest(subscriptionId, resourceGroupName, workspaceName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -544,7 +603,7 @@ public Response Update(string subscriptionId, string resourceGroupName, string w } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data) + internal RequestUriBuilder CreateListKeysRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -554,15 +613,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); + uri.AppendPath("/listKeys", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data) + internal HttpMessage CreateListKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -571,72 +631,73 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); + uri.AppendPath("/listKeys", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Creates or updates a workspace with the specified parameters. + /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// The parameters for creating or updating a machine learning workspace. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data, CancellationToken cancellationToken = default) + public async Task> ListKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, data); + using var message = CreateListKeysRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MachineLearningWorkspaceGetKeysResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = MachineLearningWorkspaceGetKeysResult.DeserializeMachineLearningWorkspaceGetKeysResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Creates or updates a workspace with the specified parameters. + /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// The parameters for creating or updating a machine learning workspace. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceData data, CancellationToken cancellationToken = default) + public Response ListKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, workspaceName, data); + using var message = CreateListKeysRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + MachineLearningWorkspaceGetKeysResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = MachineLearningWorkspaceGetKeysResult.DeserializeMachineLearningWorkspaceGetKeysResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDiagnoseRequestUri(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceDiagnoseContent content) + internal RequestUriBuilder CreateResyncKeysRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -646,12 +707,12 @@ internal RequestUriBuilder CreateDiagnoseRequestUri(string subscriptionId, strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/diagnose", false); + uri.AppendPath("/resyncKeys", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDiagnoseRequest(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceDiagnoseContent content) + internal HttpMessage CreateResyncKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -664,36 +725,28 @@ internal HttpMessage CreateDiagnoseRequest(string subscriptionId, string resourc uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/diagnose", false); + uri.AppendPath("/resyncKeys", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - if (content != null) - { - request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; - } _userAgent.Apply(message); return message; } - /// Diagnose workspace setup issue. + /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// The parameter of diagnosing workspace health. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task DiagnoseAsync(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceDiagnoseContent content = null, CancellationToken cancellationToken = default) + public async Task ResyncKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateDiagnoseRequest(subscriptionId, resourceGroupName, workspaceName, content); + using var message = CreateResyncKeysRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -705,21 +758,20 @@ public async Task DiagnoseAsync(string subscriptionId, string resource } } - /// Diagnose workspace setup issue. + /// Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// The parameter of diagnosing workspace health. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Diagnose(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceDiagnoseContent content = null, CancellationToken cancellationToken = default) + public Response ResyncKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateDiagnoseRequest(subscriptionId, resourceGroupName, workspaceName, content); + using var message = CreateResyncKeysRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -731,64 +783,61 @@ public Response Diagnose(string subscriptionId, string resourceGroupName, string } } - internal RequestUriBuilder CreateListKeysRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId, string skip) { 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/listKeys", false); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } return uri; } - internal HttpMessage CreateListKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, string skip) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/listKeys", false); + uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces", false); uri.AppendQuery("api-version", _apiVersion, true); + if (skip != null) + { + uri.AppendQuery("$skip", skip, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + /// Lists all the available machine learning workspaces under the specified subscription. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Continuation token for pagination. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, string skip = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListKeysRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListBySubscriptionRequest(subscriptionId, skip); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceGetKeysResult value = default; + WorkspaceListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineLearningWorkspaceGetKeysResult.DeserializeMachineLearningWorkspaceGetKeysResult(document.RootElement); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -796,28 +845,25 @@ public async Task> ListKeysAsync } } - /// Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry. + /// Lists all the available machine learning workspaces under the specified subscription. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Continuation token for pagination. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, string skip = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListKeysRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListBySubscriptionRequest(subscriptionId, skip); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MachineLearningWorkspaceGetKeysResult value = default; + WorkspaceListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineLearningWorkspaceGetKeysResult.DeserializeMachineLearningWorkspaceGetKeysResult(document.RootElement); + value = WorkspaceListResult.DeserializeWorkspaceListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -861,10 +907,10 @@ internal HttpMessage CreateListNotebookAccessTokenRequest(string subscriptionId, return message; } - /// Get Azure Machine Learning Workspace notebook access token. + /// return notebook access token and refresh token. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -890,10 +936,10 @@ public async Task> L } } - /// Get Azure Machine Learning Workspace notebook access token. + /// return notebook access token and refresh token. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -919,7 +965,7 @@ public Response ListNotebookA } } - internal RequestUriBuilder CreateListNotebookKeysRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) + internal RequestUriBuilder CreatePrepareNotebookRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -929,12 +975,12 @@ internal RequestUriBuilder CreateListNotebookKeysRequestUri(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/listNotebookKeys", false); + uri.AppendPath("/prepareNotebook", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListNotebookKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreatePrepareNotebookRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -947,7 +993,7 @@ internal HttpMessage CreateListNotebookKeysRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/listNotebookKeys", false); + uri.AppendPath("/prepareNotebook", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -955,59 +1001,51 @@ internal HttpMessage CreateListNotebookKeysRequest(string subscriptionId, string return message; } - /// Lists keys of Azure Machine Learning Workspaces notebook. + /// Prepare a notebook. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNotebookKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task PrepareNotebookAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListNotebookKeysRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreatePrepareNotebookRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MachineLearningWorkspaceGetNotebookKeysResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MachineLearningWorkspaceGetNotebookKeysResult.DeserializeMachineLearningWorkspaceGetNotebookKeysResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Lists keys of Azure Machine Learning Workspaces notebook. + /// Prepare a notebook. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNotebookKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response PrepareNotebook(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListNotebookKeysRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreatePrepareNotebookRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MachineLearningWorkspaceGetNotebookKeysResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MachineLearningWorkspaceGetNotebookKeysResult.DeserializeMachineLearningWorkspaceGetNotebookKeysResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -1049,10 +1087,10 @@ internal HttpMessage CreateListStorageAccountKeysRequest(string subscriptionId, return message; } - /// Lists keys of Azure Machine Learning Workspace's storage account. + /// List storage account keys of a workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -1078,10 +1116,10 @@ public async Task> } } - /// Lists keys of Azure Machine Learning Workspace's storage account. + /// List storage account keys of a workspace. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -1107,7 +1145,7 @@ public Response ListStorage } } - internal RequestUriBuilder CreateListOutboundNetworkDependenciesEndpointsRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) + internal RequestUriBuilder CreateListNotebookKeysRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1117,16 +1155,16 @@ internal RequestUriBuilder CreateListOutboundNetworkDependenciesEndpointsRequest uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); + uri.AppendPath("/listNotebookKeys", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateListNotebookKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1135,7 +1173,7 @@ internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); + uri.AppendPath("/listNotebookKeys", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1143,28 +1181,28 @@ internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(strin return message; } - /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + /// List keys of a notebook. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListOutboundNetworkDependenciesEndpointsAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task> ListNotebookKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListNotebookKeysRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ExternalFqdnResponse value = default; + MachineLearningWorkspaceGetNotebookKeysResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ExternalFqdnResponse.DeserializeExternalFqdnResponse(document.RootElement); + value = MachineLearningWorkspaceGetNotebookKeysResult.DeserializeMachineLearningWorkspaceGetNotebookKeysResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1172,28 +1210,28 @@ public async Task> ListOutboundNetworkDependencie } } - /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + /// List keys of a notebook. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response ListNotebookKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListNotebookKeysRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ExternalFqdnResponse value = default; + MachineLearningWorkspaceGetNotebookKeysResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ExternalFqdnResponse.DeserializeExternalFqdnResponse(document.RootElement); + value = MachineLearningWorkspaceGetNotebookKeysResult.DeserializeMachineLearningWorkspaceGetNotebookKeysResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1201,93 +1239,7 @@ public Response ListOutboundNetworkDependenciesEndpoints(s } } - internal RequestUriBuilder CreatePrepareNotebookRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/prepareNotebook", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreatePrepareNotebookRequest(string subscriptionId, string resourceGroupName, string workspaceName) - { - 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.MachineLearningServices/workspaces/", false); - uri.AppendPath(workspaceName, true); - uri.AppendPath("/prepareNotebook", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Prepare Azure Machine Learning Workspace's notebook resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task PrepareNotebookAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreatePrepareNotebookRequest(subscriptionId, resourceGroupName, workspaceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Prepare Azure Machine Learning Workspace's notebook resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response PrepareNotebook(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - - using var message = CreatePrepareNotebookRequest(subscriptionId, resourceGroupName, workspaceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateResyncKeysRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) + internal RequestUriBuilder CreateListOutboundNetworkDependenciesEndpointsRequestUri(string subscriptionId, string resourceGroupName, string workspaceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1297,16 +1249,16 @@ internal RequestUriBuilder CreateResyncKeysRequestUri(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/resyncKeys", false); + uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateResyncKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName) + internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(string subscriptionId, string resourceGroupName, string workspaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1315,7 +1267,7 @@ internal HttpMessage CreateResyncKeysRequest(string subscriptionId, string resou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.MachineLearningServices/workspaces/", false); uri.AppendPath(workspaceName, true); - uri.AppendPath("/resyncKeys", false); + uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1323,57 +1275,65 @@ internal HttpMessage CreateResyncKeysRequest(string subscriptionId, string resou return message; } - /// Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and password for container registry. + /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task ResyncKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task> ListOutboundNetworkDependenciesEndpointsAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateResyncKeysRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, workspaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ExternalFqdnResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ExternalFqdnResponse.DeserializeExternalFqdnResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and password for container registry. + /// Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Azure Machine Learning Workspace Name. + /// Name of Azure Machine Learning workspace. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ResyncKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response ListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(workspaceName, nameof(workspaceName)); - using var message = CreateResyncKeysRequest(subscriptionId, resourceGroupName, workspaceName); + using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, workspaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ExternalFqdnResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ExternalFqdnResponse.DeserializeExternalFqdnResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, string kind, string skip, string aiCapabilities) + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string skip) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1381,7 +1341,7 @@ internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nex return uri; } - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string kind, string skip, string aiCapabilities) + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string skip) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1395,21 +1355,21 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st return message; } - /// Lists all the available machine learning workspaces under the specified subscription. + /// Lists all the available machine learning workspaces under the specified resource group. /// The URL to the next page of results. /// The ID of the target subscription. - /// Kind of workspace. + /// The name of the resource group. The name is case insensitive. /// Continuation token for pagination. - /// The to use. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, kind, skip, aiCapabilities); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, skip); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1425,21 +1385,21 @@ public async Task> ListBySubscriptionNextPageAsync } } - /// Lists all the available machine learning workspaces under the specified subscription. + /// Lists all the available machine learning workspaces under the specified resource group. /// The URL to the next page of results. /// The ID of the target subscription. - /// Kind of workspace. + /// The name of the resource group. The name is case insensitive. /// Continuation token for pagination. - /// The to use. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, string skip = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, kind, skip, aiCapabilities); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, skip); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1455,7 +1415,7 @@ public Response ListBySubscriptionNextPage(string nextLink, } } - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string kind, string skip, string aiCapabilities) + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId, string skip) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1463,7 +1423,7 @@ internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string kind, string skip, string aiCapabilities) + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, string skip) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1477,23 +1437,19 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// Lists all the available machine learning workspaces under the specified resource group. + /// Lists all the available machine learning workspaces under the specified subscription. /// The URL to the next page of results. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Kind of workspace. /// Continuation token for pagination. - /// The to use. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, string skip = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, kind, skip, aiCapabilities); + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, skip); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1509,23 +1465,19 @@ public async Task> ListByResourceGroupNextPageAsyn } } - /// Lists all the available machine learning workspaces under the specified resource group. + /// Lists all the available machine learning workspaces under the specified subscription. /// The URL to the next page of results. /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Kind of workspace. /// Continuation token for pagination. - /// The to use. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, string kind = null, string skip = null, string aiCapabilities = null, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, string skip = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, kind, skip, aiCapabilities); + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, skip); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointCollection.cs index 5a3ba1b9c8e3b..01f25c02dda0b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string name, Cancellatio /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(string skip /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string skip = null, C /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string name, CancellationToken cancellation /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointData.Serialization.cs index 444cfb0c53f8c..1d716b1170d70 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointData.Serialization.cs @@ -28,19 +28,19 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader } writer.WriteStartObject(); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; JsonSerializer.Serialize(writer, Identity, serializeOptions); } - if (Optional.IsDefined(Kind)) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind); - } - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); if (Optional.IsDefined(Sku)) { writer.WritePropertyName("sku"u8); @@ -117,9 +117,9 @@ internal static ServerlessEndpointData DeserializeServerlessEndpointData(JsonEle { return null; } - ManagedServiceIdentity identity = default; - string kind = default; ServerlessEndpointProperties properties = default; + string kind = default; + ManagedServiceIdentity identity = default; MachineLearningSku sku = default; IDictionary tags = default; AzureLocation location = default; @@ -131,14 +131,9 @@ internal static ServerlessEndpointData DeserializeServerlessEndpointData(JsonEle Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) + if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + properties = ServerlessEndpointProperties.DeserializeServerlessEndpointProperties(property.Value, options); continue; } if (property.NameEquals("kind"u8)) @@ -146,9 +141,14 @@ internal static ServerlessEndpointData DeserializeServerlessEndpointData(JsonEle kind = property.Value.GetString(); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("identity"u8)) { - properties = ServerlessEndpointProperties.DeserializeServerlessEndpointProperties(property.Value, options); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); continue; } if (property.NameEquals("sku"u8)) @@ -216,9 +216,9 @@ internal static ServerlessEndpointData DeserializeServerlessEndpointData(JsonEle systemData, tags ?? new ChangeTrackingDictionary(), location, - identity, - kind, properties, + kind, + identity, sku, serializedAdditionalRawData); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointData.cs index 28072f92ba5d0..e7184f76c4d3a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointData.cs @@ -66,16 +66,16 @@ public ServerlessEndpointData(AzureLocation location, ServerlessEndpointProperti /// The systemData. /// The tags. /// The location. - /// Managed service identity (system assigned and/or user assigned identities). - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. /// [Required] Additional attributes of the entity. + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Managed service identity (system assigned and/or user assigned identities). /// Sku details required for ARM contract for Autoscaling. /// Keeps track of any properties unknown to the library. - internal ServerlessEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, ServerlessEndpointProperties properties, MachineLearningSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ServerlessEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ServerlessEndpointProperties properties, string kind, ManagedServiceIdentity identity, MachineLearningSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Identity = identity; - Kind = kind; Properties = properties; + Kind = kind; + Identity = identity; Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -85,12 +85,12 @@ internal ServerlessEndpointData() { } - /// Managed service identity (system assigned and/or user assigned identities). - public ManagedServiceIdentity Identity { get; set; } - /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. - public string Kind { get; set; } /// [Required] Additional attributes of the entity. public ServerlessEndpointProperties Properties { get; set; } + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + public string Kind { get; set; } + /// Managed service identity (system assigned and/or user assigned identities). + public ManagedServiceIdentity Identity { get; set; } /// Sku details required for ARM contract for Autoscaling. public MachineLearningSku Sku { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointResource.cs index 0587ec53be670..076729e223449 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ServerlessEndpointResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual async Task> GetKeysAsyn /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -435,7 +435,7 @@ public virtual Response GetKeys(CancellationTok /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -481,7 +481,7 @@ public virtual async Task> Regener /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -527,7 +527,7 @@ public virtual ArmOperation RegenerateKeys(Wait /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -589,7 +589,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -708,7 +708,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -765,7 +765,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource @@ -825,7 +825,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2024-07-01-preview + /// 2024-04-01 /// /// /// Resource diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionDeploymentCollection.cs deleted file mode 100644 index a57bf264faee3..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionDeploymentCollection.cs +++ /dev/null @@ -1,493 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkspaceConnectionDeployments method from an instance of . - /// - public partial class WorkspaceConnectionDeploymentCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _workspaceConnectionDeploymentConnectionClientDiagnostics; - private readonly ConnectionRestOperations _workspaceConnectionDeploymentConnectionRestClient; - - /// Initializes a new instance of the class for mocking. - protected WorkspaceConnectionDeploymentCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal WorkspaceConnectionDeploymentCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _workspaceConnectionDeploymentConnectionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", WorkspaceConnectionDeploymentResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(WorkspaceConnectionDeploymentResource.ResourceType, out string workspaceConnectionDeploymentConnectionApiVersion); - _workspaceConnectionDeploymentConnectionRestClient = new ConnectionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceConnectionDeploymentConnectionApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != MachineLearningWorkspaceConnectionResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningWorkspaceConnectionResource.ResourceType), nameof(id)); - } - - /// - /// Create or update Azure OpenAI connection deployment resource with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_CreateOrUpdateDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the deployment resource. - /// deployment object. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string deploymentName, EndpointDeploymentResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _workspaceConnectionDeploymentConnectionRestClient.CreateOrUpdateDeploymentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new WorkspaceConnectionDeploymentOperationSource(Client), _workspaceConnectionDeploymentConnectionClientDiagnostics, Pipeline, _workspaceConnectionDeploymentConnectionRestClient.CreateCreateOrUpdateDeploymentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update Azure OpenAI connection deployment resource with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_CreateOrUpdateDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the deployment resource. - /// deployment object. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string deploymentName, EndpointDeploymentResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _workspaceConnectionDeploymentConnectionRestClient.CreateOrUpdateDeployment(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new WorkspaceConnectionDeploymentOperationSource(Client), _workspaceConnectionDeploymentConnectionClientDiagnostics, Pipeline, _workspaceConnectionDeploymentConnectionRestClient.CreateCreateOrUpdateDeploymentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get deployments under the Azure OpenAI connection by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_GetDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentCollection.Get"); - scope.Start(); - try - { - var response = await _workspaceConnectionDeploymentConnectionRestClient.GetDeploymentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get deployments under the Azure OpenAI connection by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_GetDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentCollection.Get"); - scope.Start(); - try - { - var response = _workspaceConnectionDeploymentConnectionRestClient.GetDeployment(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get all the deployments under the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments - /// - /// - /// Operation Id - /// Connection_ListDeployments - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceConnectionDeploymentConnectionRestClient.CreateListDeploymentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceConnectionDeploymentConnectionRestClient.CreateListDeploymentsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkspaceConnectionDeploymentResource(Client, EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(e)), _workspaceConnectionDeploymentConnectionClientDiagnostics, Pipeline, "WorkspaceConnectionDeploymentCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Get all the deployments under the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments - /// - /// - /// Operation Id - /// Connection_ListDeployments - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceConnectionDeploymentConnectionRestClient.CreateListDeploymentsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceConnectionDeploymentConnectionRestClient.CreateListDeploymentsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkspaceConnectionDeploymentResource(Client, EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(e)), _workspaceConnectionDeploymentConnectionClientDiagnostics, Pipeline, "WorkspaceConnectionDeploymentCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_GetDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentCollection.Exists"); - scope.Start(); - try - { - var response = await _workspaceConnectionDeploymentConnectionRestClient.GetDeploymentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_GetDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentCollection.Exists"); - scope.Start(); - try - { - var response = _workspaceConnectionDeploymentConnectionRestClient.GetDeployment(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_GetDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _workspaceConnectionDeploymentConnectionRestClient.GetDeploymentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_GetDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentCollection.GetIfExists"); - scope.Start(); - try - { - var response = _workspaceConnectionDeploymentConnectionRestClient.GetDeployment(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionDeploymentResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionDeploymentResource.Serialization.cs deleted file mode 100644 index eb8d86503665f..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionDeploymentResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class WorkspaceConnectionDeploymentResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - EndpointDeploymentResourcePropertiesBasicResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - EndpointDeploymentResourcePropertiesBasicResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionDeploymentResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionDeploymentResource.cs deleted file mode 100644 index 3857dcd15e80b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionDeploymentResource.cs +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a WorkspaceConnectionDeployment along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetWorkspaceConnectionDeploymentResource method. - /// Otherwise you can get one from its parent resource using the GetWorkspaceConnectionDeployment method. - /// - public partial class WorkspaceConnectionDeploymentResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The workspaceName. - /// The connectionName. - /// The deploymentName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string deploymentName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _workspaceConnectionDeploymentConnectionClientDiagnostics; - private readonly ConnectionRestOperations _workspaceConnectionDeploymentConnectionRestClient; - private readonly EndpointDeploymentResourcePropertiesBasicResourceData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/connections/deployments"; - - /// Initializes a new instance of the class for mocking. - protected WorkspaceConnectionDeploymentResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal WorkspaceConnectionDeploymentResource(ArmClient client, EndpointDeploymentResourcePropertiesBasicResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal WorkspaceConnectionDeploymentResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _workspaceConnectionDeploymentConnectionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string workspaceConnectionDeploymentConnectionApiVersion); - _workspaceConnectionDeploymentConnectionRestClient = new ConnectionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceConnectionDeploymentConnectionApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual EndpointDeploymentResourcePropertiesBasicResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Get deployments under the Azure OpenAI connection by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_GetDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentResource.Get"); - scope.Start(); - try - { - var response = await _workspaceConnectionDeploymentConnectionRestClient.GetDeploymentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get deployments under the Azure OpenAI connection by name. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_GetDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentResource.Get"); - scope.Start(); - try - { - var response = _workspaceConnectionDeploymentConnectionRestClient.GetDeployment(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete Azure OpenAI connection deployment resource by name - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_DeleteDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentResource.Delete"); - scope.Start(); - try - { - var response = await _workspaceConnectionDeploymentConnectionRestClient.DeleteDeploymentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_workspaceConnectionDeploymentConnectionClientDiagnostics, Pipeline, _workspaceConnectionDeploymentConnectionRestClient.CreateDeleteDeploymentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete Azure OpenAI connection deployment resource by name - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_DeleteDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentResource.Delete"); - scope.Start(); - try - { - var response = _workspaceConnectionDeploymentConnectionRestClient.DeleteDeployment(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_workspaceConnectionDeploymentConnectionClientDiagnostics, Pipeline, _workspaceConnectionDeploymentConnectionRestClient.CreateDeleteDeploymentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update Azure OpenAI connection deployment resource with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_CreateOrUpdateDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// deployment object. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, EndpointDeploymentResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentResource.Update"); - scope.Start(); - try - { - var response = await _workspaceConnectionDeploymentConnectionRestClient.CreateOrUpdateDeploymentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new WorkspaceConnectionDeploymentOperationSource(Client), _workspaceConnectionDeploymentConnectionClientDiagnostics, Pipeline, _workspaceConnectionDeploymentConnectionRestClient.CreateCreateOrUpdateDeploymentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update Azure OpenAI connection deployment resource with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// Connection_CreateOrUpdateDeployment - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// deployment object. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, EndpointDeploymentResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceConnectionDeploymentConnectionClientDiagnostics.CreateScope("WorkspaceConnectionDeploymentResource.Update"); - scope.Start(); - try - { - var response = _workspaceConnectionDeploymentConnectionRestClient.CreateOrUpdateDeployment(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(new WorkspaceConnectionDeploymentOperationSource(Client), _workspaceConnectionDeploymentConnectionClientDiagnostics, Pipeline, _workspaceConnectionDeploymentConnectionRestClient.CreateCreateOrUpdateDeploymentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionRaiPolicyCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionRaiPolicyCollection.cs deleted file mode 100644 index 19a6e857d11d8..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionRaiPolicyCollection.cs +++ /dev/null @@ -1,498 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkspaceConnectionRaiPolicies method from an instance of . - /// - public partial class WorkspaceConnectionRaiPolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics; - private readonly ConnectionRaiPolicyRestOperations _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient; - private readonly ClientDiagnostics _workspaceConnectionRaiPolicyConnectionRaiPoliciesClientDiagnostics; - private readonly ConnectionRaiPoliciesRestOperations _workspaceConnectionRaiPolicyConnectionRaiPoliciesRestClient; - - /// Initializes a new instance of the class for mocking. - protected WorkspaceConnectionRaiPolicyCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal WorkspaceConnectionRaiPolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", WorkspaceConnectionRaiPolicyResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(WorkspaceConnectionRaiPolicyResource.ResourceType, out string workspaceConnectionRaiPolicyConnectionRaiPolicyApiVersion); - _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient = new ConnectionRaiPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceConnectionRaiPolicyConnectionRaiPolicyApiVersion); - _workspaceConnectionRaiPolicyConnectionRaiPoliciesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", WorkspaceConnectionRaiPolicyResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(WorkspaceConnectionRaiPolicyResource.ResourceType, out string workspaceConnectionRaiPolicyConnectionRaiPoliciesApiVersion); - _workspaceConnectionRaiPolicyConnectionRaiPoliciesRestClient = new ConnectionRaiPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceConnectionRaiPolicyConnectionRaiPoliciesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != MachineLearningWorkspaceConnectionResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningWorkspaceConnectionResource.ResourceType), nameof(id)); - } - - /// - /// Update the state of specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the Rai Policy. - /// The to use. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string raiPolicyName, RaiPolicyPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new WorkspaceConnectionRaiPolicyOperationSource(Client), _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics, Pipeline, _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the Rai Policy. - /// The to use. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string raiPolicyName, RaiPolicyPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new WorkspaceConnectionRaiPolicyOperationSource(Client), _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics, Pipeline, _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyCollection.Get"); - scope.Start(); - try - { - var response = await _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionRaiPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyCollection.Get"); - scope.Start(); - try - { - var response = _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionRaiPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List the specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies - /// - /// - /// Operation Id - /// ConnectionRaiPolicies_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceConnectionRaiPolicyConnectionRaiPoliciesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceConnectionRaiPolicyConnectionRaiPoliciesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkspaceConnectionRaiPolicyResource(Client, RaiPolicyPropertiesBasicResourceData.DeserializeRaiPolicyPropertiesBasicResourceData(e)), _workspaceConnectionRaiPolicyConnectionRaiPoliciesClientDiagnostics, Pipeline, "WorkspaceConnectionRaiPolicyCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List the specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies - /// - /// - /// Operation Id - /// ConnectionRaiPolicies_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceConnectionRaiPolicyConnectionRaiPoliciesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceConnectionRaiPolicyConnectionRaiPoliciesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkspaceConnectionRaiPolicyResource(Client, RaiPolicyPropertiesBasicResourceData.DeserializeRaiPolicyPropertiesBasicResourceData(e)), _workspaceConnectionRaiPolicyConnectionRaiPoliciesClientDiagnostics, Pipeline, "WorkspaceConnectionRaiPolicyCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyCollection.Exists"); - scope.Start(); - try - { - var response = await _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyCollection.Exists"); - scope.Start(); - try - { - var response = _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionRaiPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyCollection.GetIfExists"); - scope.Start(); - try - { - var response = _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionRaiPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionRaiPolicyResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionRaiPolicyResource.Serialization.cs deleted file mode 100644 index 792d7e587363d..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionRaiPolicyResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class WorkspaceConnectionRaiPolicyResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - RaiPolicyPropertiesBasicResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - RaiPolicyPropertiesBasicResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionRaiPolicyResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionRaiPolicyResource.cs deleted file mode 100644 index 24573838500d4..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionRaiPolicyResource.cs +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a WorkspaceConnectionRaiPolicy along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetWorkspaceConnectionRaiPolicyResource method. - /// Otherwise you can get one from its parent resource using the GetWorkspaceConnectionRaiPolicy method. - /// - public partial class WorkspaceConnectionRaiPolicyResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The workspaceName. - /// The connectionName. - /// The raiPolicyName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, string raiPolicyName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics; - private readonly ConnectionRaiPolicyRestOperations _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient; - private readonly RaiPolicyPropertiesBasicResourceData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/connections/raiPolicies"; - - /// Initializes a new instance of the class for mocking. - protected WorkspaceConnectionRaiPolicyResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal WorkspaceConnectionRaiPolicyResource(ArmClient client, RaiPolicyPropertiesBasicResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal WorkspaceConnectionRaiPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string workspaceConnectionRaiPolicyConnectionRaiPolicyApiVersion); - _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient = new ConnectionRaiPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceConnectionRaiPolicyConnectionRaiPolicyApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual RaiPolicyPropertiesBasicResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets the specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyResource.Get"); - scope.Start(); - try - { - var response = await _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionRaiPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyResource.Get"); - scope.Start(); - try - { - var response = _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionRaiPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Delete - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyResource.Delete"); - scope.Start(); - try - { - var response = await _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics, Pipeline, _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Delete - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyResource.Delete"); - scope.Start(); - try - { - var response = _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics, Pipeline, _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, RaiPolicyPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyResource.Update"); - scope.Start(); - try - { - var response = await _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new WorkspaceConnectionRaiPolicyOperationSource(Client), _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics, Pipeline, _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified Content Filters associated with the Azure OpenAI connection. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// ConnectionRaiPolicy_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, RaiPolicyPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics.CreateScope("WorkspaceConnectionRaiPolicyResource.Update"); - scope.Start(); - try - { - var response = _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(new WorkspaceConnectionRaiPolicyOperationSource(Client), _workspaceConnectionRaiPolicyConnectionRaiPolicyClientDiagnostics, Pipeline, _workspaceConnectionRaiPolicyConnectionRaiPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointDeploymentCollection.cs deleted file mode 100644 index f6fd71f1f7b08..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointDeploymentCollection.cs +++ /dev/null @@ -1,493 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkspaceEndpointDeployments method from an instance of . - /// - public partial class WorkspaceEndpointDeploymentCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics; - private readonly EndpointDeploymentRestOperations _workspaceEndpointDeploymentEndpointDeploymentRestClient; - - /// Initializes a new instance of the class for mocking. - protected WorkspaceEndpointDeploymentCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal WorkspaceEndpointDeploymentCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", WorkspaceEndpointDeploymentResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(WorkspaceEndpointDeploymentResource.ResourceType, out string workspaceEndpointDeploymentEndpointDeploymentApiVersion); - _workspaceEndpointDeploymentEndpointDeploymentRestClient = new EndpointDeploymentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceEndpointDeploymentEndpointDeploymentApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != EndpointResourcePropertiesBasicResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EndpointResourcePropertiesBasicResource.ResourceType), nameof(id)); - } - - /// - /// Create or update endpoint deployment resource with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the deployment resource. - /// deployment object. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string deploymentName, EndpointDeploymentResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new WorkspaceEndpointDeploymentOperationSource(Client), _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics, Pipeline, _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update endpoint deployment resource with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the deployment resource. - /// deployment object. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string deploymentName, EndpointDeploymentResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new WorkspaceEndpointDeploymentOperationSource(Client), _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics, Pipeline, _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get deployments under endpoint resource by name - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentCollection.Get"); - scope.Start(); - try - { - var response = await _workspaceEndpointDeploymentEndpointDeploymentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceEndpointDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get deployments under endpoint resource by name - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentCollection.Get"); - scope.Start(); - try - { - var response = _workspaceEndpointDeploymentEndpointDeploymentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceEndpointDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get all the deployments under the endpoint resource scope - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments - /// - /// - /// Operation Id - /// EndpointDeployment_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkspaceEndpointDeploymentResource(Client, EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(e)), _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics, Pipeline, "WorkspaceEndpointDeploymentCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Get all the deployments under the endpoint resource scope - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments - /// - /// - /// Operation Id - /// EndpointDeployment_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkspaceEndpointDeploymentResource(Client, EndpointDeploymentResourcePropertiesBasicResourceData.DeserializeEndpointDeploymentResourcePropertiesBasicResourceData(e)), _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics, Pipeline, "WorkspaceEndpointDeploymentCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentCollection.Exists"); - scope.Start(); - try - { - var response = await _workspaceEndpointDeploymentEndpointDeploymentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentCollection.Exists"); - scope.Start(); - try - { - var response = _workspaceEndpointDeploymentEndpointDeploymentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _workspaceEndpointDeploymentEndpointDeploymentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new WorkspaceEndpointDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the deployment resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentCollection.GetIfExists"); - scope.Start(); - try - { - var response = _workspaceEndpointDeploymentEndpointDeploymentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new WorkspaceEndpointDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointDeploymentResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointDeploymentResource.Serialization.cs deleted file mode 100644 index 1594ecc8954dc..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointDeploymentResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class WorkspaceEndpointDeploymentResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - EndpointDeploymentResourcePropertiesBasicResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - EndpointDeploymentResourcePropertiesBasicResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointDeploymentResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointDeploymentResource.cs deleted file mode 100644 index 54b5548216a09..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointDeploymentResource.cs +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a WorkspaceEndpointDeployment along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetWorkspaceEndpointDeploymentResource method. - /// Otherwise you can get one from its parent resource using the GetWorkspaceEndpointDeployment method. - /// - public partial class WorkspaceEndpointDeploymentResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The workspaceName. - /// The endpointName. - /// The deploymentName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics; - private readonly EndpointDeploymentRestOperations _workspaceEndpointDeploymentEndpointDeploymentRestClient; - private readonly EndpointDeploymentResourcePropertiesBasicResourceData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/endpoints/deployments"; - - /// Initializes a new instance of the class for mocking. - protected WorkspaceEndpointDeploymentResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal WorkspaceEndpointDeploymentResource(ArmClient client, EndpointDeploymentResourcePropertiesBasicResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal WorkspaceEndpointDeploymentResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string workspaceEndpointDeploymentEndpointDeploymentApiVersion); - _workspaceEndpointDeploymentEndpointDeploymentRestClient = new EndpointDeploymentRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceEndpointDeploymentEndpointDeploymentApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual EndpointDeploymentResourcePropertiesBasicResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Get deployments under endpoint resource by name - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentResource.Get"); - scope.Start(); - try - { - var response = await _workspaceEndpointDeploymentEndpointDeploymentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceEndpointDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get deployments under endpoint resource by name - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentResource.Get"); - scope.Start(); - try - { - var response = _workspaceEndpointDeploymentEndpointDeploymentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceEndpointDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete endpoint deployment resource by name - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_Delete - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentResource.Delete"); - scope.Start(); - try - { - var response = await _workspaceEndpointDeploymentEndpointDeploymentRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics, Pipeline, _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete endpoint deployment resource by name - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_Delete - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentResource.Delete"); - scope.Start(); - try - { - var response = _workspaceEndpointDeploymentEndpointDeploymentRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics, Pipeline, _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update endpoint deployment resource with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// deployment object. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, EndpointDeploymentResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentResource.Update"); - scope.Start(); - try - { - var response = await _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new WorkspaceEndpointDeploymentOperationSource(Client), _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics, Pipeline, _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update endpoint deployment resource with the specified parameters - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName} - /// - /// - /// Operation Id - /// EndpointDeployment_CreateOrUpdate - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// deployment object. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, EndpointDeploymentResourcePropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics.CreateScope("WorkspaceEndpointDeploymentResource.Update"); - scope.Start(); - try - { - var response = _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(new WorkspaceEndpointDeploymentOperationSource(Client), _workspaceEndpointDeploymentEndpointDeploymentClientDiagnostics, Pipeline, _workspaceEndpointDeploymentEndpointDeploymentRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointRaiPolicyCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointRaiPolicyCollection.cs deleted file mode 100644 index c8f36b19acf43..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointRaiPolicyCollection.cs +++ /dev/null @@ -1,498 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetWorkspaceEndpointRaiPolicies method from an instance of . - /// - public partial class WorkspaceEndpointRaiPolicyCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics; - private readonly RaiPolicyRestOperations _workspaceEndpointRaiPolicyRaiPolicyRestClient; - private readonly ClientDiagnostics _workspaceEndpointRaiPolicyRaiPoliciesClientDiagnostics; - private readonly RaiPoliciesRestOperations _workspaceEndpointRaiPolicyRaiPoliciesRestClient; - - /// Initializes a new instance of the class for mocking. - protected WorkspaceEndpointRaiPolicyCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal WorkspaceEndpointRaiPolicyCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", WorkspaceEndpointRaiPolicyResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(WorkspaceEndpointRaiPolicyResource.ResourceType, out string workspaceEndpointRaiPolicyRaiPolicyApiVersion); - _workspaceEndpointRaiPolicyRaiPolicyRestClient = new RaiPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceEndpointRaiPolicyRaiPolicyApiVersion); - _workspaceEndpointRaiPolicyRaiPoliciesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", WorkspaceEndpointRaiPolicyResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(WorkspaceEndpointRaiPolicyResource.ResourceType, out string workspaceEndpointRaiPolicyRaiPoliciesApiVersion); - _workspaceEndpointRaiPolicyRaiPoliciesRestClient = new RaiPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceEndpointRaiPolicyRaiPoliciesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != EndpointResourcePropertiesBasicResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EndpointResourcePropertiesBasicResource.ResourceType), nameof(id)); - } - - /// - /// Update the state of specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the Rai Policy. - /// The to use. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string raiPolicyName, RaiPolicyPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _workspaceEndpointRaiPolicyRaiPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new WorkspaceEndpointRaiPolicyOperationSource(Client), _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics, Pipeline, _workspaceEndpointRaiPolicyRaiPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the Rai Policy. - /// The to use. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string raiPolicyName, RaiPolicyPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _workspaceEndpointRaiPolicyRaiPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new WorkspaceEndpointRaiPolicyOperationSource(Client), _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics, Pipeline, _workspaceEndpointRaiPolicyRaiPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyCollection.Get"); - scope.Start(); - try - { - var response = await _workspaceEndpointRaiPolicyRaiPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceEndpointRaiPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyCollection.Get"); - scope.Start(); - try - { - var response = _workspaceEndpointRaiPolicyRaiPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceEndpointRaiPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List the specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies - /// - /// - /// Operation Id - /// RaiPolicies_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceEndpointRaiPolicyRaiPoliciesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceEndpointRaiPolicyRaiPoliciesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new WorkspaceEndpointRaiPolicyResource(Client, RaiPolicyPropertiesBasicResourceData.DeserializeRaiPolicyPropertiesBasicResourceData(e)), _workspaceEndpointRaiPolicyRaiPoliciesClientDiagnostics, Pipeline, "WorkspaceEndpointRaiPolicyCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// List the specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies - /// - /// - /// Operation Id - /// RaiPolicies_List - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _workspaceEndpointRaiPolicyRaiPoliciesRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _workspaceEndpointRaiPolicyRaiPoliciesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WorkspaceEndpointRaiPolicyResource(Client, RaiPolicyPropertiesBasicResourceData.DeserializeRaiPolicyPropertiesBasicResourceData(e)), _workspaceEndpointRaiPolicyRaiPoliciesClientDiagnostics, Pipeline, "WorkspaceEndpointRaiPolicyCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyCollection.Exists"); - scope.Start(); - try - { - var response = await _workspaceEndpointRaiPolicyRaiPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyCollection.Exists"); - scope.Start(); - try - { - var response = _workspaceEndpointRaiPolicyRaiPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _workspaceEndpointRaiPolicyRaiPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new WorkspaceEndpointRaiPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the Rai Policy. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string raiPolicyName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(raiPolicyName, nameof(raiPolicyName)); - - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyCollection.GetIfExists"); - scope.Start(); - try - { - var response = _workspaceEndpointRaiPolicyRaiPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, raiPolicyName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new WorkspaceEndpointRaiPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointRaiPolicyResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointRaiPolicyResource.Serialization.cs deleted file mode 100644 index 5e26b0d44537b..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointRaiPolicyResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class WorkspaceEndpointRaiPolicyResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - RaiPolicyPropertiesBasicResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); - - RaiPolicyPropertiesBasicResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointRaiPolicyResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointRaiPolicyResource.cs deleted file mode 100644 index 3a5d56f221251..0000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceEndpointRaiPolicyResource.cs +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a WorkspaceEndpointRaiPolicy along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetWorkspaceEndpointRaiPolicyResource method. - /// Otherwise you can get one from its parent resource using the GetWorkspaceEndpointRaiPolicy method. - /// - public partial class WorkspaceEndpointRaiPolicyResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The workspaceName. - /// The endpointName. - /// The raiPolicyName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string raiPolicyName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics; - private readonly RaiPolicyRestOperations _workspaceEndpointRaiPolicyRaiPolicyRestClient; - private readonly RaiPolicyPropertiesBasicResourceData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/endpoints/raiPolicies"; - - /// Initializes a new instance of the class for mocking. - protected WorkspaceEndpointRaiPolicyResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal WorkspaceEndpointRaiPolicyResource(ArmClient client, RaiPolicyPropertiesBasicResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal WorkspaceEndpointRaiPolicyResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string workspaceEndpointRaiPolicyRaiPolicyApiVersion); - _workspaceEndpointRaiPolicyRaiPolicyRestClient = new RaiPolicyRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceEndpointRaiPolicyRaiPolicyApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual RaiPolicyPropertiesBasicResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets the specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyResource.Get"); - scope.Start(); - try - { - var response = await _workspaceEndpointRaiPolicyRaiPolicyRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceEndpointRaiPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Get - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyResource.Get"); - scope.Start(); - try - { - var response = _workspaceEndpointRaiPolicyRaiPolicyRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceEndpointRaiPolicyResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Delete - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyResource.Delete"); - scope.Start(); - try - { - var response = await _workspaceEndpointRaiPolicyRaiPolicyRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics, Pipeline, _workspaceEndpointRaiPolicyRaiPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Deletes the specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Delete - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyResource.Delete"); - scope.Start(); - try - { - var response = _workspaceEndpointRaiPolicyRaiPolicyRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics, Pipeline, _workspaceEndpointRaiPolicyRaiPolicyRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, RaiPolicyPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyResource.Update"); - scope.Start(); - try - { - var response = await _workspaceEndpointRaiPolicyRaiPolicyRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new WorkspaceEndpointRaiPolicyOperationSource(Client), _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics, Pipeline, _workspaceEndpointRaiPolicyRaiPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified Content Filters associated with the Azure OpenAI account. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName} - /// - /// - /// Operation Id - /// RaiPolicy_Create - /// - /// - /// Default Api Version - /// 2024-07-01-preview - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The to use. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, RaiPolicyPropertiesBasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics.CreateScope("WorkspaceEndpointRaiPolicyResource.Update"); - scope.Start(); - try - { - var response = _workspaceEndpointRaiPolicyRaiPolicyRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(new WorkspaceEndpointRaiPolicyOperationSource(Client), _workspaceEndpointRaiPolicyRaiPolicyClientDiagnostics, Pipeline, _workspaceEndpointRaiPolicyRaiPolicyRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md index 3abcab19d879a..1ca3482bfbb47 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true library-name: MachineLearning namespace: Azure.ResourceManager.MachineLearning require: https://github.com/Azure/azure-rest-api-specs/blob/edb7904bfead536c7aa9716d44dba15bdabd0b00/specification/machinelearningservices/resource-manager/readme.md -#tag: package-preview-2023-06 +tag: package-2024-04 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -191,8 +191,8 @@ rename-mapping: QuotaUpdateParameters: MachineLearningQuotaUpdateContent EncryptionProperty: MachineLearningEncryptionSetting EncryptionStatus: MachineLearningEncryptionStatus - KeyVaultProperties: MachineLearningEncryptionKeyVaultProperties - KeyVaultProperties.keyVaultArmId: -|arm-id + EncryptionKeyVaultProperties: MachineLearningEncryptionKeyVaultProperties + EncryptionKeyVaultProperties.keyVaultArmId: -|arm-id IdentityForCmk: MachineLearningCmkIdentity IdentityForCmk.userAssignedIdentity: -|arm-id NotebookResourceInfo: MachineLearningNotebookResourceInfo @@ -205,8 +205,8 @@ rename-mapping: DiagnoseRequestProperties: MachineLearningWorkspaceDiagnoseProperties NotebookAccessTokenResult: MachineLearningWorkspaceNotebookAccessTokenResult ListNotebookKeysResult: MachineLearningWorkspaceGetNotebookKeysResult - FqdnEndpointsPropertyBag: MachineLearningFqdnEndpoints - FqdnEndpoints: MachineLearningFqdnEndpointsProperties + FqdnEndpoints: MachineLearningFqdnEndpoints + FqdnEndpointsProperties: MachineLearningFqdnEndpointsProperties ListStorageAccountKeysResult: MachineLearningWorkspaceGetStorageAccountKeysResult AmlUserFeature: MachineLearningUserFeature DatastoreCredentials: MachineLearningDatastoreCredentials @@ -387,9 +387,6 @@ rename-mapping: OrderString: MachineLearningOrderString OsType: MachineLearningOSType PipelineJob: MachineLearningPipelineJob - WorkspacePrivateEndpointResource: MachineLearningPrivateEndpoint - WorkspacePrivateEndpointResource.id: -|arm-id - WorkspacePrivateEndpointResource.subnetArmId: -|arm-id ProbeSettings: MachineLearningProbeSettings PublicNetworkAccessType: MachineLearningPublicNetworkAccessType QuotaBaseProperties: MachineLearningQuotaProperties @@ -470,7 +467,7 @@ rename-mapping: UserCreatedStorageAccount.armResourceId: ArmResourceIdentifier|arm-id Cron: ComputeStartStopCronSchedule Recurrence: ComputeStartStopRecurrenceSchedule - EndpointServiceConnectionStatus: MachineLearningPrivateEndpointServiceConnectionStatus + PrivateEndpointServiceConnectionStatus: MachineLearningPrivateEndpointServiceConnectionStatus ArmResourceId.resourceId: -|arm-id Workspace.properties.hubResourceId: -|arm-id OutboundRuleBasicResource: MachineLearningOutboundRuleBasic @@ -520,7 +517,8 @@ rename-mapping: ProtectionLevel: IntellectualProtectionLevel OsPatchingStatus.latestPatchTime: -|date-time OsPatchingStatus.scheduledRebootTime: -|date-time - ServerlessComputeSettings.serverlessComputeNoPublicIP : HasNoPublicIP + ServerlessComputeSettings.serverlessComputeNoPublicIP: HasNoPublicIP + PrivateEndpointConnection.properties.privateEndpoint: SubResource suppress-abstract-base-class: - MachineLearningJobProperties